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:
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
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 = NothingWhen 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