Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to create a Logon script that works with Win2000 pro ....

Status
Not open for further replies.
Aug 21, 2001
8
US
Trying to create a Logon script that works with Win2000 pro. I want a certain file to laoded onto a users profile desktop or all users desktop. Any suggestion??
 
copy or xcopy filename C:\Documents and Settings\user name\Desktop ?
 
Is there any wildcard you can use instead of the actual username?
 
Do you mean something that represents the actual username logging on, so its generic? Think you can use %Username or
%Username% (can't remember which - have to go home and look!). Try it out.
 
You can use the following environment variables: <I cant remember if its the same path for win 2k>

%windir%\PROFILES\%USERNAME%\Desktop

or if you want to do it only for Windows 2000 then you can use the %os% environment variable: <note this example is for NT4> just type:

echo %os%

at 2000 cmd prompt for

If %os% EQU Windows_NT <action>


Hope this helps answer your question.
 
Take a look at a scripting program called kixstart (kixstart.org). It is a very powerful tool for writing all kinds of scripts including logins. It incorporates many wildcards for username, groupname, and computername.
 
HI.

Type &quot;SET&quot; in the command prompt of a W2K client machine.
You'll find all environment variables that can be used, I think that there is also one for the profile path.

Remember to check the %OS% variable in your script - if it is empty then the client is running Win9x probably.

I also suggest kixstart as alternative.

Bye
Yizhar Hurwitz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top