# Fileinclude crashing compiler

## Recommended Posts

why is this code crashing the compiler? Did I type something wrong or is this a bug? Thanks.

FileInstall("C:\Documents and Settings\HP_Administrator\Desktop\dot.bmp\","C:\Program Files\Winnovation Positioning System\dot.bmp\")
FileInstall("C:\Documents and Settings\HP_Administrator\Desktop\field1.bmp\","C:\Program Files\Winnovation Positioning System\field1.bmp\")

it says when compiling

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /CompileDefaults /in "C:\Documents and Settings\HP_Administrator\Desktop\ps3.au3" /autoit3dir "C:\Program Files\AutoIt3"
>Running AU3Check (1.54.3.0)  params:  from:C:\Program Files\AutoIt3
+>AU3Check ended.rc:0
>Running:(3.2.0.1):C:\Program Files\AutoIt3\aut2exe\aut2exe.exe
!>Aut2exe.exe ended.rc:-1073741819
>Exit code: 0   Time: 11.720

and then it pops up a send error message to microsoft box and the 1/2 compiled script is unrunable.

##### Share on other sites

Your the first person that I have seen who adds a backslash after a filepath. Your asking the compiler to search for a folder called dot.bmp and another called field1.bmp. Files can only be FileInstalled, not folders.

The hard crash could be a bug, but that is for a developer to confirm.

##### Share on other sites

ok... the help file messed me up by saying... "dest The destination path with trailing backslash. This can be a variable. ". without the back slashes of with them after the dest only there are no errors but... there are no pictures compiled either.

Edited by Kyler Carlson

##### Share on other sites

No pictures? I see no mention of that. You can fileInstall any file type.

The reference from the helpfile you got confused with

The source path of the file to compile. This must be a literal string; it cannot be a variable.

Nothing about trailing backslash, so straight forward.

The destination path with trailing backslash. This can be a variable.

The distination here is a drive or folder path. You can specify a file path to send the fileinstall, but is not needed, as a drive or folder path is suffient. With File*() functions in general, if the destination is a drive or folder, then adding a backslash confirms that it is a folder path and not a extensionless file path. Edited by MHz

## Create an account

Register a new account

×

• Wiki

• Back

• Git