Jump to content
Sign in to follow this  
mega128

How to run a vbs using RunAsSet on a unc path

Recommended Posts

mega128

Hi all,

I worked on a vbs script that moves a computer in Active directory domain based on the user who is loggin on to the right OU. Since a domain user don't have enough rights to move a computer on the domain I need an AutoIt application to run vbs as a domain admin when user logs on to the workstation. I am having hard time to figure this out.

RunAsSet("JSmith", "xyz.com","Pa$$word")

RunWait("WScript.exe \\SERVER\VOL105\MIN\Scripts\moveWorkstations.vbs")

RunAsSet()

I know the above lines are incorrect. Can someone shed some light on it? :)

Thanks all for reading

:)

Share this post


Link to post
Share on other sites
DaveF

You'll need to re-negotiate the network connection (i.e. authenticate to the domain) in the context of the RunAsSet, either in the VBScript or with a child AutoIt script that uses DriveMapAdd; network connections are not inherited by child processes...


Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

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  

×