supraspecies Posted June 14, 2017 Share Posted June 14, 2017 (edited) I'm using a portable Facebook messenger which I feel feel very comfortable with. Problem - every time "This program is preventing Windows from restarting" on restarting. I need to shut this piece of crap down. Any suggestions? I don't mind making a wrapper. For example a script that will detect shutdown and force-terminate this messenger. Anything will do. A change to manifest, maybe? Any methods. Lay out any of your best guesses, I just need this portable messenger to stop preventing restart/shutdown. As always, thanks a bunch, Maybe terminate it OnAutoItExit. No idea. Edited June 14, 2017 by supraspecies Link to comment Share on other sites More sharing options...
iamtheky Posted June 14, 2017 Share Posted June 14, 2017 (edited) why not just run("shutdown /f")? Because if you crash it, then it can't prevent the restart. Or sure just take it out of startup or the runonce key or wherever it is... Edited June 14, 2017 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
supraspecies Posted June 14, 2017 Author Share Posted June 14, 2017 15 minutes ago, iamtheky said: why not just run("shutdown /f")? Because if you crash it, then it can't prevent the restart. Or sure just take it out of startup or the RunOnce key or wherever it is... Didn't understand what "shutdown /f" does exactly. And no, it's not in Run or RunOnce - I am interested in running this portable Facebook messenger manually.... as long as it shuts down fine. Link to comment Share on other sites More sharing options...
iamtheky Posted June 14, 2017 Share Posted June 14, 2017 nice, hopefully /f works reliably (I also like "-t 0" so that it happens immediately). ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
supraspecies Posted June 15, 2017 Author Share Posted June 15, 2017 Still can't get it to work. Here's my script: OnAutoItExitRegister ('_Exit') FileInstall('Facebook_Chat_portable.exe', @TempDir & '\Facebook_Chat_portable.exe') ShellExecute(@TempDir & '\Facebook_Chat_portable.exe') While 1 WEnd Func _Exit() ProcessClose('Facebook_Chat_portable.exe') ProcessWaitClose('Facebook_Chat_portable.exe') FileDelete(@TempDir & '\Facebook_Chat_portable.exe') EndFunc It generally works. It kills the chat window that prevents Windows from restarting. But instead of While 1 I need to give it a condition "wait for restart" - so that my script will exit and take down chat with it, allowing Windows to restart fine. I've searched forum and Help file like mad, but what I found was somewhat beyond by skill. Link to comment Share on other sites More sharing options...
iamtheky Posted June 15, 2017 Share Posted June 15, 2017 how about something like: run("taskkil /IM /F 'Facebook_Chat_portable.exe'") instead of processclose being all nice about it. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
supraspecies Posted June 15, 2017 Author Share Posted June 15, 2017 (edited) Nice or not isn't the point. Whatever I do, I need my script to do it when computer restarts\shuts down\hibernates, etc. I need to tie that chat kill to some action, so that script understands that computer is trying to restart\shut down\hibernate, etc . Tie to what? How? Edited June 15, 2017 by supraspecies Link to comment Share on other sites More sharing options...
iamtheky Posted June 15, 2017 Share Posted June 15, 2017 If you need it everytime (and not just manually triggered shutdown/restart events), I would drop it in group policy gpedit.msc-->Computer Configuration-->Windows Settings-->Scripts-->Shutdown ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
supraspecies Posted June 16, 2017 Author Share Posted June 16, 2017 (edited) Yes, that's a great idea, thank you. How would I add a group policy script with AutoIt (I'd like everything to be done automatically)? I'm guessing it would be adding something to the registry? EDIT: I solved my problem. Thank you very much for your help. Everything is done and working properly now. Edited June 16, 2017 by supraspecies 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