Re: Scripting and creating home directories

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 16:25:59 +0100

Jay wrote:

> How do I access a program like xcacls.exe from inside the script?
Hi

Something like this:

'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")

' ... is the parameter input to xcacls
sCmd = "xcacls.exe ..."

oShell.Run sCmd, 0, True

'--------------------8<----------------------

WSH 5.6 documentation (local help file) can be downloaded
from here if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: Remove "File and print sharing" service (LanManager)
    ... Dim oShell, oExec, sSNetCmd, sCmd, iResult ... ' Create a shell object to run command-line programs from the scripting host ... iResult = execCmd(oShell, sCmd) ...
    (microsoft.public.windows.server.scripting)
  • Re: Setting an OS environment variable in a script?
    ... >> I'm trying to rewrite a batch file that I have used for quite some time ... > oShell.Run sCmd, 1, False ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)
  • Re: Move uninstall from batch to VBS
    ... > batch file. ... Set oShell = CreateObject ... oShell.Run sCmd, 1, True ... torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windows.server.scripting)
  • Re: Setting an OS environment variable in a script?
    ... > I'm trying to rewrite a batch file that I have used for quite some time into ... > calls Visual Source Safe via command line parameters. ... oShell.Run sCmd, 1, False ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)

Loading