Re: Anyone knows how to.....
Got this off some pro site.
You can use the Msgbox function to display a Yes/No dialog box, as the following example shows:
Ret=Msgbox("Are you sure you want to reboot?",VBYesNo,"Reboot Confirm")
Ret is variable that contains the Msgbox return code, which varies depending on the button the user pressed (Yes returns a value of 6; No returns a value of 7). The parentheses contain the question text; the VBYesNo constant, which tells VBScript to display Yes and No buttons; and the dialog box title. The figure at Figure shows the Yes/No box that the code example produces.
The following code shows how to use the Msgbox function in a script:
Ret=Msgbox_
("Are you sure you want to reboot?",VBYesNo,"Reboot confirm")
If Ret=6 then
Set OpSysSet =
GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery_
("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Reboot()
next
end if