TechTalkz.com Logo Ask the Experts!

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Windows XP

How to force the computer restart requirement via script ?

Windows XP


Reply
 
LinkBack Thread Tools Display Modes
Old 11-12-2007, 08:13 AM   #1
se2946
Guest
 
Posts: n/a
How to force the computer restart requirement via script ?

When the user changes the "computer name", the system requires "restart
computer".
And the exclamation icon appear onthe system's property window.

Does anybody know how to make a same situation programmatically ?
Is the setting in registry ?
(The exclamation icon is needed.)

I'm coding a script by vbs.
Thank you for help.
  Reply With Quote
Old 11-12-2007, 09:12 AM   #2
Pegasus \(MVP\)
Guest
 
Posts: n/a
Re: How to force the computer restart requirement via script ?


"se2946" <se2946@discussions.microsoft.com> wrote in message
news:75C75D55-12BE-4169-B615-20A704194965@microsoft.com...
> When the user changes the "computer name", the system requires "restart
> computer".
> And the exclamation icon appear onthe system's property window.
>
> Does anybody know how to make a same situation programmatically ?
> Is the setting in registry ?
> (The exclamation icon is needed.)
>
> I'm coding a script by vbs.
> Thank you for help.


Use shutdown.exe for a very simple solution.
Use Win32Shutdown if you prefer a complex approach.
Set objWMIService =
GetObject("winmgmts:{impersonationLevel=impersonat e,(Shutdown)}\\.\root\cimv2")
Set colOs = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOs in colOs
objOs.Win32Shutdown(x)
Next


  Reply With Quote
Old 11-12-2007, 09:12 AM   #3
gsjutla
Guest
 
Posts: n/a
RE: How to force the computer restart requirement via script ?

Try
wmic.exe ComputerSystem Where Name="%ComputerName%" Rename
Name="NewComputerName"

or

wmic:root\cli> COMPUTERSYSTEM where "Name='COMPNAME'" CALL Rename NEWNAME,
Password, User

"se2946" wrote:

> When the user changes the "computer name", the system requires "restart
> computer".
> And the exclamation icon appear onthe system's property window.
>
> Does anybody know how to make a same situation programmatically ?
> Is the setting in registry ?
> (The exclamation icon is needed.)
>
> I'm coding a script by vbs.
> Thank you for help.

  Reply With Quote
Reply

Thread Tools
Display Modes



< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +1. The time now is 04:00 AM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2011, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional