ShellExecuteEx error 299 when launching installer created with Inno Setup
Asked Answered
A

1

8

I use Inno Setup to create my first installer.
But when the installer is launched, before having the windows screen asking the permission to execute this file, I get a window with this error:

ShellExecuteEx a échoué : code 299
Seule une partie d'une requete ReadProcessMemory ou WriteProcessMemory a été effectuée.

English (from WinError.h):

ERROR_PARTIAL_COPY - Only part of a ReadProcessMemory or WriteProcessMemory request was completed.

And then the installer is launched. But, after about 10 sec, it launches again on its own.

Here is my iss file:

; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Facturation"
#define MyAppVersion "1.0"
#define MyAppPublisher "JoWe"
#define MyAppURL "http://www.jowe.fr/"
#define MyAppExeName "facturation.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B8DF3E83-4622-48AB-9DD5-C75D4951BEDE}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\Facturation
DefaultGroupName=Facturation
OutputDir=E:\Téléchargements
OutputBaseFilename=setup
SetupIconFile=D:\apps\vivemus\vivemus.com\resources\img\favicon.ico
Compression=lzma
SolidCompression=yes

[Languages]
Name: "french"; MessagesFile: "compiler:Languages\French.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "D:\Logiciels\phpdesktop-chrome-31.8-php-5.6.1\phpdesktop-chrome.exe"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

I have this problem even when I create an new installer with the wizard. I have added a log to the Inno Studio, but it only have the log of the compilation, where there is no error.

Does anyone know where this problem comes from?

Andonis answered 1/2, 2016 at 12:27 Comment(15)
Can you reduce the script to a minimal example that still reproduces the problem? Also attach a log file (/log command-line switch).Implausibility
I have edited my question with a simpler example. I still have this problem (I have this problem even when I create an new installer with the wizard).Andonis
Can you show us an English error message? (The actual English error message, not your translation of it).Implausibility
I work with inno Studio, so I found the log conf only in "setup option" which logs only compilation. And in the log, there is no error... I only have an error when launching the installerAndonis
So run the compiled installer manually from command-line.Implausibility
If the problem happens when you launch it with ShellExecuteEx, then you should include the code that launches it. Chances are quite good it has nothing to do with the setup and everything to do with your call to ShellExecuteEx.Stacystadholder
Ok, I have understood how the logger works, thanks :) So, there is no error : the log file starts after I authorized the execution of the exe file (windows prompt), but the error is shown before I have the Windows execution authorization screen...Andonis
@KenWhite : I have no idea of what is the ShellExecuteEx. I don't use it in my script... I use inno Studio to generate my iss file, and I have this problem.Andonis
@KenWhite I believe it's the ShellExecuteEx that the main installer uses to launch the child installer.Implausibility
@MartinPrikryl: Yes, the poster told me. :-) wyllijon: How are you launching the installer? From Inno Studio, from the command line, or by double-clicking it in Explorer?Stacystadholder
Well, I've meant that, the setup.exe (main installer) contains an inner installer that the main installer extracts to a temporary folder and launches it using ShellExecuteEx. But you are right, the error can come from the Inno Studio too. So @Andonis do you get the error when you run the installer from command-line/Explorer? Or only when you run it from Inno Studio?Implausibility
I have this error when the Studio launches the installer after compliation, but also when I launch it from explorer, and also from command lineAndonis
It seems that something went wrong with this line : SetupIconFile=D:\apps\vivemus\vivemus.com\resources\img\favicon.ico. Without this line, I don't have the error anymore... I don't kown why, because if I have a fully qualified pathname, and according to the documentation, it would have worked.... Any idea of the problem ?Andonis
Can you share the .ico file with us?Implausibility
Here is the ico file : dl.dropboxusercontent.com/u/50522949/favicon.icoAndonis
C
11

A co-worker ran into the same issue. It turned out that the Virus scan, Avast, was the cause. Disabling the virus scan, then installer ran without any issue.

Civilization answered 3/10, 2016 at 18:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.