Jump to content

Error: Subscript used on non-accessible variable


Go to solution Solved by Guest,

Recommended Posts

Posted

Using this code:

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

Global $IsPE = StringInStr(@SystemDir, "X:")


$aFiles = _FileListToArrayRec(@ScriptDir, "*.inf", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH)

For $i = 1 To $aFiles[0]
    $Command = 'drvload "' & $aFiles[$i] & '"'
    ConsoleWrite(@CRLF & $Command)
    If $IsPE Then Run(@ComSpec & " /c " & $Command, @SystemDir)
Next

 

But getting the error

Line 11 (File "X:\Helper\PEAutoRun\Drivers\main.au3):
.
.
Error: Subscript used on non-accessible variable

 

Any idea what I am missing?

Thanks

sebus

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
×
×
  • Create New...