Sign in to follow this  
Followers 0
ltguide

Run(\\unc\autoit.exe) from c:\autoit.exe while SYSTEM

3 posts in this topic

I'm not sure how my title will appear so let me make things clearer.

A Group Policy startup script directly runs a compiled autoit script from program files. So the user is SYSTEM.

In this script, it Run()'s another compiled script from a samba server. However, that script never does anything.

I've verified that the exe is being accessed on the server by checking the samba logs. Also Run()'s @error is 0.

If I change the local script (in progfiles) to call a bat file on the samba server, it actually does work. If I add a line to start the autoit exe (samba server) to the bat, it doesn't do anything. I verified again that the exe is accessed in samba logs.

Now to muck things up, the original scenario works perfectly fine in Windows 7 after you use InetRead('http://127.0.0.1') to force the connection online.

In XP, I've enabled the policy 'Always wait for the network at computer startup and logon' aka SyncForegroundPolicy to disable cached logon. Unfortunately, it still didn't help. I found that looping Ping() until the connection is forced online works best.

So, while the local script is running as SYSTEM I am unable to use Run() to start another autoit script off a samba server.

I am curious if it is because the script is not running interactive. I find that my autoit scripts will not run with psexec unless I use the -i interactive flag even if they simply write to a file.

Share this post


Link to post
Share on other sites



So this doesn't make any sense. I can't even RunAs the autoit exe from the local drive using the local administrator.

Has anyone that uses the SYSTEM account to run autoit ever tried to run another autoit exe?

Share this post


Link to post
Share on other sites

For some reason, I am unable to simply use Run() with exe's as SYSTEM.

What I finally got it to work with is:

Local $pid = Run($FileServer & '\someautoit.exe',@MyDocumentsDir,@SW_HIDE,8)
If @OSVersion == 'WIN_XP' Then
    While 1
        StdoutRead($pid)
        If @error Then ExitLoop
    WEnd
EndIf

I don't understand why it works once I loop the STDOUT. There is no output from the exe.

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