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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login script problem using winset and putinenv

Status
Not open for further replies.

ClareSnyder

IS-IT--Management
Oct 23, 2001
53
CA
I need to do some login script automation running win98SE machines on a 2000 server.
I am setting the username environment variable using putinenv.exe and winset.exe.

I can make them work in the login.bat by calling the batchfile "setenv.bat" on the local C:drive, but then the system hangs with the message "Please wait while your login script executes....."

Hitting the "cancel" button on the screen carries through with no more problems.

Setenv.bat is:
putinenv l/username
winset username=%username%

Setenv.bat, putinenv.exe, and winset.exe are all currently in the root directory of the local workstation hard drive, as well as in the scripts directory of the win2000 server.

I'm stymied.
 
Have you tried getting rid of the CALL statement - by merging the two files together?
 
HI.

I did not try the tools you mentioned, but you can also try other tools, like:


Or my own NETRUN utility that can pass username as a parameter to your batch file:

You can also use VBScript, it is quite simple and very powerful:



Yizhar Hurwitz
 
ashpp is right, merge your files together, there was problems with 'call' in loginscripts for me too.
If this not helps, insert 'pause' after each command in your bat files, perhaps you will see some outputs on the screen and can trace your problem.

===
Karlis
ECDL; MCP
 
OK, putting the commands directly into the batch fixed the hangup - now I'm trying to make the workstation map a user directory according to the username. In the \\server-2000\library\ directory is a folder called winfax (matches user name)
I have tried several ways to net use the directory, and I allways get "error 50: you attempted an operation that cannot be performed from your computer or that is not supported on the specified server for the command or task that you want to perform. If the problem persists, contact your network administrator"

I'm the administrator and I have not seen this before.

Again, I'm stymied.

HELP!!!
 
OK, I figured it out. EACH user folder needs to be shared, and net us U:\server-2000\%username makes it work.

Thanks guys!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top