Signum Posted July 2, 2009 Share Posted July 2, 2009 Hi, I need to create a new Environment Variable on a windows 2003 Terminal services box call "W2" inside %Userprofile%/local settings/application data. This will then hold a *.ini file. How do i go about setting this on the TS box so that it applies to all users both new and old as my domain admin account will only create it for that user even if i place it in User & System variables. Thanks Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/ Share on other sites More sharing options...
Guest Posted July 2, 2009 Share Posted July 2, 2009 I could be wrong, but I think sticking it in the C:\Documents and Settings\All Users\... etc folder will do the trick. Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/#findComment-591220706 Share on other sites More sharing options...
Signum Posted July 2, 2009 Author Share Posted July 2, 2009 I could be wrong, but I think sticking it in the C:\Documents and Settings\All Users\... etc folder will do the trick. My Mistake, i ment all of the users who login to the TS box no "All Users" Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/#findComment-591220792 Share on other sites More sharing options...
Guest Posted July 2, 2009 Share Posted July 2, 2009 My Mistake, i ment all of the users who login to the TS box no "All Users" I don't understand what you mean. The "All Users" directory are settings that are applied to all users. This means if you place a shortcut in the Desktop folder in the All Users directory a shortcut will appear there for everyone on that server. Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/#findComment-591220814 Share on other sites More sharing options...
sc302 Veteran Posted July 2, 2009 Veteran Share Posted July 2, 2009 is the ini file specific per user, user1 has different variables than user2 or are they the same? If they are the same if you apply it in the all users folder all users on the ts will have access to that ini that log on. also you could create a batch file that says if it doesn't exist to make directory and copy it, but that is a bit complicated to do, esp if you don't grasp the idea of the all users folder. google search "if exist" and look for any that refer to batch files, plenty of info out there to help you. Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/#findComment-591220866 Share on other sites More sharing options...
Signum Posted July 2, 2009 Author Share Posted July 2, 2009 Yes, the ini file is specific to each user, its only a problem on a ts box as it clears the TEMP folder out on logoff which it needs to do, just need it to place the ini file else where within each users profile so it holds the users settings. Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/#findComment-591220920 Share on other sites More sharing options...
Japlabot Posted July 2, 2009 Share Posted July 2, 2009 set the environment variable in the logon script Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/#findComment-591221258 Share on other sites More sharing options...
travelcard Posted July 3, 2009 Share Posted July 3, 2009 You need to use the Windows 2000 Resource Kit file setx.exe to set the environment variable as part of a logon script. Get it here: Win2k ResKit and use it like this: setx.exe W2 "%Userprofile%\local settings\application data" should work Link to comment https://www.neowin.net/forum/topic/792054-ts-environment-variables/#findComment-591227828 Share on other sites More sharing options...
Recommended Posts