Hello
This isn't really a scripting issue but I'm sure I'm not the only one here who's experienced this issue and as I've found this forum to be the most helpful I'm posting this here (as well as in the Windows XP forum).
I've been trying to find a solution to this over the past day or so but I'm just not getting anywhere.
I have a batch file that does a 'user-friendly' reboot. I need to run it under the context of either the domain Administrator or the local Administrator account. The problem is that if the batch file runs under anything other than the current console user the output doesn't display (apart from the psShutdown GUI).
I've tried the command line as just the name of the batch file, I've tried
and
and
and even
I've even tried it as a .VBS file
but the effect is always the same, only the psShutdown GUI appears.
Is it possible to get the output to appear under these circumstances?
For reference, here's the batch file
JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, and so on)[/small]
This isn't really a scripting issue but I'm sure I'm not the only one here who's experienced this issue and as I've found this forum to be the most helpful I'm posting this here (as well as in the Windows XP forum).
I've been trying to find a solution to this over the past day or so but I'm just not getting anywhere.
I have a batch file that does a 'user-friendly' reboot. I need to run it under the context of either the domain Administrator or the local Administrator account. The problem is that if the batch file runs under anything other than the current console user the output doesn't display (apart from the psShutdown GUI).
I've tried the command line as just the name of the batch file, I've tried
Code:
"CMD /C reboot.bat"
Code:
"CMD /K reboot.bat"
Code:
"CMD /K Start reboot.bat"
Code:
"CMD /K call reboot.bat"
Code:
"cscript //nologo reboot.vbs"
Is it possible to get the output to appear under these circumstances?
For reference, here's the batch file
Code:
@echo off
color 9f
setlocal
psshutdown -e p:4:1 -t 15 -r
cls
echo.
echo.
echo. ******************************************
echo. * Rebooting this PC in 60 seconds. *
echo. * *
echo. * To cancel the shutdown, activate this *
echo. * window then press any key. *
echo. * *
echo. ******************************************
echo.
pause>nul
psshutdown -a
cls
echo.
echo. ******************************************
echo. * Shutdown aborted! *
echo. ******************************************
echo.
echo. Press any key to continue . . .
pause>nul
exit
JJ
[small][purple]Variables won't. Constants aren't[/purple]
There is no apostrophe in the plural of PC (or PST, or CPU, or HDD, or FDD, and so on)[/small]