[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Windows 7 - Shutdown from command prompt

Posted on 2013-06-28
8
Medium Priority
?
656 Views
Last Modified: 2013-07-10
I have a simple command file that performs a Windows shutdown with a message & timeout that works as intended when the command file is executed manually, but if I use the group policy editor -> shutdown script and reference my cmd file, and I do a Start->Shutdown, I don't see the message in my cmd file being displayed?

Any help is appreciated.

Thanks

shutdown /r /t 5 /c "Shutting Down"

Open in new window

0
Comment
Question by:arunykand
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 11

Expert Comment

by:Pradeep Dubey
ID: 39285177
See the remark on the given link:

If you specify major and minor reason codes, you must first define these reason codes on each computer where you plan to use the reasons. If the reason codes are not defined on the target computer, Shutdown Event Tracker cannot log the correct reason text.


http://technet.microsoft.com/en-us/library/cc732503(v=ws.10).aspx
0
 

Author Comment

by:arunykand
ID: 39285204
Ok, so I followed the example on the link above (shutdown /r /t 60 /c "Reconfiguring myapp.exe" /f /d p:4:1) and when called from the group policy shutdown script, it still does not display the message....

Am I missing something?
0
 
LVL 11

Expert Comment

by:Pradeep Dubey
ID: 39285240
I did the same thing in my machine and I'm getting this msg msg

i use simple bat file. which i run from command prompt.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:arunykand
ID: 39285265
I can get it to execute as intended if I run it manually from a batch file or a cmd file, that is not the issue.  If I use group policy editor and use the shutdown script option, and set the location of the script to my script (C:\shutdowntest.cmd) and refresh my group policy, then I manually go to start menu -> shutdown, I am not getting the "message" to pop-up before shutting down.
0
 
LVL 11

Expert Comment

by:Pradeep Dubey
ID: 39285351
Are you an administrator of that machine (check permissions once again)
0
 
LVL 9

Expert Comment

by:TunerML
ID: 39285354
I think you need a scribt that just displays a message as the system would already be shutting down when you use the shutdown option, therefore re-excecuting the shutdown command is probably where the issue is. You need to just display a message really if I understand properly what your trying to acomplish.
0
 

Author Comment

by:arunykand
ID: 39285517
I thought about that too, trying to do a shutdown manually as well as the shutdown script calling shutdown could be screwing me up.....and Yes, i'm basically looking to display a message as the system is shutting down....Any hints?

Thanks
0
 
LVL 71

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 39286849
Use
  msg * /time:5 "Shutting Down"

Open in new window

instead. That will display a message box for 5 seconds, while the shutdown progresses.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question