Batch file / Logon script
|
Original Message
|
Name: RB
Date: October 30, 2001 at 00:19:39 Pacific
Subject: Batch file / Logon script |
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
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Dave
Date: October 30, 2001 at 04:56:16 Pacific
Subject: Batch file / Logon script |
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: RB
Date: October 30, 2001 at 23:53:10 Pacific
Subject: Batch file / Logon script |
Reply: (edit)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
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: Charles
Date: October 31, 2001 at 06:40:52 Pacific
Subject: Batch file / Logon script |
Reply: (edit)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.
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: dan
Date: November 30, 2001 at 03:44:18 Pacific
Subject: Batch file / Logon script |
Reply: (edit)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
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: