Sign in to follow this  
Followers 0
probedrone

Running AutoIt with psexec

4 posts in this topic

I have a Autoit program that does a simple test on a local machine.

I want to run this test on all remote servers connected to the network, so I use psexec to distribute the compiled autoit scripts

It seems this only works when I am logged in to the remote machine, either physically or remotely.

I am running this test after an automatic restart on each computer, so I will always be logged off when this script runs, so in this case the script will hang execution until I log on.

Is there something in AutoIt or Psexec to sidestep this?

Thanks.

Share this post


Link to post
Share on other sites



Do a search for psexec because I remember someone having the same issue. You might find there what you're seeking.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

Hmmm...I did find some similar issues but seems like none of them have been resolved....

this does not look good

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Usually these are the psexec hangups.

NTLM negotiation mismatch

Classic Windows Filesharing turned on, and firewall allowing it

2k3/XP/2k/NT's Forceguest

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]

"forceguest"=dword:00000000

Vista's Forceguest Equivalent

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]

"LocalAccountTokenFilterPolicy"=dword:00000001

If you can do this, psexec should work as advertised.

net use \\target\Admin$ /user:Administrator 
dir \\target\Admin$ 
net use \\target\Admin$ /delete (end the session)

In your case it sounds like something I just ran into with AutoIt.

Most launchers, including psexec aren't going to drop you into the Winlogon desktop.

Instead they'll run the app invisible.

For example, psexec-ing cmd.exe with the '-i' immediately gives you a networked prompt, but the window isn't visible until a user logs on.

Without the '-i' it starts immediately too but will never be visible.

You can check by psexec-ing notepad.exe, and while that's running, psexec a cmd.exe to run the tasklist command.

Repeat: AutoIt will run but you can't see it.

If you don't do anything a user would see (popups, or window manipulation, or hotkeys, etc), you don't need 'interact with desktop'. In other words stick to messing with the registry, network, and files.

I made a script that sent 'hello world' over a socket to a separate PC and that worked without me logged in on the target.

If you need interaction and don't care whose desktop, or if anyone's logged in at all, this thread will help.

http://www.autoitscript.com/forum/index.php?showtopic=51337

Edited by RandomGuest

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