Sign in to follow this  
Followers 0
startrek133

Runwait Syntax Error

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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]

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0