Jump to content

Does anyone knows of a "Relative paths" list?


Keeperos

Recommended Posts

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

Sure, 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 by Keeperos
Link to comment
Share on other sites


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

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

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

As 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

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

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

Thanks though, you've been really helpful both of you, appreciate it!

Cu

Link to comment
Share on other sites

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

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 by pmshah
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...