Jump to content
Sign in to follow this  

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:


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


Share this post

Link to post
Share on other sites

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.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...