Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Greetings. I am currently working in a large multiuser environment where we are trying to implement a login script that will do an automatic install for users who log on with a special UID. Since this UID will have administrator rights, we want to ensure that if the network drive is unavailable for some reason that the batch file won't simply end and leave the User logged on with these rights (if the drive is connected successfully we copy the resource kit file shutdown to reboot the machine). The problem is that there doesn't seem to be an easy way to do this in NT with ONLY the files included with the standard Windows NT install (or one we can create with debug).
What we've tried:
1. Having the script create a small DOS reboot.com file with debug to reboot. This didn't work in NT.
2. Running the command rundll32 user32,ExitWindowsEx. This worked sometimes but not ALL the time for some reason. Also, even when it worked it only logged off the user but didn't reboot. There appears to be an InitiateShutDown API call but I didn't have any success with that at all.
Does anyone have ANY suggestions??? An EMAIL RESPONSE would be GREATLY appreciated! Thanks.
Paul.
mailto:Paul@firepower.org

Hello Paul,
Would a .exe that sends a reboot signal to the OS to
shutdown without prompting the user be ideal for you?
If so I could write and compile a script to that and email
it to you in a matter of minutes. The last thing in your
script would be a call to the one I will write to reboot the
system. Let me know.Regards,
Anthony Brown

Anthony,
We've had the same problem trying to reboot NT. Could you please send us a copy of the .exe file you created?
Thanks in advance.
Regards,
Anna

This batch file should reboot on windows NT:
@ECHO OFF & cd/d %temp% & echo [version] > {out}.inf
(set inf=InstallHinfSection DefaultInstall)
echo signature=$chicago$ >> {out}.inf
echo [defaultinstall] >> {out}.inf
rundll32 setupapi,%inf% 1 %temp%\{out}.inf
del {out}.inf

I would like to have that .exe also. I need to reboot the nt server at a predetermined time and use a freeware program called JIT to set the time of reboot. Thanks.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |