HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Software Newsgroups > Windows XP

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 12-11-2007, 07:06 AM
se2946
 
Posts: n/a
Default 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
Sponsored Links
  #2  
Old 12-11-2007, 07:17 AM
Pegasus \(MVP\)
 
Posts: n/a
Default 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
  #3  
Old 12-11-2007, 07:19 AM
gsjutla
 
Posts: n/a
Default 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
Sponsored Links
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to force a computer to log off? ngan adams Windows XP 3 11-06-2007 03:27 PM
Computer may not restart from Sleep RiverDog Windows Vista 6 09-30-2007 11:10 PM
Please, give me a shortcut to force a restart to Windows Explorer Juan I. Cahis Windows Vista 5 08-20-2007 08:30 PM
Can't force remote shutdown/restart from RDP session no_spam_paquette@uwo.ca Windows Vista 8 06-19-2007 06:27 PM
Computer Restart at Shutdown Rejean Windows XP 0 05-23-2007 12:16 AM


All times are GMT. The time now is 02:46 AM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger