I'm not sure if there is a better way to do this, but the people I need to
hand this off to eventually are not that technical and the batch file will
make it easy for them. I could probably do four code sections in theh
vbscript as well...

I get an excel file from the HR system for new users and before we create
them we search for duplicate IDs, account names etc. I have 4 individual vb
scripts that perform the individual searches, but you have to specify the
file name when you run them. I would like to call each in succession from a
batch file but pass the file name only once so each line in the batch file
will use the same file.

This is how I run from command prompt:
cscript UML_SearchScript_EID_DoesExist.VBS C:\userfilehere.xls

This is the batch file:
Rem UserExistsCheck.bat
cscript UML_SearchScript_EID_DoesExist.VBS
cscript UML_SearchScript_SAM_DoesExist.VBS
cscript UML_SearchScript_SID_DoesExist.VBS
cscript UML_SearchScript_UPN_DoesExist.VBS

The batch file works fine but asks me for the file at each line... I would
like to feed it the file and walk away, then come back to 4 text file
outputs as these sometimes take a while to process, there are a lot of users
to search through.

Any ideas?

--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org

Re: Calling a file for VBscript in a bat file by Steven

Steven
Wed May 25 15:02:54 CDT 2005

Start > Run, type: CMD

Then type: cscript /?

That will give you a list of valid arguments.

--=20
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message =
news:ePYlp7VYFHA.980@TK2MSFTNGP12.phx.gbl...
> I'm not sure if there is a better way to do this, but the people I =
need to=20
> hand this off to eventually are not that technical and the batch file =
will=20
> make it easy for them. I could probably do four code sections in theh=20
> vbscript as well...
>=20
> I get an excel file from the HR system for new users and before we =
create=20
> them we search for duplicate IDs, account names etc. I have 4 =
individual vb=20
> scripts that perform the individual searches, but you have to specify =
the=20
> file name when you run them. I would like to call each in succession =
from a=20
> batch file but pass the file name only once so each line in the batch =
file=20
> will use the same file.
>=20
> This is how I run from command prompt:
> cscript UML_SearchScript_EID_DoesExist.VBS C:\userfilehere.xls
>=20
> This is the batch file:
> Rem UserExistsCheck.bat
> cscript UML_SearchScript_EID_DoesExist.VBS
> cscript UML_SearchScript_SAM_DoesExist.VBS
> cscript UML_SearchScript_SID_DoesExist.VBS
> cscript UML_SearchScript_UPN_DoesExist.VBS
>=20
> The batch file works fine but asks me for the file at each line... I =
would=20
> like to feed it the file and walk away, then come back to 4 text file=20
> outputs as these sometimes take a while to process, there are a lot of =
users=20
> to search through.
>=20
> Any ideas?
>=20
> --=20
> Sean M. Loftus
> Enterprise Architect
> Loftus Consulting, Inc.
> www.LoftusConsulting.com
> sean(removeme)@loftus.org=20
>=20
>=20


Re: Calling a file for VBscript in a bat file by Jon

Jon
Thu May 26 05:12:19 CDT 2005

Put %1% at the end of each line to pass the argument to each vbs script

ie
cscript UML_SearchScript_EID_DoesExist.VBS %1%

Then use "WScript.Arguments" to process the argument sent, within each vbs
script

eg


Set objArgs = WScript.Arguments
NameofFile = objArgs(0)
WScript.Echo NameofFile


Jon


"Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message
news:ePYlp7VYFHA.980@TK2MSFTNGP12.phx.gbl...
> I'm not sure if there is a better way to do this, but the people I need to
> hand this off to eventually are not that technical and the batch file will
> make it easy for them. I could probably do four code sections in theh
> vbscript as well...
>
> I get an excel file from the HR system for new users and before we create
> them we search for duplicate IDs, account names etc. I have 4 individual
> vb scripts that perform the individual searches, but you have to specify
> the file name when you run them. I would like to call each in succession
> from a batch file but pass the file name only once so each line in the
> batch file will use the same file.
>
> This is how I run from command prompt:
> cscript UML_SearchScript_EID_DoesExist.VBS C:\userfilehere.xls
>
> This is the batch file:
> Rem UserExistsCheck.bat
> cscript UML_SearchScript_EID_DoesExist.VBS
> cscript UML_SearchScript_SAM_DoesExist.VBS
> cscript UML_SearchScript_SID_DoesExist.VBS
> cscript UML_SearchScript_UPN_DoesExist.VBS
>
> The batch file works fine but asks me for the file at each line... I would
> like to feed it the file and walk away, then come back to 4 text file
> outputs as these sometimes take a while to process, there are a lot of
> users to search through.
>
> Any ideas?
>
> --
> Sean M. Loftus
> Enterprise Architect
> Loftus Consulting, Inc.
> www.LoftusConsulting.com
> sean(removeme)@loftus.org
>



Re: Calling a file for VBscript in a bat file by Sean

Sean
Thu May 26 08:39:35 CDT 2005

Thanks, just what I was looking for...

S-

"Jon" <Email_Address@SomewhereOrOther.com> wrote in message
news:OBz9wtdYFHA.2884@tk2msftngp13.phx.gbl...
> Put %1% at the end of each line to pass the argument to each vbs script
>
> ie
> cscript UML_SearchScript_EID_DoesExist.VBS %1%
>
> Then use "WScript.Arguments" to process the argument sent, within each vbs
> script
>
> eg
>
>
> Set objArgs = WScript.Arguments
> NameofFile = objArgs(0)
> WScript.Echo NameofFile
>
>
> Jon
>
>
> "Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message
> news:ePYlp7VYFHA.980@TK2MSFTNGP12.phx.gbl...
>> I'm not sure if there is a better way to do this, but the people I need
>> to hand this off to eventually are not that technical and the batch file
>> will make it easy for them. I could probably do four code sections in
>> theh vbscript as well...
>>
>> I get an excel file from the HR system for new users and before we create
>> them we search for duplicate IDs, account names etc. I have 4 individual
>> vb scripts that perform the individual searches, but you have to specify
>> the file name when you run them. I would like to call each in succession
>> from a batch file but pass the file name only once so each line in the
>> batch file will use the same file.
>>
>> This is how I run from command prompt:
>> cscript UML_SearchScript_EID_DoesExist.VBS C:\userfilehere.xls
>>
>> This is the batch file:
>> Rem UserExistsCheck.bat
>> cscript UML_SearchScript_EID_DoesExist.VBS
>> cscript UML_SearchScript_SAM_DoesExist.VBS
>> cscript UML_SearchScript_SID_DoesExist.VBS
>> cscript UML_SearchScript_UPN_DoesExist.VBS
>>
>> The batch file works fine but asks me for the file at each line... I
>> would like to feed it the file and walk away, then come back to 4 text
>> file outputs as these sometimes take a while to process, there are a lot
>> of users to search through.
>>
>> Any ideas?
>>
>> --
>> Sean M. Loftus
>> Enterprise Architect
>> Loftus Consulting, Inc.
>> www.LoftusConsulting.com
>> sean(removeme)@loftus.org
>>
>
>