Inno Setup Installer Not Working in Windows 7 - windows

i'm trying to create an installer for my .exe game application i've created in java that I need to deliver as a college assignment, however i'm just using the basic Inno Setup Script Wizard to pack it up and get the installer, but seems like i'm having issues when i'm trying to open the created installer in Windows 7, it works fine in windows 10 and windows 8/8.1, but the installer doesn't works in windows 7, it doesn't open or anything, but it shows that the process is active in the task manager of windows 7.
Here's the code that the Wizard Script tool generated
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[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={{21BF7A5F-3140-4AE4-B564-593CCF9FC983}
AppName=Crossy Road 2D
AppVersion=1.0
;AppVerName=Crossy Road 2D 1.0
AppPublisher=Cryo
DefaultDirName={pf}\Crossy Road 2D
DisableProgramGroupPage=yes
OutputDir=C:\Users\Cryo Codex\Desktop\Installer
OutputBaseFilename=Crossy Raod 2D Installer
SetupIconFile=C:\Users\Cryo Codex\Downloads\c1.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Users\Cryo Codex\Desktop\Executable\Crossy Road 2D.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\Crossy Road 2D"; Filename: "{app}\Crossy Road 2D.exe"
Name: "{commondesktop}\Crossy Road 2D"; Filename: "{app}\Crossy Road 2D.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\Crossy Road 2D.exe"; Description: "{cm:LaunchProgram,Crossy Road 2D}"; Flags: nowait postinstall skipifsilent

Try turning off Avast protection if you have a problem running the installer.

Related

WizardImageFile does not work in Inno Setup 5.5.8

I installed the latest version of Inno Setup v5.5.8 (a) and now I can not view the WizardImageFile bitmap file in my installation wizard. It worked just fine in a the previous version. Am I doing something wrong or its a bug? Here a script example I created with the help of the Inno Setup wizard it self.
Of course the setup_inno.bmp and setup_inno_small.bmp are in the same folder as the iss script file. The small image works just fine and the setup_inno.bmp is 24bit color depth (Windows format) with 164X314 pixels width and height.
Any recommendation?
Regards,
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.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={{EF909D9F-7C2F-46E8-9BBF-C65D3323A436}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
WizardImageFile=setup_inno.bmp
WizardSmallImageFile=setup_inno_small.bmp
WindowStartMaximized=yes
WindowShowCaption=no
WindowVisible=yes
BackColor=$000000
BackColor2=$FFFFFF
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#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
Are you aware that the Welcome page is by default skipped since Inno Setup 5.5.7?
As recommended by Microsoft's desktop applications guideline, DisableWelcomePage now defaults to yes. ... The defaults in all previous versions were no.
So you can actually see the WizardImageFile on the last (Finished) page only, not on the first (Welcome) page already as previously.
I found this answer. It states:
The WizardImageFile is shown on the Welcome and Finish pages. However, the Welcome page is skipped by default now (see DisableWelcomePage), so it will normally only be visible on the Finished page. (This is enabled by default, but it is possible that you disabled that too -- see DisableFinishedPage.)
The WizardSmallImageFile is shown on all other pages.
That explains why I can’t see the images. Wonder by the Welcome Page is off by default?
I found this which states:
Don't use Welcome pages—make the first page functional whenever possible. Use an optional Getting Started page only when:
The wizard has prerequisites that are necessary to complete the wizard successfully.
Users may not understand the purpose of the wizard based on its first Choice page, and there isn't room for further explanation.
The main instruction for Getting Started pages is "Before you begin:".

Inno Setup: Application won't start

I have a Visual Studio program that I made an installer for using Inno Setup. I then had a few errors when trying to open the application such as missing .dll's which I added to the project directory. I then got an error like "procedure entry point could not be located in the dynamic link library PvBuffer.dll" which I fixed by adding PvBuffer.dll to the project directory.
Now when I make the installer and try to run the installed application, nothing happens. I click on the application and the program simply crashes. No errors, nothing. The release .exe file works fine in the project but the installed application doesn't. Any suggestions of what might be causing this? Thanks
Edit 1: Slappy here is my installer script:
[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={{AFC14F65-6DD7-479B-AA27-C15F14763641}
AppName=FLIR615
AppVersion=1.5
;AppVerName=FLIR615 1.5
AppPublisher=My Company, Inc.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\FLIR615
DefaultGroupName=FLIR615
AllowNoIcons=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files]
Source: "D:\FLIR Project\FLIR Project\GEVPlayerSample\SampleRelease\GEVPlayerSample.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\FLIR Project\FLIR Project\GEVPlayerSample\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"
Name: "{group}\{cm:ProgramOnTheWeb,FLIR615}"; Filename: "http://www.example.com/"
Name: "{group}\{cm:UninstallProgram,FLIR615}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\GEVPlayerSample.exe"; Description: "{cm:LaunchProgram,FLIR615}"; Flags: nowait postinstall skipifsilent
Edit 2 KirbyFan64SOS Here is what the errors are in dependency walker:
Edit 3 After monitoring the crash in event viewer I noticed some errors which I have posted below
The errors that are the linked to the program that crashed seem to relate to KERNALBASE.dll. Does anyone know what this means?
I had the same issue and the cause for it is not having dll. Right dll (along with 32/64 bit) and exact version is very important.

Inno Setup always installs into admin's AppData directory

I want to store my app in the current user's AppData directory to avoid problems with permissions we had when auto-updating our app (when it's stored in Program Files). We don't give the user the option of where to install the app. We've had complaints from non-admin users that the installer stores the app in the admin's AppData directory (after UAC of course), instead of the current user's AppData directory, which then prevents the app from running in the future.
Firstly, I had DefaultDirName={userappdata}\{#MyAppName}. Then I tried DefaultDirName={commonappdata}\{#MyAppName}. Then I tried that along with PrivilegesRequired=lowest and even as PrivilegesRequired=none as the Make InnoSetup installer request privileges elevation only when needed question suggested.
This is my script as of right now in case I'm missing something obvious:
; Script generated by the Inno Setup Script Wizard.
;SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Teamwork Chat"
#define MyAppVersion "0.10.0"
#define MyAppPublisher "Digital Crew, Ltd."
#define MyAppURL "http://www.teamwork.com/"
#define MyAppExeName "TeamworkChat.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={{0F063485-F5AF-4ADE-A9F9-661AB3BAA661}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={userappdata}\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
OutputDir=E:\chat-client\dist
OutputBaseFilename={#MyAppName}_for_Windows32_Installer-{#MyAppVersion}
SetupIconFile=E:\chat-client\icons\teamwork_chat.ico
WizardImageFile=E:\chat-client\icons\chatWizardImageFile.bmp
Compression=lzma
SolidCompression=yes
PrivilegesRequired=none
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "E:\chat-client\dist\TeamworkChat\win32\TeamworkChat.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\ffmpegsumo.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\icudtl.dat"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\nw.pak"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[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
Edit
I've changed two options but still no luck;
PrivilegesRequired=lowest
...
[Icons]
...
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Edit 2:
I've added the runasoriginaluser flag and generated a new AppId (GUID) but still no luck;
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runasoriginaluser
Edit 3:
I've created a simple GitHub repository with the source files and Inno script.
Edit 4:
I had been testing on Windows 8.1. It seems to work when compiled on Windows 7, and ran on Windows 8, but not when compiled on 8 and ran on 8.
Edit 5:
It's solved now but to clear things up regarding Edit 4, it wasn't working only on my machine. It worked on other Windows 8 machines. Must've been some weird caching or something (even though I changed the AppId).
From the wording of your question and if I am understanding you correctly, it sounds like this is because you are "validating with an admin account for the install to run." If this is the case and you are entering a different account (from that which you are logged in with) at the UAC prompt, the current user then actually becomes the Administrator account you just entered at the UAC prompt and not the account you are logged in with. Therefore, as long as you are being asked to elevate the installation using UAC, it will not end up in the logged in user's AppData directory.
What you may need to do is use the runasoriginaluser function, which will use the logged in user credentials instead of the account you entered at the UAC prompt, or find what is causing the UAC elevation prompt.
See also Inno Setup Creating registry key for logged in user (not admin user).
The MSDN documentation on Installation Context may also be useful.
It should work with PrivilegesRequired=lowest. And it's the correct approach. If it does not, we want to see a log file.
The lowest will make the installer run within context of the current unprivileged user. Hence all constants, like {userappdata}, {userdesktop}, etc, will refer to the current user.
Anyway, to answer your question, you can use the code below.
But that's just for special situations, when the installer really needs administrator privileges (e.g. to register some system DLL), but still needs to deploy files for the original user. Like here: Inno Setup - Register components as an administrator.
[Files]
Source: "MyProg.exe"; DestDir: "{code:GetAppData}"
[Code]
var
AppDataPath: string;
function GetAppData(Param: string): string;
begin
Result := AppDataPath;
end;
function InitializeSetup(): Boolean;
var
Uniq: string;
TempFileName: string;
Cmd: string;
Params: string;
ResultCode: Integer;
Buf: AnsiString;
begin
AppDataPath := ExpandConstant('{userappdata}');
Log(Format('Default/Fallback application data path is %s', [AppDataPath]));
Uniq := ExtractFileName(ExpandConstant('{tmp}'));
TempFileName :=
ExpandConstant(Format('{commondocs}\appdata-%s.txt', [Uniq]));
Params := Format('/C echo %%APPDATA%% > %s', [TempFileName]);
Log(Format('Resolving APPDATA using %s', [Params]));
Cmd := ExpandConstant('{cmd}');
if ExecAsOriginalUser(Cmd, Params, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and
(ResultCode = 0) then
begin
if LoadStringFromFile(TempFileName, Buf) then
begin
AppDataPath := Trim(Buf);
Log(Format('APPDATA resolved to %s', [AppDataPath]));
end
else
begin
Log(Format('Error reading %s', [TempFileName]));
end;
DeleteFile(TempFileName);
end
else
begin
Log(Format('Error %d resolving APPDATA', [ResultCode]));
end;
Result := True;
end;
More similar questions:
Inno Setup Using {localappdata} for logged in user
Inno Setup - puts user files in admin documents

How to write an installer that also allows to run the software from CD

I have an application that will be located on the CD-ROM and I need to make an installer for it, that will ask the user if he wants to run the application from the CD-ROM or install it on the hard drive, how can I do it with InnoSetup, is it even possible?
Below is an example that uses [Tasks] to define a CD-ROM or Hard drive installation. The program file resides adjacent to the installer, i.e. on the CD-ROM. You start your application via the Startmenu shortcut which either points to the the CD-Rom or Hard drive depending upon which task option was selected. Hope this helps.
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
[Files]
;The MyProg.exe file shall reside in the same (cd-rom) folder as the Installer. It will only be installed if the Task option RunFromInstallation is checked.
Source: "{src}\MyProg.exe"; DestDir: "{app}"; Flags: external; Tasks: RunFromInstallation;
[Icons]
;Depending upon which Task Option was selected the Start menu item points to either the installation folder or the installation (cd-rom) media
Name: "{group}\My Program"; Filename: "{src}\MyProg.exe"; Tasks: RunFromExternalMedia;
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"; Tasks: RunFromInstallation;
[Tasks]
;In Task dialog user will be prompted to select the Deployment Method. Because of the Exclusive Flag only one of the options can be selected.
Name: RunFromExternalMedia; Description: "Run from: {src}"; GroupDescription: Deployment method:; Flags: exclusive;
Name: RunFromInstallation; Description: "Install to: {app}"; GroupDescription: Deployment method:; Flags: exclusive;
You could write your own program that asks the user, and then runs the InnoSetup installer, if needed.
Alternatively, hook into the InitializeSetup event and abort the installer, if needed.

Inno IDE Eliminate View checkbox after installation

After an installation has completed, the installer gives the user a check box option labeled "View" that gives the user the option to apparently open the installation folder upon completion of the install. How do I disable this?
Once the install completes, I don't want the user to have the option to "View" anything. Just close the installer.
UPDATE: here is the script:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My App"
#define MyAppVersion "1.0"
#define MyAppPublisher "Blah, LLC"
#define MyAppURL "http://www.blah.com/"
[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={{f47ac10b-58cc-4372-a567-0e02b2c3d479}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=false
LicenseFile=Release\EULA.rtf
SetupIconFile=Release\bin\logo.ico
Compression=lzma/Max
SolidCompression=true
AppCopyright=Blah, LLC
AppVerName={#MyAppName}
DisableFinishedPage=yes
VersionInfoVersion=1.0
VersionInfoCompany=Blah, LLC
VersionInfoDescription=My description here.
VersionInfoCopyright=2012
VersionInfoProductName=My App
VersionInfoProductVersion=1.0
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: Release\bin\glassfish-3.1.2; DestDir: {sd}\MyApp; Flags: ignoreversion recursesubdirs createallsubdirs external;
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: {src}\README.txt; DestDir: {tmp}; Attribs: ReadOnly; Flags: isreadme external dontcopy;
[Types]
Name: full; Description: "Full Installation";
Name: custom; Description: "Custom Installation"; Flags: IsCustom;
[Components]
Name: webserver; Description: "GlassFish 3.1.2 Application Server"; Types: full custom; ExtraDiskSpaceRequired: 100851712;
Name: sqlserver; Description: "SQL Server Express 2008 R2"; ExtraDiskSpaceRequired: 745537536; Types: full custom;
Name: sqlserver\sqlserver_x64; Description: "Microsoft SQL Server Express (x64)"; Flags: exclusive; Types: full custom;
Name: sqlserver\sqlserver_x86; Description: "Microsoft SQL Server Express (x86)"; Flags: exclusive; Types: full custom;
[Tasks]
Components: webserver; Name: glassfishservice; Description: "Register the web server as a Windows Service."; GroupDescription: "Web Server Options";
[Run]
Tasks: glassfishservice; Components: webserver; Filename: asadmin; Parameters: "create-service MyApp"; WorkingDir: "{sd}\MyApp\bin"; StatusMsg: "Creating GlassFish service.";
Tasks: glassfishservice; Components: webserver; Filename: net; Parameters: "start ""MyApp GlassFish Server"""; StatusMsg: "Starting Windows service.";
; https://blogs.oracle.com/foo/entry/automatic_starting_of_servers_in AND https://blogs.oracle.com/foo/entry/how_to_make_v3_platform
Filename: SQLEXPRWT_x86_ENU.exe; WorkingDir: {src}\bin; Description: "Installs SQL Server 32-bit edition."; StatusMsg: "Installing SQL Server Express 2008..."; Components: sqlserver\sqlserver_x86; Flags: HideWizard 32bit;
Filename: SQLEXPRWT_x64_ENU.exe; WorkingDir: {src}\bin; Description: "Installs SQL Server 64-bit edition."; StatusMsg: "Installing SQL Server Express 2008..."; Components: sqlserver\sqlserver_x64; Flags: HideWizard 64bit;
Components: "sqlserver sqlserver\sqlserver_x64 sqlserver\sqlserver_x86"; Filename: sqlcmd; Parameters: "-S COMPUTER\SQLEXPRESS -i {sd}\bin\script.sql"; Description: "Creating database.";
[InnoIDE_PostCompile]
Name: "C:\Program Files\PowerISO\piso.exe"; Parameters: "create -o """"{#MyAppName} - v{#MyAppVersion}.iso"""" -add Release /"; Flags: CmdPrompt;
[UninstallRun]
Tasks: glassfishservice; Components: webserver; Filename: net; Parameters: "stop ""MyApp GlassFish Server"""; StatusMsg: "Stopping Windows service.";
Tasks: glassfishservice; Components: webserver; Filename: asadmin; Parameters: "_delete-service MyApp"; WorkingDir: "{sd}\MyApp\bin"; StatusMsg: "Destroying GlassFish service.";
[Dirs]
If this is an InnoSetup install, check your [Run] section for a postinstall entry and remove it.
The postinstall is defined in the docs as:
postinstall
Valid only in a [Run] section. Instructs Setup to create a checkbox on the Setup Completed wizard page. The user can uncheck or
check this checkbox and thereby choose whether this entry should be
processed or not. Previously this flag was called showcheckbox.
Another cause of a check box on the Finished page is the isreadme flag. From the docs:
isreadme
File is the "README" file. Only one file in an installation can have
this flag. When a file has this flag, the user will asked if he/she
would like to view the README file after the installation has
completed. If Yes is chosen, Setup will open the file, using the
default program for the file type. For this reason, the README file
should always end with an extension like .txt, .wri, or .doc.
Note that if Setup has to restart the user's computer (as a result of
installing a file with the flag restartreplace or if the AlwaysRestart
[Setup] section directive is yes), the user will not be given an
option to view the README file

Resources