New
#1
Sleep mode
I use sleep mode on my pc. How to close running program automatic, when I start sleep mod, like hibernate mod.I use shortcut for sleep mod.
Best regards
I use sleep mode on my pc. How to close running program automatic, when I start sleep mod, like hibernate mod.I use shortcut for sleep mod.
Best regards
So, you are using a shortcut to put your system in a sleep mode.
And you want a running program to be closed just before your system will get into a sleep mode?
Well, if you do not care about unsaved data (or if your program saves data automatically) I can write a cmd script for you, which upon its start will kill a particular PREDEFINED exe program or several programs running and after that it will put your system into a sleep or hibernation mod. Let me know if it will work for you.
That will be nice,I not need to save my data before put pc to sleep mod.
I just use xbmc media center please write a script, thank you on your response.
Best regards
My shortcut have some line from C/windows/system32 I have sleep mode not hibernate XBMC is exe file in xbmc directory
or if I press alt+f4 I got window for shatdown I set for sleep mod
Best regards
Here is the script. However, it will pop up a UAC in the process, because taskkill command works only from an elevated prompt.
If you need a one click version of a script (without UAC prompt) you would have to install a small utility and I can rewrite a script for you. Let me know.
Hello Neutron16
I don't know how to thank you ,thank you a thousand times.
I do not want to look like an ungrateful,can you send my script with one click (without UAC prompt).
If is that trouble for you in that case ok.I am grateful for this script works perfectly.Thanks again
Best regards
Last edited by senna99; 26 Jan 2013 at 05:26. Reason: wrong spell
You are welcome.
It is not a trouble for me, rather potential threat/trouble for you. Creating a script that will do the job without UAC prompt would require storing your password openly in a text file.
That is a major disadvantage. Because a virus or a trojan could potentially find it and cause more harm. Also, it will require installation of some 3rd party software.
By the way, if you ever want to modify existing script, you can edit it in Notepad.
To make it kill more programs, add another line at the endInstead program.exe type file name of your program.Code:TASKKILL /F /IM program.exe
I understand what you say. Do you have a solution for cmd window to run minimized
annoys me black window visually. I've tried everything from the Internet. It still pops up a black window.
thank you once again for the script
Best regards
I not have pop up a UAC only cmd window. I just want to hide cmd window if possible.
I use windows 7 lite
Best regards