Computing.Net > Forums > Networking > Batch file / Logon script

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.

Batch file / Logon script

Reply to Message Icon

Name: RB
Date: October 30, 2001 at 00:19:39 Pacific
Comment:

Hello,

I'm trying to write a logonscript that performs a task based on the operating system of the client.

Does anybody know how to write a batchfile/logonscript which can do this?

Help is very appreciated,

Thank you all!

RB



Sponsored Link
Ads by Google

Response Number 1
Name: Dave
Date: October 30, 2001 at 04:56:16 Pacific
Reply:

Easy mate you just write a standard batch file which has what you want in it.

Then you make the user logon to this script.

goto cmd from run in the start menu.

Then type net /? and it will give you most of the dos commands that you can use


0

Response Number 2
Name: RB
Date: October 30, 2001 at 23:53:10 Pacific
Reply:

Hello Dave,

Thanks for your reply but what i actually ment was,i want to write a batch file which can detect the OS of the client logging on,and based on the OS type found it performs a different task.
So when the client is running Win2000 it performs task A,and when it runs WIn98 t performs task B

How can a script detect the clients OS?

Thanks,
RB


0

Response Number 3
Name: Charles
Date: October 31, 2001 at 06:40:52 Pacific
Reply:

You can do this by using wsh. Using the WMI you can read the registry setting for the version of NT that the system is running.
Then just use the script to perform the actions you want. ie. mapping drives etc. If you use the tool 'IFMember' from the NT resource kit, you can run specific parts of the script depending on who the user is. ie. map finance printer for finance department users, etc. Have a look at www.winguides.com for some scripting help and some other guides.


0

Response Number 4
Name: dan
Date: November 30, 2001 at 03:44:18 Pacific
Reply:

if %OS%.==Windows_NT. goto WinNT
if %windir%.==. goto DOS
:Win9x
echo Win9x stuff here...
goto end
:DOS
echo DOS stuff here...
goto end
:WinNT
echo WinNT stuff here...
goto end
:end


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Networking Forum Home


Sponsored links

Ads by Google


Results for: Batch file / Logon script

NT Logon Scripts www.computing.net/answers/networking/nt-logon-scripts/5999.html

Logon Script Troubles www.computing.net/answers/networking/logon-script-troubles/1696.html

Initiating a script over the networ www.computing.net/answers/networking/initiating-a-script-over-the-networ/32189.html