Sign in to follow this  
Followers 0
rshultz

RunWait and a variable as the path...

3 posts in this topic

I have been trying to run an application from a remote location. For some reason it never seems to work for me. I have tried two different methods. Below is the first method. I replaced the values with generic information.

RunAsSet("username", "domain", "password")

RunWait("AUTOPCC.EXE", "\\cr-scrappy.kirkwood.edu\ofscan")

RunAsSet()

This says something about a wrong parameter.

I then tried the following:

$val = DriveMapAdd("*", "\\cr-scrappy.kirkwood.edu\ofcscan", 0, "domainuser", "password")

$val = $val & "\"

RunWait("AUTOPCC.EXE", $val)

DriveMapDel("\\cr-scrappy.kirkwood.edu\ofcscan")

The second method does not let you use a variable with RunWait.

Any help would be appreciated.

Share this post


Link to post
Share on other sites



I think your title maybe gives away your problem.

The working directory parameter of Run and RunWait are not a path to the executable, but rather, a path for the executable to work with.

This is a Antivirus program ? I would assume it's working directory is where it's definitions and support are ? Then the executable is in that location somewhere ?

Run and RunWait need the address to the executable if, it is not in the same directory as the script, or you use FileChangeDir to change the scripts working directory, else it is in the system's path \system32 etc.

The second method does not let you use a variable with RunWait.

The return value of DriveMapAdd is 1 or 0. This value returned would not qualify as a valid working directory. This is why it does not accept the variable as working directory parameter.

Hope this helps towards your solution.

:(

Share this post


Link to post
Share on other sites

The path I am specifying is the network location of the executable itself so I assumed that it needed to be included. I will play with that some more. As for the second method, the msgbox displays the variable correctly so I so not know why it is not working when using it in the RunWait command. Thanks for your help.

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