Running bat file using a VBS script - TechRepublic
Question
December 12, 2008 at 03:25 AM
umang.jay

Running bat file using a VBS script

by umang.jay . Updated 17 years, 7 months ago

Hi there

I am trying to run a vbs script to run a bat file after a user logs into a domain. this works fine if the user logs on with admin rights but fails when a normal user logs in.
the bat file is a pop up that says this pc is in the wrong ou please contact IT.
this is what I have in my script. how do I run this without a prompt for username & password.

This is what I have in my vb script.

Set oShell = CreateObject(“WSCript.shell”)

sCmd = “C:\ou\Wrong_OU.bat”

This discussion is locked

All Comments