Jump to content

Recommended Posts

Posted

Hi guys, firstly sorry for creating another thread. But I can't solve my problem using solutions posted in the forums.

So I have this script:

$file = @ScriptDir & "\files\tst.au3"
$directory = _GetDirPath($file)

FileInstall("C:\Users\Jordan\Documents\Autoit Files\Encryption" & "\Aut2exe.exe", $directory)
FileInstall("C:\Users\Jordan\Documents\Autoit Files\Encryption" & "\Aut2exe_x64.exe", $directory)
FileInstall("C:\Users\Jordan\Documents\Autoit Files\Encryption" & "\AutoItSC.bin", $directory)
FileInstall("C:\Users\Jordan\Documents\Autoit Files\Encryption" & "\AutoItSC_x64.bin", $directory)
FileInstall("C:\Users\Jordan\Documents\Autoit Files\Encryption" & "\Notes.ico", $directory)
FileInstall("C:\Users\Jordan\Documents\Autoit Files\Encryption" & "\upx.exe", $directory)

ShellExecuteWait(@ScriptDir & "\files\Aut2exe.exe", '/in "' & $file & '" /icon "' & $directory & 'Notes.ico"') 

FileDelete($directory & "Aut2exe.exe")
FileDelete($directory & "Aut2exe_x64.exe")
FileDelete($directory & "AutoItSC.bin")
FileDelete($directory & "AutoItSC_x64.bin")
FileDelete($directory & "Notes.ico")
FileDelete($directory & "upx.exe")

Func _GetDirPath($filepath)
   $i = StringInStr($filepath, "\", 0, -1)
   Return StringMid($filepath, 1, $i)
EndFunc

And when I compile I get the notorious error; "Invalid FileInstall() function:"

The files exist, are in the location specified, and I HAVE used a literal string as the first parameter of each call to the function. I also replaced all / with \ as suggested, but this hasn't solved it either. I get no such problem running the script normally. Can someone please explain what's going on?

Many thanks.

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
  • Recently Browsing   0 members

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