Issues creating an installer based on an NI installer

181 views
Skip to first unread message

gwendalyne

unread,
Dec 23, 2022, 5:19:20 AM12/23/22
to innosetup
Hello,
I am a beginner with Inno Setup. I used the Wizard to create an .iss file based on an installer developed with National Instruments software. The reason I had to do this is that the NI installer doesn't overwrite a file in a specific folder (outside the Program Files (x86) folder) if it already exists.
To do this, I added to the script created by the Wizard the following line:

Source: [path of the file to be overwritten]; DestDir: [destination folder]; Flags: ignoreversion

and I've checked that when I run the executable compiled from the script, the file is actually overwritten. The problem is that the actual installation fails.
If I launch the executable created by Inno Setup without administrator privileges, the procedure appears to be successful, but when I click Finish to launch the application I get an error popup.

Unable to execute file:
C:\Program Files (x86)\[Destination Folder]\install.exe
CreateProcess failed; code 740.


If I choose Run as administrator, also in this case the procedure seems to be successful, but when I click on Finish to launch the application I get another error popup.

Fatal Error. Unable to load a resource DLL

Here are the Details:

ConfigInfo.cpp(2501): InstallerError 10007
Fatal Error. Unable to load a resource DLL.
Unable to load the custom resource file C:\Program Files (x86)\[Destination Folder]\supportfiles\customResource0009.dll because Windows Error 126: Impossibile trovare il modulo specificato.
 while attempting to load the resource DLL C:\Program Files (x86)\[Destination Folder]\supportfiles\customResource0009.dll


The fact is that both the install.exe file and the customResource0009.dll are located in the folder containing the NI installer on which I based the generation of the .iss file, and specified in the line

Source: "[Path of NI installer]\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion

and I don't understand why they are searched in C:\Program Files (x86)\[Destination Folder].
There's something I'm missing but I don't know what, so I hope you can help me.
I look forward to your kind reply, and I thank you in advance.
If I don't hear from you sooner, I wish you happy holidays!
Alessia

gwendalyne

unread,
Dec 23, 2022, 6:14:11 AM12/23/22
to innosetup
Update: I solved the above issue by adding the following line to the [Files] section:

Source: "[Path of NI Installer]\supportfiles\*.*"; DestDir: "{app}\supportfiles"; Flags: ignoreversion

After that the installation begins, but I get another error: an installation file contained in [Destination Folder]\bin is missing.
So I added the following line:

Source: "[Path of NI Installer]\bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion

but when I compile I get the error

Compiler Error
No files found matching "[Path of NI Installer]\bin\*"


Yet the bin folder contains files, or rather subfolders... Again, what am I missing?
Please help me!
Best regards,
Alessia
Reply all
Reply to author
Forward
Message has been deleted
0 new messages