Discussion Locked

Disable Close (X) Button On Login Script

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can I disable the close (X) button for a login script while it's executing on a user's machine?

2 replies

by ann777

You cannot disable the close button for one program (or script) and then have it work for any other program.

If your users close the logon script window, hide it.

Navigate to HKEY_USERS\\Console

Edit or Add Value the following two REG_DWORD values:

WindowSize and with the Radix at Hex, set it to 05000d

WindowPosition and with the Radix at Hex, set it to 03FC0000

This makes the Window very small and positions it off screen so they can't see it and hence can't close it.

If when running a command prompt, this windows is invoked, just maximize it, right click the title bar, and size/position it using the Layout tab in Properties. When you click OK, check Modify shortcut....

This discussion is closed to new replies.