RE: Script or Other Method to Reboot
- From: v-tomche@xxxxxxxxxxxxxxxxxxxx (Tom Che [MSFT])
- Date: Fri, 20 Jan 2006 05:54:32 GMT
Hi,
Thanks for posting here.
>From your post, my understanding of this issue is: when the users try to
run a batch file to restart the computer, they get an error message saying
"A required privilege is not held by the client". If this is not correct,
please feel free to let me know.
Actually, to restart or shutdown the computer via Shutdown command, the
user must be a member of Administrators group. If you don't want to add
the users to Administrators group, you may try to use the following script
to run the batch file:
<package>
<job id="vbs">
<script language="VBScript">
dim wshShell
set wshShell=CreateObject("Wscript.Shell")
wshShell.run("runas /u:ADMINISTRATOR a.bat")
Wscript.Sleep 100
wshShell.AppActivate "Runas"
Wscript.Sleep 300
wshShell.SendKeys "PASSWORD"
Wscript.Sleep 100
wshShell.SendKeys "~"
Wscript.Sleep 100
</script>
</job>
</package>
Note:
1. Please change ADMINISTRATOR to the administrator account on the machine
2. Please change PASSWORD to the password of the administrator account
3. Please change a.bat to the file name of your batch file
You may copy above script to a text file and save as *.wsf file in the same
folder with the batch file. After run the script, any user can restart the
computer.
Hope this helps.
Have a nice day!
Sincerely,
Tom Che
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>Thread-Topic: Script or Other Method to Reboot
>thread-index: AcYdPJOkxASlZrXgQmekCi7/ojdyTg==
>X-WBNR-Posting-Host: 136.167.76.86
>From: "=?Utf-8?B?Q2hhcmxpZQ==?=" <baboon@xxxxxxxxxxxxxx>
>Subject: Script or Other Method to Reboot
>Date: Thu, 19 Jan 2006 13:09:03 -0800
>Lines: 19
>Message-ID: <2E0F1B09-7827-45E2-A7E3-CB7F49E0CC0D@xxxxxxxxxxxxx>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.windowsxp.configuration_manage
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.windowsxp.configuration_manage:38190
>X-Tomcat-NG: microsoft.public.windowsxp.configuration_manage
>
>Hi -
>
>This shouldn't be too difficult.
>I need to configure some shared machines so that regular users cannot
>shutdown, but can reboot.
>
>I can use Group Policy to Remove Shutdown from the Start Menu and Security
>Box, but then I need something for the user to click on to reboot the
machine
>when needed.
>
>I made a batch file using the Shutdown utility that contains the string
>"shutdown -r -d p:4:1", but when a regular user tries to run they get "A
>required privilege is not held by the client." Regular Users have the
right
>to shut down the machine and the "p:" switch is used, so I'm not sure why
a
>regular user can't use Shutdown in this case.
>
>In any case, can someone show me a script or some other method to do this?
>
>Thanks.
>
.
- Follow-Ups:
- RE: Script or Other Method to Reboot
- From: Charlie
- RE: Script or Other Method to Reboot
- Prev by Date: Files and Settings Transfer Wizard not showing Microsoft Office
- Next by Date: Re: Desktop Icons
- Previous by thread: Files and Settings Transfer Wizard not showing Microsoft Office
- Next by thread: RE: Script or Other Method to Reboot
- Index(es):
Relevant Pages
|