Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login Script - how to disable

Status
Not open for further replies.

itchibahn

ISP
Jan 20, 2005
6
0
0
US
Is there a way to disable login script for users loging into the server via remote desktop?

Every users have same login script set within the domain controller (WinSvr 2003 SBE). So no matter from which computer they login from, they would have network drives and printers mapped.

But 3 admin users, when logged into the server remotely using remote desktop, the login script to map the printers errors out. I would like to disable login script only for the remote desktop users. Is it possible?
 
If you are using vbscript i would just put some logic in it to either grab the computer or user name and exit the script if the computer name is the TS or one of the three users. Plenty of examples in the vbscript forum.




RoadKi11

"This apparent fear reaction is typical, rather than try to solve technical problems technically, policy solutions are often chosen." - Fred Cohen
 
If you're not using VBScript, and using old school Batch Files, you can do something like this (where COMPUTER1 is the computer where they get no printers):

------------------------------ Start
rem put common actions here
rem things that must happen on every system

rem Map regular drive letters, etc

goto wherearewe

:wherearewe
if /i %COMPUTERNAME%==COMPUTER1 goto computer1
goto fatsidepc

rem If we're on a regular computer, run these commands...
rem
:fatsidepc
echo We're on a Regular Computer

rem things we do if we're on a regular computer
rem map printers, etc


goto ending

rem If we're on Computer1, run these commands...
rem
:computer1
echo You're Logged Into Computer1
echo and you're not going to get printers
goto ending

:ending

rem Finish up with things that must happen on every computer
--------------- Stop

Hopefully, I've given you a template you can use with all sorts of Environment Variables like USERNAME, CLIENTNAME, LOGONSERVER, etc. To see a full list, drop to a command prompt and type:
SET
(then hit enter).

-Steve
 
Is your login script assigned via the user account or group policy? If it's group policy, you could also block that policy from being applied to your remote server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top