Sign in to follow this  
Followers 0
StevenCools

RunasWait from network not working

1 post in this topic

hey,

i have a batch file which starts a vbs and has to wait for it to end.

i need to run this bat file as admin so i made the following code in auto-it:

#include "Admin_credentials.AU3"

Local $sInstallFile = "TV115Brother.bat"

; Run a command prompt as the other user.

RunAsWait($sUserName, $sDomain, $sPassword, 3, $sInstallFile)

the compiled exe runs great if started from local hard drive. (the batch file starts, the vbs starts, and the batrch continues after the vbs ends...)

However, when i start this exe from a network location, nothing happens...

i tried specifying the workingdir parameter

Local $sTempdir = "C:\temp"

RunAsWait($sUserName, $sDomain, $sPassword, 3, $sInstallFile,$sTempDir)

where i defined "$sTempdir" as a local path (c:\) or a network location... but neither works...

(the admin account i used in the credentials.au3 file has full access on the different folders i tried; the folder where the exe is being run from, the local temp path as well as the network temp path)

i tried specifying the full unc path of the $sInstallFile, but to no avail...

i tried using the different logon flags, but this also doesn't work...

(i use the (undocumented) logon flag "3" as you may have seen, but i forgot why, i've been strugglin with this script for a long time already... this problem here is yet another one i encounter, seems like every step leeds to another... ;-) notes on this flag "3" are welcome as well)

ideas anyone?

cheers,

S.

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0