Sign in to follow this  
iammike

a2cmd not running

Recommended Posts

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)

 

post-25185-0-26742300-1454399305_thumb.jpg
Download Image

 

And this is the screenshot of Task Manager

 

post-25185-0-32764900-1454399530_thumb.jpg
Download Image

 

Ps: Running Win 8.1 x64

Share this post


Link to post
Share on other sites

Are you running it from an elevated (running as administrator) Command Prompt? A2CMD needs admin privileges to work properly.

Share this post


Link to post
Share on other sites

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)

 

post-25185-0-46964400-1454468498_thumb.jpg
Download Image

Share this post


Link to post
Share on other sites

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.

  • Upvote 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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).

  • Upvote 1

Share this post


Link to post
Share on other sites

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. :D

 

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

 

post-25185-0-03704500-1454640256_thumb.jpg
Download Image

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. ;)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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?

  • Upvote 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.