Login script to windows 2000

February 20, 2009 at 01:49:50
Specs: Windows 2000
Hello there!

I am trying to create login script to my users and i seriously need help. A CMD script that does following.. if username starts with letters "test" (we have several usernames with test123**), than map network drives and add network printers..

SO this is my code now:

If %username% == "test" goto MAPPINGS else goto end

:MAPPINGS
net use e: \\server\folder
rundll32 printui.dll PrintUIEntry /in /n\\server\printername


:end
exit


See More: Login script to windows 2000

Report •


#1
February 20, 2009 at 02:12:18
Okay. Good luck with that. Let us know if you have any problems.

Report •

#2
February 20, 2009 at 02:53:13
Well the problem is that the script completely doesn't work.

Report •

#3
February 20, 2009 at 03:09:57
Replace:
If %username% == "test" goto MAPPINGS else goto end

With:

echo %username% | findstr "^test">NUL 2>&1 &&goto MAPPINGS
goto :end


Report •

Related Solutions

#4
February 20, 2009 at 06:36:27
I tested that script to my account which does not contain "test" letters and it still mapped network drives and printers to me.

Report •

#5
February 20, 2009 at 06:57:30
You're missing my second line.

Report •


Ask Question