Jump to content

Another runasset & comspec question


Recommended Posts

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()

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...