I am having an issue running a Batch file on a remote machine suing PSEXEC.

The file runs but does not run like it does when run through remote desktop.

The batch runs a file which is a 32 bit application, which opens multiple 16bit applications, this should all run under one ntvdm.exe (In one Memory Space).

Through remote desktop the batch file runs under the explorer process, and works correctly opening only one ntvdm.exe. Using PSEXEC the batch runs but not under the explorer process, a separate ntvdm.exe is open for each process.

I found running the batch from explorer in PSEXEC works, but comes up with a "File Download - Security Warning" eg. psexec.exe" \compname -u username -p passowrd -s -d -i 0 explorer C:\Program.bat

I want to be able to run the batch successfully without receiving warnings, it is a local warning and not a network share warning. Possible to recreate warning typing "explorer C:\windows\system32\cmd.exe" in Run

I would like to know if anyone knows of a way to get PSEXEC to open the batch file to run as though it was started by explorer. Or a way of removing the local "File Download - Security Warning"



Given up with this approach it was not leading anywhere.

Instead I use PSexec to copy the file I need to run into Startup and then force the PC to restart using PSShutdown. Not so elegant but gets the job done.


Did you try copying the batch file, then using the 'at' command to schedule the batch file to run on the remote computer in a couple of minutes?

Also, using WMI to launch it instead of psexec: Send a batch file to a Windows machine, and execute it

(Also, is there a way to close questions without accepting any answers on ServerFault, so they don't hang around as 'unanswered'?)


I actually think you would have been better off posting a question about the "File Download - Security Warning" issue, which is the core issue here. What service packs and version of IE do you have installed? I usually see this error in relation to IE security.

Anyway, in terms of a work-around, I wonder if using Task Scheduler with the "Interactive" option might work for you? (Or use the AT command with the /interactive flag)

Another possibility is to see if the ideas from this discussion might apply?: http://www.winvistatips.com/file-download-security-warning-t526234.html

Another idea is to see if RCE (remote command executor) works differently to PSEXEC...? http://sourceforge.net/projects/rce/


What happens if you copy the batch file to a local drive on the remote system and use PSExec to run the local file?

Also, IIRC, PSExec runs as a service. That might account for the differences.


  • Same issue, it does seem to be a issue with the permissions PSexec runs with on the remote machine. I have changed my strategy for dealing with this now though, not so neat but it works. – RisingCascade Apr 15 '10 at 10:38

You could have overcome your issue if you setup a GPO to add the source of the executable to the trusted hosts list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.