Jump to content

Recommended Posts

Posted

Well I think all is for not.  I want to use LanSweeper to "deploy" this like an install.  I have to set the creds as currently logged on (which will run it as the person who is logged in, so they get the GUI).  However if no one is logged in, LanSweeper fails the entire process (because, well, there are no creds).

Unless there is a way in AutoIT to launch the GUI under whoever is logged in, then I can use system creds in LanSweeper.  I am guessing I can't get that lucky tho.

Posted

What i ended up doing, for anyone in the same boat.  I created a 2nd script that contains:

If ProcessExists("logonui.exe") Then ; Check if the Notepad process is running.
    Shutdown(BitOR($SD_SHUTDOWN, $SD_POWERDOWN))
Else
    ShellExecute('<PATH>\owexec.exe', '-c localhost -k <PATH>\Shutdown.exe')
EndIf

This will check if it the login screen it up, if it is, just shuts it down.  If not it runs the other script (owexec.exe runs it as the current user so the GUI shows up).

Back a$$ way of doing it, but it works.

Thanks for all your help!!!

  • 2 months later...
Posted (edited)

esullivan? So what is the final script you ended up with? And how does it look? Can it be set to reboot the client instead of shutdown?? It looks like a great option for rebooting clients or servers ...

Edited by charlesg7

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...