Jump to content
Sign in to follow this  
petercao

RunAsWait

Recommended Posts

petercao

I want to delete folder d:music as the admin I try the RunAsWait But there are something wrong

RunAsWait("usenamer",@LogonDomain,"Password,0,@ComSpec & ' rd /s/q/f c:Temp,"","",0)

Edited by petercao

Share this post


Link to post
Share on other sites
Chimaera

Im not sure your syntax is right

RunAsWait("usenamer",@LogonDomain,"Password,0,@ComSpec & ' rd /s/q/f c:\Temp)

"usenamer" needs to be an actual username or use @UserName which is the ID of the currently logged on user.

"Password needs to add a missing " and it needs to be the proper password of the user concerned

Im not sure about the comspec bit so trail and error is needed

Share this post


Link to post
Share on other sites
petercao

Im not sure your syntax is right

RunAsWait("usenamer",@LogonDomain,"Password,0,@ComSpec & ' rd /s/q/f c:Temp)

"usenamer" needs to be an actual username or use @UserName which is the ID of the currently logged on user.

"Password needs to add a missing " and it needs to be the proper password of the user concerned

Im not sure about the comspec bit so trail and error is needed

Thank you for your support

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  

×