11 replies
by mckaytech
The %whatever% syntax is used to pull environment variables into a batch file and then use them somehow. So it's simply a substitution mechanism that allows a batch file to behave differently depending on the environment variables on that machine.
To see what various words it can be used with, just go to a command prompt and type "set" and hit enter. The list that will appear shows the current environment variables and their contents.
For instance, the logon server is called just that and you could display that with the statement "echo I was authenticated by %logonserver%" and on your display, you would see "I was authenticated by \\ntpdc01".
paul
by eltonsipes
by robshan
I assume you are talking batch files. %WORD% will subsitute the value of the environment variable word. eg
Echo %COMPUTERNAME% will execute as Echo WORKSTATION09
Some useful ones
LOGONSERVER - The server that validated the logon
USERNAME - Username
USERDOMAIN - User's Domain
USERPROFILE - Location of profile directory
Type SET at the command line for a full list.
by eltonsipes
by mike
You want login script POWER!! use the KIX script processor on the Resource kit, it is a mix of Basic/C commands and gives you AWESOME flexibility, ie: adding registry entreis, gui response boxes, errorlevel returns if member of group etc, and MUCH MUCH MORE. Very few org's use this program, but it is EXTREAMLY Powerfull!!!
Good Skill
Mike
by eltonsipes
by eltonsipes
by raf__2
I agree with Mike's answer above, but get to the latest version of Kixtart, not the one on the Resource Kit. Go to http://www.kixtart.org
RAF
by eltonsipes
by eltonsipes
by eltonsipes
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending