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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login Scripts 1

Status
Not open for further replies.

PeterL

IS-IT--Management
Joined
Oct 30, 2000
Messages
129
Location
US
Anyone know how I can test the OS of the users machine during logon. I want to run certain commands based upon the OS. I have users who connect via Citrix and therefore don't want certain mappings to take place.
Thanks
 
Very simple. You can query system variables within your logon script. I.E. If "%OS%" == "Windows_NT" net use H: \\servername\sharename
However, I think that in the Terminal Server and/or Citrix environment this query will return the %OS% of the server itself and not the client as the client session actually runs on the server. I cannot verify this as I do not have any clients other than NT. If this does not work than you can look for the existence of some file unique to each client OS. I.E. If exist "V:\NTLDR" net use H: \\servername\sharename Keep in mind that by default (determined during server build) the client C:\ drive will re-map to V:\, unless the server C:\ has been re-maped instead.
Remember that the match is case sensitive. Become familiar with the values returned by the “set” command. This script should be the one you would use to execute your published application.
Let me know what works out best for you.
-- Devil Dog --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top