Sign in to follow this  
Followers 0
supraspecies

This program is preventing Windows from restarting

9 posts in this topic

#1 ·  Posted (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 by supraspecies

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#3 ·  Posted

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.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

nice, hopefully /f works reliably (I also like "-t 0" so that it happens immediately).


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#5 ·  Posted

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.

Share this post


Link to post
Share on other sites

#6 ·  Posted

how about something like:

run("taskkil /IM /F 'Facebook_Chat_portable.exe'")

instead of processclose being all nice about it.


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by supraspecies

Share this post


Link to post
Share on other sites

#8 ·  Posted

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


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by supraspecies

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