change log off into restart

A

Ahmed

helloo
is there any way that we can change log off behaviour into restart. in other
words if a user press log off the computer will restart.
i tried to put a batch file in the log off policy with the command shutdown
-r but it didnt work coz the user does not have permission for some reason.
 
G

Guest

From a programming point of view you can do it in 2 ways:

1) Hook the keyboard
2) Disallow the logoff privilege then use token privileges to turn that into
restart using the ExitWindowsEx API
 
B

Bernd

-------- Original-Nachricht --------
helloo
is there any way that we can change log off behaviour into restart. in other
words if a user press log off the computer will restart.
i tried to put a batch file in the log off policy with the command shutdown
-r but it didnt work coz the user does not have permission for some reason.

There was a tip from MS for Win2K, don't know if it works for XP:

Setting the Default Logoff Choice

You can configure the default option implemented when the user selects
logoff. The following list shows the option and the value you would use.

0 Logoff

1 Shutdown

2 Shutdown and Restart

3 Shutdown and Power Off*

Root Key: HKEY_CURRENT_USER
Key: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Shutdown
Entry: LogoffSetting
Data Type: REG_DWORD

It's from

http://technet.microsoft.com/en-us/library/bb742541.aspx

Bernd
Bernd
 
A

Ahmed

does not work on XP

Bernd said:
-------- Original-Nachricht --------


There was a tip from MS for Win2K, don't know if it works for XP:

Setting the Default Logoff Choice

You can configure the default option implemented when the user selects
logoff. The following list shows the option and the value you would use.

0 Logoff

1 Shutdown

2 Shutdown and Restart

3 Shutdown and Power Off*

Root Key: HKEY_CURRENT_USER
Key: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Shutdown
Entry: LogoffSetting
Data Type: REG_DWORD

It's from

http://technet.microsoft.com/en-us/library/bb742541.aspx

Bernd
Bernd
.
 
A

Ahmed

dont understand what you are talking about actually. if u think it can be
done so please explain it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top