9

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?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
wyllyjon
  • 505
  • 1
  • 5
  • 20
  • Can you reduce the script to a minimal example that still reproduces the problem? Also attach a log file (`/log` command-line switch). – Martin Prikryl Feb 01 '16 at 12:53
  • 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). – wyllyjon Feb 01 '16 at 13:18
  • Can you show us an English error message? (The actual English error message, not your translation of it). – Martin Prikryl Feb 01 '16 at 13:19
  • 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 installer – wyllyjon Feb 01 '16 at 13:27
  • So run the compiled installer manually from command-line. – Martin Prikryl Feb 01 '16 at 13:29
  • 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`. – Ken White Feb 01 '16 at 13:39
  • 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... – wyllyjon Feb 01 '16 at 13:45
  • @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. – wyllyjon Feb 01 '16 at 13:46
  • @KenWhite I believe it's the `ShellExecuteEx` that the main installer uses to launch the child installer. – Martin Prikryl Feb 01 '16 at 13:58
  • @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? – Ken White Feb 01 '16 at 14:03
  • 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 @wyllyjon do you get the error when you run the installer from command-line/Explorer? Or only when you run it from Inno Studio? – Martin Prikryl Feb 01 '16 at 14:06
  • I have this error when the Studio launches the installer after compliation, but also when I launch it from explorer, and also from command line – wyllyjon Feb 01 '16 at 14:59
  • 1
    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 ? – wyllyjon Feb 01 '16 at 18:59
  • Can you share the `.ico` file with us? – Martin Prikryl Feb 02 '16 at 06:59
  • Here is the ico file : https://dl.dropboxusercontent.com/u/50522949/favicon.ico – wyllyjon Feb 02 '16 at 08:27

1 Answers1

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.

Tuan
  • 111
  • 1
  • 3