esullivan Posted March 7, 2015 Author Share Posted March 7, 2015 Followup question. Will this work if no one is logged in? Just countdown then turn off? Link to comment Share on other sites More sharing options...
TheDcoder Posted March 8, 2015 Share Posted March 8, 2015 Will this work if no one is logged in? No EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
esullivan Posted March 8, 2015 Author Share Posted March 8, 2015 (edited) Well crap. Is there a way to get it to? Or better, if no on is logged in, just shutdown? Edited March 8, 2015 by esullivan Link to comment Share on other sites More sharing options...
TheDcoder Posted March 9, 2015 Share Posted March 9, 2015 Well crap. Is there a way to get it to? Or better, if no on is logged in, just shutdown? I don't know how its done.... TD EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
esullivan Posted March 9, 2015 Author Share Posted March 9, 2015 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. Link to comment Share on other sites More sharing options...
esullivan Posted March 10, 2015 Author Share Posted March 10, 2015 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!!! Link to comment Share on other sites More sharing options...
charlesg7 Posted May 28, 2015 Share Posted May 28, 2015 (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 May 28, 2015 by charlesg7 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now