Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

[RESOLVED] error running another vbscript from a vbscript

$
0
0
Hi All,

I'm new here and I'm currently in the process of writing a vbscript to run on a Windows server to create a directory structure, create security groups and finally set permissions.

I can do the first two bits, but running the XCACLS.vbs script from my script is not working.

The snippet of relevant code is:

Code:

'----Other Definitions ----
Dim objShell 'used for running other commands

'-----------------------------------------------------------
'---------- Run the XCACLS.vbs to set permissions ----------
'-----------------------------------------------------------
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("""C:\Windows\System32\cscript.exe" "XCACLS.VBS"" strDirectory /I REMOVE") 'remove inheritance on new folder
Set objShell = Nothing


When I run the script it gives me an error saying that it expects a )

But my confusion is that there IS a ) there.

When running the script without the objShell.Run line, it works fine.


I would welcome your advice.

Kind Regards,
Simon

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>