Sign in to follow this  
Followers 0
neevar

Help with FileInstall()

3 posts in this topic

#1 ·  Posted (edited)

Hi guys,

I'm almost done with my updated required programs installer for my workplace.

I faced a roadblock right after combining the fileinstall function to the program.

I've zipped up all my program installers into a file called programs.7z (2.47GB)

Compiling takes quite some time but it results in failure.

Below is the error message i get in the console area in scite editor

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /ShowGui /in "D:\AutoIT\15_0_DF\RPI_15.0 v 3.au3"
+>14:35:46 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\admin\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\admin\AppData\Local\AutoIt v3\SciTE 
-> No changes made..
>Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe_x64.exe  /in "D:\AutoIT\15_0_DF\RPI_15.0 v 3.au3" /out "C:\Users\admin\AppData\Local\AutoIt v3\Aut2exe\~AU3fxumijc.exe" /nopack /comp 0
+>14:43:20 Aut2exe.exe ended.C:\Users\admin\AppData\Local\AutoIt v3\Aut2exe\~AU3fxumijc.exe. rc:0
>14:43:20 Performing the Program Resource Update steps:
!>14:43:28 Error: Failed to enumerate RT_MANIFEST resources, using defaults.
...>Setting Program ExecutionLevel Manifest information to requireAdministrator
...>Setting Program Compatibility Manifest information to Windows8.1
UpdateResources other: $result[0] = 0 - LastError:87:The parameter is incorrect.
...>Updating Program Manifest information.
!>14:43:28 Error: EndUpdateResource: Returncode = 0 - LastError:87:The parameter is incorrect.rc:2
!>14:43:28 Error: Program Resource updating Failed. The output program will not contain the Resource updates!rc:2
+>14:46:11 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 625.6

The compiling is halted with an error message similar to the line "UpdateResources other: $result[0] = 0 - LastError:87:The parameter is incorrect."

I have the option to either continue or exit.

But clicking continue doesn't help as the final exe file gives me an error: "This is not a valid Win32 application"

I took the fileinstall codes out into a new file and tried (to see if something else was causing the problem) and i still get the above error.

I went another step and split the files to chunks of 700MB using 7z. 

I was able to compile the program successful with programs.7z.001 and programs.7z.002. If i remember correctly, i tried adding programs.7z.003 and compiled the program and it was successful.

programs.7z.004 causes the application to fail with the above error message.

My question is, is there a max file size for an exe file? or perhaps for FileInstall function?

below is my code meant for the fileinstall

#include <File.au3>

Global Const $RPI_WORKINGDIR = _TempFile() ; Generates a temp folder directory name to use later on

DirCreate($RPI_WORKINGDIR)
;FileSetAttrib($RPI_WORKINGDIR, '+H')

FileInstall('.\7zip\7za.exe', $RPI_WORKINGDIR & '\7za.exe')
FileInstall('.\7zip\7za.dll', $RPI_WORKINGDIR & '\7za.dll')
FileInstall('.\7zip\7zxa.dll', $RPI_WORKINGDIR & '\7zxa.dll')

FileInstall('.\programs.7z', $RPI_WORKINGDIR & '\programs.7z')

#cs
FileInstall('.\programs.7z.001', $RPI_WORKINGDIR & '\programs.7z.001')
FileInstall('.\programs.7z.002', $RPI_WORKINGDIR & '\programs.7z.002')
FileInstall('.\programs.7z.003', $RPI_WORKINGDIR & '\programs.7z.003')
FileInstall('.\programs.7z.004', $RPI_WORKINGDIR & '\programs.7z.004')
#ce

MsgBox(1, "Program working", "Program is working. This is just a test message box")
Exit

Any assistance will be greatly appreciated. :)

 

also, is there any other method that i can use to hide my installer files or prevent anyone from extracting it? like a container in which only my script can access and use the files and install from there?

I hope i make sense...

 

EDIT: Solved it. The max a file size can go is 2GB. when i reduced the files, was able to compile. This has something to do with windows compiling limit and stuff.

Edited by neevar

Share this post


Link to post
Share on other sites



Just to add on something... I'm able to just run the script without compiling with the F5 option and everything goes smoothly. 

But compiling it causes problems. would appreciate any help given.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

_TempFIle doesn't return a folder name, it creates a temporary file, and returns that file's path and file name. You're using it wrong.

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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