Sign in to follow this  
Followers 0
autoitNOW

2 RunAsSet commands in script

3 posts in this topic

I'm having a problem with 2 RunAsSet commands in the same script and would like some advice on how to keep 2 RunAsSet commands in the same script.

RunAsSet("Admin", "domain 1", "xxx")

Runwait ( 'A.exe')

Runwait ( 'B.exe') ;switches domains

RunAsSet("Admin", "domain 2", "xxx")

Run ( 'C.exe')

exit

In my present script c.exe never runs, but A.exe and B.exe does and the domain switch is clearly successful. Any advice on alternate methods to go about this?

Thanks in advance


An ADVOCATE for AutoIT

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Use this:

; Reset user's permissions
RunAsSet()

RunAsSet("Admin", "domain 2", "xxx")
Edited by SlimShady

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Turned out my problem is with @comspec and netsh command. I have posted a topic about this. As always... Thanks.

Edited by autoitNOW

An ADVOCATE for AutoIT

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  
Followers 0