eagletempest Posted October 24, 2007 Share Posted October 24, 2007 I want to run a custom application on a mapped Q drive with special user credentials. The current user already has a Q drive mapped to the proper share. So I have: RunAsSet('umapfm', 'umadomain','$3221fby') If DirGetSize("Q:\PFM") == - 1 Then MsgBox(0,"Error",@error) Else Run(@COMSPEC & ' /c ' & "Q:\PFM\PFMEdtior.exe") EndIf This script is actually stored in Q:\PFM so I've also tried. Run(@COMSPEC & ' /c ' & @Scriptdir & "\PFMEdtior.exe") I receive an "Unable to execute the external program. The directory name is invalid" error. Any ideas? Thanks. Link to comment Share on other sites More sharing options...
wkain1 Posted October 25, 2007 Share Posted October 25, 2007 Since you are doing a RunAsSet the special user does not have the Q: mapped so that is the reason for the error. The way to think of it is Windows is logging that user in and since it is a different user it does not have it mapped. So, you either need to map the Q: under the other user (using run with net commands after the RunAsSet) or using the option of 0 in the RunAsSet might work. Example: RunAsSet('umapfm', 'umadomain','$3221fby', 0) Not sure if this will work as not able to test it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now