Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Some errors about running the command automatically before shut down

29 Nov 2013   #1
ytyyutianyun

Windows 7 Ultimate x64
 
 
Some errors about running the command automatically before shut down

A program often block the computer to shut down, so I want to run the command before shut down.

I run the bat :
Code:
 taskkill /f /im ZuoYou.exe
And I do the follow







But nothing happens, why?



My System SpecsSystem Spec
.
29 Nov 2013   #2
Ztruker

Windows 10 Pro X64
 
 

The name shown in the error message is not ZuoYou.exe.

The taskkill command /IM xxxxxxxxx has to be an exact match.

What does tasklist in a Command Prompt window show the name to be?
My System SpecsSystem Spec
29 Nov 2013   #3
ytyyutianyun

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by Ztruker View Post
The name shown in the error message is not ZuoYou.exe.

The taskkill command /IM xxxxxxxxx has to be an exact match.

What does tasklist in a Command Prompt window show the name to be?
Thanks for reply, and I think it is not the reason because if I run the command alone, it does kill the program.

And the picture as follows.
My System SpecsSystem Spec
.

30 Nov 2013   #4
ytyyutianyun

Windows 7 Ultimate x64
 
 

I make the shut down command visible, and find it runs not before

But after, that means I cannot automatically close the program when the window appears. So can anyone helps me to automatically close the program? Thanks
My System SpecsSystem Spec
30 Nov 2013   #5
Ztruker

Windows 10 Pro X64
 
 

Perhaps the batch file needs to be run as Administrator? Not sure how you accomplish that in a shutdown sctipt though.
My System SpecsSystem Spec
30 Nov 2013   #6
ytyyutianyun

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by Ztruker View Post
Perhaps the batch file needs to be run as Administrator? Not sure how you accomplish that in a shutdown sctipt though.
No, Now I know the mechanism, windows 7 runs the script only after it closes all the program. But Against the original intention. Because windows 7 cannot close the "Zuoyou", so it cannot run the script. And then I use the PS

Code:
stop-process -name ZuoYou
Start-Sleep -s 1
stop-computer -computername localhost

and these measures are temporary. Now I am learning the Autohotkey, and it may help me run the command immediately when I press the 'shutdown' button.
My System SpecsSystem Spec
Reply

 Some errors about running the command automatically before shut down




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Is there a command to shut down explorer.exe cleanly?
Hi everybody. I'm looking for a way to properly shut down explorer.exe using a command. What do I mean by this? Well, explorer keeps a lot of its preferences you have changed in its memory. When explorer.exe is closed properly (e.g. when you log off) it will write these changes to the registry....
General Discussion
My pc open file automatically, then automatically shut down
My pc open file automatically, then automatically shut down when I running my pc, it create pop up sound then open file automatically then pc get shut down. watching any video file, this create more problem. when i scan all of my hard drives but any virus or virus activity didnt appear....
General Discussion
New build will automatically start from being shut down
I just finished building my new desktop and it's running great, aside from the fact that I can shut it down, and then somewhere within the next 20 mins or so, it'll restart itself. I checked yesterday, and turned of WOL and PME, and confirmed both in the BIOS, yet it still starts up on it's own. ...
PC Custom Builds and Overclocking
Setting up computer to shut off automatically.
I have figured out how to get my computer to shut off at a certain time every day using task scheduler to shut down everyday at 1:00am. I need help getting my computer to only do this 6 days a week as every Sunday at 12:00am I run a complete virus scan and do not want my computer to shutdown during...
General Discussion
MemTest86 Errors Questions - 72 errors recieved when running after 3hr
I was hoping that someone may be able to help me decipher what sort of error messages I encountered as a result of running MemTAest86 for a few hours. I have gotten 72 error messages, and I have no way of knowing how severe these messages are. Any help would be appreciated.
Hardware & Devices
win 7 7000 shut down automatically
hi guys, wierd thing happened to me in the last 2 days. i dont know after how much time but the computer is shuting down automatically and i dont know why. at first i thought its electric thing but its not that and now i think its because the window. am i right? if some1 saw that in his...
Performance & Maintenance


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:52.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App