Jump to content

Runwait Syntax Error


Recommended Posts

I know I have to be typing this wrong, but I have look at almost every post that has to do with the RunWait(@ComSpec command and I am getting now where ..

any advice ??

RunWait(@ComSpec &  ' /c ' & ' c:\XCACLS.vbs /I Copy ' & $usrArray & '' , @ScriptDir, @SW_HIDE)

also have tired this way with no luck either ..

RunWait(@ComSpec & " /c c:\XCACLS.vbs " & $usrArray & " /I Copy ", @ScriptDir, @SW_HIDE)
Edited by startrek133
Link to comment
Share on other sites

Hi startrek133,

what is the value for $usrArray?

If it is just a plain string, you can use it this way:

RunWait(@ComSpec & " /c C:\xcacls.vbs " & $usrString & " /I Copy", @ScriptDir, @SW_HIDE)

If $usrArray really is an array you'll need to call it in a loop for each element.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
Share on other sites

Hi Hannes123

$usrArray was an array create from a file, because i am pulling in the name i need from a txt file ..

hope that makes sense ..

#include <File.au3>
#include <Array.au3>
#include <String.au3>

;Making of the folders from a txt file;

Global $usrArray
_FileReadToArray("test.txt", $usrArray)
For $i = 1 To $usrArray[0]
    DirCreate("c:\"&"\"&$usrArray[$i])
Next
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...