iammike Posted February 2, 2016 Report Share Posted February 2, 2016 After updating to the latest version this morning A2cmd.exe refuses to run on my PC. I use it to scan downloaded files for viruses. When I run it manually, I get the UAC and after that the CMD Box just hangs there (see screenshot) And this is the screenshot of Task Manager Ps: Running Win 8.1 x64 Link to comment Share on other sites More sharing options...
GT500 Posted February 2, 2016 Report Share Posted February 2, 2016 Are you running it from an elevated (running as administrator) Command Prompt? A2CMD needs admin privileges to work properly. Link to comment Share on other sites More sharing options...
iammike Posted February 3, 2016 Author Report Share Posted February 3, 2016 Hi Arthur, Isn't that what the UAC Screen does ?? Give the A2cmd Admin Rights. This is what happens. I start a2cmd.exe (from a normal user account), get the UAC Screen (to give it Admin Rights) and then it just hangs there, and even when I (force) close the Dos Box, the Command Line Scanner (process) keeps running (in Task Manager) When I open an Elevated Command Prompt and start it, it works as normal. Here a screenshot of the Command Line Scanner still listed running in the Task Manager (even after I (force) closed the DOS Box) Link to comment Share on other sites More sharing options...
GT500 Posted February 3, 2016 Report Share Posted February 3, 2016 I start a2cmd.exe (from a normal user account), get the UAC Screen (to give it Admin Rights) and then it just hangs there, and even when I (force) close the Dos Box, the Command Line Scanner (process) keeps running (in Task Manager) As far as I am aware, A2CMD was not intended to work this way. It is supposed to be executed from an elevated Command Prompt rather than relying on the UAC to grant permissions to a2cmd.exe when cmd.exe executes it without admin rights. Regardless, I'll let our QA Manager know about this, so that he can look into it. If you would like a workaround, then you can try writing batch files that execute a2cmd.exe with the parameters you want, and then just right-click on the batch file and run it as admin. You can also use something fancy like BatchGotAdmin to have a batch file display a UAC prompt when you execute it (well, technically the UAC prompt is displayed because a VBScript launches a new copy of the batch file with admin rights, but it will look like the batch file is doing it). Please note that our Behavior Blocker will display an alert when BatchGotAdmin code executes, as it saves a VBScript file to your TEMP folder and executes it, and without a rule to tell it the batch file is safe then our Behavior Blocker has no way to know whether or not it is safe without asking. 1 Link to comment Share on other sites More sharing options...
iammike Posted February 4, 2016 Author Report Share Posted February 4, 2016 Thanks Arthur. But that is the way I have been using it since a long time till the day before Yesterday. In my Download Manager (Free Download Manager) I have selected to run a Batch File after download is finished. The batch (.CMD) has the following in it (%1 is the file name to scan (but I think that is obvious) start /wait "Virus Scan" "c:\Program Files (x86)\Emsisoft Anti-Malware\a2cmd.exe" /f=%1 /s /a /pup /l="D:\My Documents\Anti-Malware\Reports\Scan.log" After the download I would normally get a UAC Prompt to run it, after I click OK, the SCAN would finish, but now it doesn't and I have a hanging "Command Line Scanner process" and a hanging DOS BOX. It even has brought down TOTAL Commander, when I "Right click" and select "Run as Adminstrator" Edit: Here is a thread from 2013, in which I already use this method to scan downloaded files http://support.emsisoft.com/topic/10732-1-year-of-eam-but/#entry68880 Link to comment Share on other sites More sharing options...
GT500 Posted February 4, 2016 Report Share Posted February 4, 2016 You can add the BatchGotAdmin batch code to the beginning of your batch file as a workaround for this issue. It may require some editing to pass the path of your file to be scanned to the VBS file (I haven't tested whether passing parameters to a batch file that uses BatchGotAdmin will be preserved after the batch file is reopened by the VBScript). 1 Link to comment Share on other sites More sharing options...
iammike Posted February 5, 2016 Author Report Share Posted February 5, 2016 Hi Arthur, I have been playing around with it, and finally got it to work, you where right in editing it to pass the FileName as it wouldn't take arguments, but (after a lot of fiddling) now it works. I also needed to change the paths for the VBS because I run Appguard and that doesn't allow to run files from Temp (but that was a minor problem) Thanks for the solution, really appreciated ! Ps: Since this morning, when I try to run a2cmd (as User and after the UAC screen) I get this error message Link to comment Share on other sites More sharing options...
GT500 Posted February 5, 2016 Report Share Posted February 5, 2016 It seems to be working OK for me, at least from an elevated Command Prompt: May I ask what parameters you are using? 1 Link to comment Share on other sites More sharing options...
iammike Posted February 8, 2016 Author Report Share Posted February 8, 2016 Arthur, My bad. What I meant is that I had trouble passing the (Downloaded) FileName to the Batch File, the standard "BatchGotAdmin" doesn't take parameters. Thanks again for your help, it works perfectly now. Link to comment Share on other sites More sharing options...
GT500 Posted February 9, 2016 Report Share Posted February 9, 2016 Ah, OK. I'm glad to hear that you were able to figure it out. If you need anything else, then please let me know. Link to comment Share on other sites More sharing options...
iammike Posted June 9, 2017 Author Report Share Posted June 9, 2017 Since this morning (new version EAM). A2CMD refuses to run (again) to scan downloaded files. Anything changed ? Ps: Running Win 8.1 x64 edit1: It seems that BatchGotAdmin isn't necessary Anymore Link to comment Share on other sites More sharing options...
GT500 Posted June 9, 2017 Report Share Posted June 9, 2017 2 hours ago, iammike said: It seems that BatchGotAdmin isn't necessary Anymore Yes, A2CMD can elevate itself correctly now via the UAC. It's still best to run it from an elevated Command Prompt, but if absolutely necessary you can run it without elevation and its UAC popup now works correctly. I did an update and a Quick Scan with A2CMD (both from an unelevated Command Prompt), and it was working OK for me. Are you still having trouble with it? 1 Link to comment Share on other sites More sharing options...
iammike Posted June 9, 2017 Author Report Share Posted June 9, 2017 Hi Arthur, nope no problem after I found out that BatchGotAdmin isn't needed anymore. Fortunately I saved my "old" scan.cmd and now get the UAC Prompt on scanning WITHOUT using BatchGotAdmin. Thx again for the help, really appreciated. Link to comment Share on other sites More sharing options...
GT500 Posted June 10, 2017 Report Share Posted June 10, 2017 You're welcome. Link to comment Share on other sites More sharing options...
Recommended Posts