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 --