Question Locked

suppress logon script

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I stop logon scripts from running on a particular server when users logon to using their domain credentials (which normally triggers logon script to run)

5 replies

by churdoo

I can think of 2 ways. And I'm assuming your logon script is a .bat or .cmd file.

1) Apply a Group Policy to that server which will override the typical logon script setting so the server will not process the typical script.

2) The second and easiest, is in your logon script, test for the COMPUTERNAME environment variable and skip the working part of the script if COMPUTERNAME equals the particular server name, something like this

if "%COMPUTERNAME%"=="THISSERVER" goto end
(normal script statements here)
:end

This of course will not stop the script from processing, but will skip all of the statements within the script that do anything.

This discussion is closed to new replies.