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

.Bat vs. VBS logon scripts 1

Status
Not open for further replies.
Nov 13, 2005
56
US
Hello all,

I currently started a new job. It is a Windows Server 2003 domain and all the users are currently logging on using batch files that are executed by being placed in each of the users profile (Active Directory Users and Computers). At my last job we used fancy vbs scripts to logon that were set at the OU level.

I want to change the domain where i work now to use a VBS script.

Can anybody here tell me the advantages / disadvantages to using a vbs script vs. a batch file to control drive mappings, etc? Is it just me or is using a batch file a very rudimentary way of achieving drive mappings?

A+, Network+, MCP
========================================>
My first computer was the Atari 400 (heh)
 
Oops hit submit before i finished: I want to be able to go to my boss with a list of advantages to moving over to vbs logon scripts. Thanks.

A+, Network+, MCP
========================================>
My first computer was the Atari 400 (heh)
 
VBS is the best way to go. There are ways to manipulate the system with VBScript that you really can't with a .bat. With scripts, you can actually filter with groups (apply settings based on group membership), and can even get into the WMI which I don"t believe you can with a .bat (although I've never tried because it was always easier with vbs). I'm pretty sure that .bat is on it's way out as Windows systems are transitioning more and more away from DOS.
 
Your BAT files require a seperate VM to run and therefore are slower.

Power is the big thing. You can do a lot more in an easier to manage way with VBS.

I hope you find this post helpful.

Regards,

Mark
 
we have always used bat files to run logons with good enough use of the IF MEMBER statement and other things you can achieve some good results with them, install some progams that only have .exe's and can't make MSI's for.
 
You can still install an .exe with a vbscript. There are ways to do everything with vbscript. With a .bat, are you able to utilize the WMI, as well as port the output to .html, .xml, .txt, .xls? There are things that can't be done with .bat's, that are very simple to do with vbscript. As markdmac stated, the .bat requires a seperate vm, which is indeed slower.

I think this article pretty much has a break down of the pros and cons of each:

 
Thank you all who answered! VBS is indded the way to go.

Great link BTW... :)

A+, Network+, MCP
========================================>
My first computer was the Atari 400 (heh)
 
When you are ready to move over to VBScript, take a look at my FAQ. faq329-5798

I hope you find this post helpful.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top