Computing.Net > Forums > Programming > Login script to windows 2000

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Login script to windows 2000

Reply to Message Icon

Name: kaan_fu
Date: February 20, 2009 at 01:49:50 Pacific
OS: Windows 2000
Subcategory: General
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: February 20, 2009 at 02:12:18 Pacific
Reply:

Okay. Good luck with that. Let us know if you have any problems.


0

Response Number 2
Name: kaan_fu
Date: February 20, 2009 at 02:53:13 Pacific
Reply:

Well the problem is that the script completely doesn't work.


0

Response Number 3
Name: Razor2.3
Date: February 20, 2009 at 03:09:57 Pacific
Reply:

Replace:

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

With:

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


0

Response Number 4
Name: kaan_fu
Date: February 20, 2009 at 06:36:27 Pacific
Reply:

I tested that script to my account which does not contain "test" letters and it still mapped network drives and printers to me.


0

Response Number 5
Name: Razor2.3
Date: February 20, 2009 at 06:57:30 Pacific
Reply:

You're missing my second line.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Login script to windows 2000

using a vbs script to add reg value www.computing.net/answers/programming/using-a-vbs-script-to-add-reg-value/15420.html

Login Script www.computing.net/answers/programming/login-script/20023.html

transfering shell script to windows www.computing.net/answers/programming/transfering-shell-script-to-windows/3681.html