Skip to content

Commit

Permalink
Merge c626aa1 into 4bfb056
Browse files Browse the repository at this point in the history
  • Loading branch information
HKrausAxon authored Mar 16, 2021
2 parents 4bfb056 + c626aa1 commit 54ec254
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export interface MSICreatorOptions {
arch?: 'x64' | 'ia64'| 'x86';
features?: Features | false;
defaultInstallMode?: 'perUser' | 'perMachine';
rebootMode?: string;
installLevel?: number;
}

export interface UIOptions {
Expand Down Expand Up @@ -128,6 +130,8 @@ export class MSICreator {
public autoLaunchArgs: Array<string>;
public defaultInstallMode: 'perUser' | 'perMachine';
public productCode: string;
public rebootMode: string;
public installLevel: number;

public ui: UIOptions | boolean;

Expand Down Expand Up @@ -162,6 +166,8 @@ export class MSICreator {
this.arch = options.arch || 'x86';
this.defaultInstallMode = options.defaultInstallMode || 'perMachine';
this.productCode = uuid().toUpperCase();
this.rebootMode = options.rebootMode || 'ReallySuppress';
this.installLevel = options.installLevel || 2;

this.appUserModelId = options.appUserModelId
|| `com.squirrel.${this.shortName}.${this.exe}`.toLowerCase();
Expand Down Expand Up @@ -289,6 +295,8 @@ export class MSICreator {
'{{InstallPerUser}}': this.defaultInstallMode === 'perUser' ? '1' : '0',
'{{ProductCode}}': this.productCode,
'{{RandomGuid}}': uuid().toString(),
'{{RebootMode}}': this.rebootMode,
'{{InstallLevel}}': this.installLevel.toString(10),
'\r?\n.*{{remove newline}}': ''
};

Expand Down
13 changes: 7 additions & 6 deletions static/wix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@
this upgrade. Unfortunately this causes an ICE 40 warning during linking. -->
<Property Id="REINSTALLMODE" Value="emus" />
<!-- Overrides the default reboot behavior if files are in use during the upgrade.
This way no unpxecpted reboot will happpen.-->
<Property Id="REBOOT" Value="ReallySuppress" />
<!-- A property that holds the intall path and is needed to delete all files on
uninstall, even if they are not wriiten as part of this MSI. The value comes from a
registry we set on install.-->
<Property Id="INSTALLLEVEL" Value="2" />
By default, this will be set to "ReallySuppress" to make sure no unexpected reboot will happpen.-->
<Property Id="REBOOT" Value="{{RebootMode}}" />
<!-- Installlation level to use that determines which features are installed.
see guides/enduser.md to check which Install Level maps to which feature that will
correspondingly get installed.
If not set, this will default to "2" (Main Feature, Launch On Login) -->
<Property Id="INSTALLLEVEL" Value="{{InstallLevel}}" />
<!-- Allows to customize the Windows user group that gets access rights on
the install folder in cas the auto-updater is installed. User that run the App
must be part of that user group to be able to auto-update. -->
Expand Down

0 comments on commit 54ec254

Please sign in to comment.