Jump to content

Recommended Posts

Posted

Hello Friends,

A Little Confused By These Variable's

%SystemFolder% Ok

%AllUserProfile% Ok

What About

1, Program Files

2, Current User

3, System Drive

4, etc

What All Are There If SomeOne Help Me Thanks And Waiting.


Posted

%UserProfile%=Location of the currently logged on user

%ProgramFiles%= location of all the program files

%SystemDrive%=what drive the System files are loaded on.

Posted

%SystemFolder% doesnt exist, it is %systemroot%

%AllUserProfile% Ok

What About

1, Program Files is %PROGRAMFILES%

2, Current User is %USERPROLFILE%

3, System Drive is %systemdrive%

4, etc

If you go to a cmd window type set|more to see all system variables.

Posted

If you have XP.

Go to Help and support centre in start menu, run it.

Type "command shell overview" in search.

The variables are there to view.

Posted

%SystemFolder% doesn't exist, it's %SystemRoot%

%AllUserProfile% doesn't exist, it's %AllUsersProfile%

What About

1, Program Files is %ProgramFiles%

2, Current User is %UserProfile% (to get just the name, not the folder, use %UserName%)

3, System Drive is %SystemDrive%

4, etc

:) but, like the rest said, you can find all the variables when you type set in the cmd window.

Posted (edited)

so you would like to know a list of all variables??

START>RUN
CMD.EXE
SET

edit: the list of variables work on a win32 environment, but some of them like %APPDATA% won't work until logged

Edited by SiMoNsAyS
Posted

Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks

1000 Time's

Posted

Thanks for that, helps me.

But, set, doesn't show the path for the user "Default User", who is this? as some things in here are used by all users, like Accessibilty and remote assistance.lnk and i can't quite work out how to delete this folder and shortcut.

Any assistance, appreciated.

Posted
just for note =>

%userprofile% relates to the Default User account

NO IT DOESN'T!

%USERPROFILE% = the location of the currently logged in users profile. I.e. C:\Documents and Settings\Administrator or C:\WINNT\Profiles\joe.

The only time that %USERPROFILE% points to the Default User profile is during setup (cmdlines.txt) or before anyone has logged in.

If you're writing a script and need a variable to point to the Default User profile - you have to make it yourself like this:

SET DEFAULTUSERPROFILE=%USERPROFILE%\..\Default User

Posted
%AllUserProfile% doesn't exist, it's %AllUsersProfile%

Good eye! :)

Add to your collection: %homedrive% is definitely C: drive regardless it's being your system drive or not.

Just type it in Run box and see.

Posted

@mazin:

%HOMEDRIVE% is the drive where your profile resides.

D:\Documents and Settings\mazin

HOMEDRIVE is D:

HOMEPATH is \Documents and Settings\mazin

@Nois3

The %USERPROFILE% is the default profile in setup, which is probably the best time to set the variable. It may also not also have the name Default User, but can instead be Default User.COMPNAME. Either pulling from the registry, or setting it during setup is the best solution here.

Posted

OK, so if %USERPROFILE% isn't Default User, what is?

As it holds the path to Accessibility folder and also Sytem Tools and I need these removed, and all other SET variables do not work.

Thanks

Posted
OK, so if %USERPROFILE% isn't Default User, what is?

There is no environment variable for default users profile.

Add this line to your .bat file, then %DefaultUser% will point to "Default User"

set DefaultUser = "%Allusersprofile%\..\Default User"

Posted
set DefaultUser = "%Allusersprofile%\..\Default User"

You will not find default user profile in all users profile dir?

Instead you may have to use the long way instead. ;)

Set DefaultUser = "%Systemdrive%\Documents and Settings\Default User"

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