generally to call vbscript from bat file,
cscript <scriptname>
Main Topics
Browse All TopicsI have a logon bat file now and need to remap printers in MS Active Directory to a new server. I have worked with vbs logon scripts but never bat logon scripts, so can I call a vbs script from a logon script that is in bat format. Then let the vbs script remap the printers.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
ghostdog74 is right.
In a batch file (or from the DOS prompt, for testing), you can run
cscript \\server\netlogon\script.v
for the DOS version of Windows Script Host (which shows a DOS prompt briefly)
and you can also use
wscript \\server\netlogon\script.v
for the Windows version of Windows Script Host (which will not show the DOS window)
Regards,
Rob.
Thanks for that information, it looks to be what I am looking for. One other part is what is does the vbs script pass back control to the bat login script when it finishes or do I have to do that in the vbs script. Also does the bat login script wait for the vbs script to finish?
I have increased the points to 250 because of the added question.
Pointhigh
When you call the VBS from your batch file, the script will be executed, but the batch file will continue to run the rest of it's commands.
If you want the batch file to wait for the script to finish before running its other commands, use
start /wait wscript \\server\netlogon\script.v
instead.
Regards,
Rob.
Business Accounts
Answer for Membership
by: jax79sgPosted on 2007-10-15 at 16:00:31ID: 20082105
There shouldn't be any problems. In fact i think you can place the vbs files in the logon script folder without a need for a batch file.
*vbs files are executable in windows*