Sign in to follow this  
Followers 0
shornw

RunAsSet problem

3 posts in this topic

#1 ·  Posted (edited)

Any ideas???

I'm deploying a script accross the domain which works on some machines but not on others.

As it is a registry change I have to use the RunAsSet see below:

$state = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Setup\7.0", "DoNotAllowIE70")

if $state = ("00000001") then Exit

RunAsSet ("account", "DOMAIN", "password")

Run("\\Server\share\IE7b.exe")

the issue is that when used in a logon script it errors running the second file but only on some machines, saying the directory name is invalid.

Any ideas?

Thanks for looking

I added the following line to check the working directory:

MsgBox(0, "", "Working directory is " & @WorkingDir)

the result was as expected ... \\Server\share

Any ideas?

Edited by shornw

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites



You failed to mention if the error came from AutoIt or IE7b.exe.

Perhaps try setting the temp folder as the working directory as the cab sfx would presumably extract to temp anyway.

Run("\\Server\share\IE7b.exe", @TempDir)

:)

Share this post


Link to post
Share on other sites

Sorry should have explained that the IE7b.exe is another script which edits the registry to prevent installation of IE7

I had to do it in two stages as the reg mod needs admin rights to apply and wont work under ordinary user logons.

Hope this helps


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

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