WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

wNT
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Reboot user with no shutdown privileges

Keywords:      wntRunAsUser intcontrol 67 Reboot a user shutdown privileges

Question:

Is there any Reboot a user that doesn't have shutdown privileges????

Answer:

Assuming you could give the currently-logged-in user the following rights...
"Act as part of the operating system"
"Increase quotas"
"Replace a process level token"

The code would look something like....

AddExtender("WWWNT34I.DLL")

curuser=wntGetUser(@DEFAULT)
Message("Current user:",curuser)

;run as new user with shutdown privledges
user="Administrator"
pswd="jumpinjackflash"

; Note do not use variable substitution  (ie. "%pswd%") 
; because on error it would display admin password.....
ret = wntRunAsUser( "", user, pswd, 2, 1)

newuser=wntGetUser(@DEFAULT)
Message("Running as new user:",newuser)

intcontrol(67,0,0,0,0)
exit
	

Article ID:   W14474
Filename:   Reboot user with no shutdown privileges.txt
File Created: 2001:03:01:14:16:54
Last Updated: 2001:03:01:14:16:54