calling a batch file from script 
Author Message
 calling a batch file from script

I need to call a batch file from a VBScript and provide
variables to it like:

Call "%0\..\addhome.bat " & UserName & " " & FileLocation

It doesn't seem to like this however.

Alternatively, what I'd really like to do is be able to
process through an entire OU of users and create shares
and set permissions for them from within the VBScript.  I
can process the users but don't know how to create the
share and set the permissions.  That's what I was going to
use the batch file for(above).



Mon, 30 Aug 2004 01:03:23 GMT  
 calling a batch file from script
http://www.infinitemonkeys.ws/infinitemonkeys/articles/asp/950h.asp

Atrax - MVP [Microsoft Most Valued Professional]

http://www.infinitemonkeys.ws/

Host with me for $100 a year!
http://www.atrax.ws/hosting/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 30 Aug 2004 06:43:43 GMT  
 calling a batch file from script
Dim Shell
Set Shell = CreateObject("Wscript.Shell")
Shell.Run "%0\..Anything.bat" & %USERNAME% & FileLocation

see if that helps


Quote:
> I need to call a batch file from a vbscript and provide
> variables to it like:

> Call "%0\..\addhome.bat " & UserName & " " & FileLocation

> It doesn't seem to like this however.

> Alternatively, what I'd really like to do is be able to
> process through an entire OU of users and create shares
> and set permissions for them from within the VBScript.  I
> can process the users but don't know how to create the
> share and set the permissions.  That's what I was going to
> use the batch file for(above).



Mon, 30 Aug 2004 22:41:40 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Logon Batch to call a VBS that calls another batch

2. HELP! Call Script from a batch file

3. Object_changed error while calling MAPI script from batch file

4. Batch file calling wsh script ERROR !!

5. Batch file calling wsh script ERROR !!

6. copying complete folders/ calling batch-scripts

7. Direct logon script (no batch call)

8. Call VBScribt with parameter from DOS Batch file

9. Call a batch file.

10. Calling a batch file

11. calling batch files

12. batch file called from ASP

 

 
Powered by phpBB® Forum Software