Keeperos Posted July 25, 2006 Share Posted July 25, 2006 (edited) Hi, I just started making custom installation CDs to save me from the pain of installing all those programs I need whenever a clean install (or helping a friend) is in order.For that reason the problem of knowing more "relative paths" other than %SystemDrive%, %WinDir% / %SystemRoot%, %UserProfile% and %ResourceDir% (whenever that last one decides to work) becomes more painfully apparent.Right now AT THE VERY LEAST I need to know the relative path for:C:\Documents and Settings\All Users\Start Menu\ProgramsSure, using %SystemDrive% instead of C:\ (or the crazier "%UserProfile%\..\All Users\Start Menu\Programs\") probably is safe to use for almost any EN Windows based scenario, however I encounter Windows installations in a different language and thus the need to know the relative path for the above is evident...So, if you have a document, a URL or the general knowledge to help me that would be great.All help is greatly appreciated! Edited July 25, 2006 by Keeperos Link to comment Share on other sites More sharing options...
No6 Posted July 25, 2006 Share Posted July 25, 2006 Hi, I just started making custom installation CDs to save me from the pain of installing all those programs I need whenever a clean install (or helping a friend) is in order.For that reason the problem of knowing more "relative paths" other than %SystemDrive%, %WinDir% / %SystemRoot% and %ResourceDir% (whenever that last one decides to work) becomes more painfully apparent.Right now AT THE VERY LEAST I need to know the relative path for:C:\Documents and Settings\All Users\Start Menu\ProgramsSure, using %SystemDrive% instead of C:\ probably is safe to use for almost any EN Windows based scenario, however I encounter Windows installations in a different language and thus the need to know the relative path for the above is evident...So, if you have a document, a URL or the general knowledge to help me that would be great.All help is greatly appreciated!I don't know of a list per se, but here's a couple paths that I use:%AllUsersProfile% = %SystemDrive%\Documents and Settings\All Users%UserProfile% = %SystemDrive%\Documents and Settings\%UserName%The deeper paths can be extrapolated for the above. Link to comment Share on other sites More sharing options...
CoffeeFiend Posted July 25, 2006 Share Posted July 25, 2006 They aren't called "relative paths" but rather environment variables (leftovers from the DOS era)To see the list, drop to a command line (start -> run -> cmd) and type "set" (w/o the quotes obviously) and enter... Tada!BTW, what you're looking for is ALLUSERSPROFILE (first one on the list), so:%ALLUSERSPROFILE%\Start Menu\ProgramsAs for non en/en-US or whatever versions, I'm not sure what "start menu" or "programs" is named (or if they even change name). If you knew the other names, it would be easy to handle, but the command line environment (well, batchfiles I mean) is kinda limited... You might be able to export some infos from the registry too and rely on that (from a place like HKLM\Soft\MS\Win\CurVer\Explorer\Shell Folders\), but then again, they might have translated the registry key's names too or something. There's got to be a way, but I don't have any non-english versions of windows, so I can't be of much help for that. Link to comment Share on other sites More sharing options...
Keeperos Posted July 25, 2006 Author Share Posted July 25, 2006 Wow, set, that simple... I'm impressed...THANK YOU A LOT, both of you!!!I'll check that one later.See ya!!! Link to comment Share on other sites More sharing options...
Bezalel Posted July 25, 2006 Share Posted July 25, 2006 For your own unattended CD checking the registry for the location of certain shell folders seems to be overkill. The only situation you would need to do this is if you want to use the same scripts for multiple languages. Link to comment Share on other sites More sharing options...
Takeshi Posted July 25, 2006 Share Posted July 25, 2006 User specific shell folder locations are stored in:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell FoldersThe HKLM key stores the locations of common folders Link to comment Share on other sites More sharing options...
Keeperos Posted July 26, 2006 Author Share Posted July 26, 2006 Packages, I want to use my packages for multiple installations, however, if the start menu\programs path doesn't change then I'm fine.If it does, worst case scenario, I'll need to make two different packages, I don't work for the EU or sth Thanks though, you've been really helpful both of you, appreciate it!Cu Link to comment Share on other sites More sharing options...
spacesurfer Posted July 26, 2006 Share Posted July 26, 2006 type set /? in command prompt to list all environment variables. Link to comment Share on other sites More sharing options...
pmshah Posted July 26, 2006 Share Posted July 26, 2006 They aren't called "relative paths" but rather environment variables (leftovers from the DOS era)They are environmental variables but not leftovers from the DOS era, they are used even today by most systems working at the command prompt, even Linux & Unix where they originated.You need them because your %systemdrive% may not necessarily be "c:" if you chose a different partition for installation. Same holds true for other variables too. Link to comment Share on other sites More sharing options...
pmshah Posted July 26, 2006 Share Posted July 26, 2006 (edited) type set /? in command prompt to list all environment variables.The above command will give you the syntax for using the set command. You can redirect this to a text file for printing out for ready reference for using in batch files.The see all the values, correct command would be simly set -> enter in a command window.To get all the variables simply run "set >> set.txt". Then youhave all the variables & values in a text file which can be printed out for easy reference. Edited July 26, 2006 by pmshah Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now