eagletempest Posted April 5, 2007 Posted April 5, 2007 My company has many offices but all have the same server share names. Every user has a Q: drive mapped to the same share name but on their local server such as: Office 1: Q: \\UDANorth\CAD Office 2: Q: \\UDASouth\CAD I want to run a custom program (under a different user account) such as: Q:\PFM-Apps\ProjectEditor.exe So here's I've tried but it can't find the path: ;Retrieve share name of user's local share so I don't have to worry about Q being mapped. $Qdrv = String(DriveMapGet ( "q:" )) ; Set the RunAs parameters to use local adminstrator account RunAsSet("adfpfm", "ADF", "Ducati4") ; Run ProjectEditor as adfpfm user. RunWait(@ComSpec & " /c " & $Qdrv & "\PFM-Apps\ProjectEditor.exe") ; Reset user's permissions RunAsSet()
eagletempest Posted April 5, 2007 Author Posted April 5, 2007 The problem was that RunAsSet required a working folder such as "C:\".
Valuater Posted April 5, 2007 Posted April 5, 2007 The problem was that RunAsSet required a working folder such as "C:\".Sorry I didn't see this sooner...butRemeber this for referenceAutoit WrappersThe actuial post for Comspec is herehttp://www.autoitscript.com/forum/index.ph...st&p=223951... by jefhal8)
eagletempest Posted April 5, 2007 Author Posted April 5, 2007 That's okay. The big problem now is that the RunAsSet user needs to have three drives mapped in his account. I'm trying this as an alternative to impersonating a user in VB6 as it seems to not be reliable.
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