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: Auto Shutdown with prompt


29 Nov 2012   #1

Windows 7 Ultimate x64
 
 
Auto Shutdown with prompt

Hi all,

I wonder if anyone can help with a batch file that is not co-operating.

The intent of the batch file is the following: When the user shuts down the computer, it should prompt the user if maintenance batch jobs (defrag etc.) are to be run. The user can then choose to run the maintanance jobs or to just shut down the computer without running the jobs

The first part works ok: When the user shuts down the computer, the batch file starts running (This is accomplished this via the group policy)

The next part, the prompt, does not work. I am using the CHOICE command which works well enough if I run the batch file "stand-alone" but it does NOT work if I am running it through the group policy. I found the following possible explanation on another thread: "A shutdown script runs under the System Account, so won't have a visible window, plus when the script is run, the system has already switched to the logon/logoff desktop which would hide it anyway."

The question now is, how can I make that prompt visible and accept input from the user? (If possible, I would like to avoid having to learn powershell, vbs etc.)

Your help is greatly appreciated

My System SpecsSystem Spec
.

Reply

 Auto Shutdown with prompt




Thread Tools



Similar help and support threads for2: Auto Shutdown with prompt
Thread Forum
Solved Can you set PC to auto shutdown in power saver? Performance & Maintenance
Command Prompt Shutdown problem Network & Sharing
auto shutdown when i try to install W7 General Discussion
Solved Auto shutdown batch file help General Discussion
Auto shutdown and startup Software
Defragging problem with auto shutdown? Software
Windows Auto Shutdown - Help Hardware & Devices

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 01:38 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33