@@ -108,8 +108,8 @@ Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#NameLong}"; File
108108
109109[Run]
110110; Automatically install Visual C++ Redistributables if not already installed (silent, no user interaction)
111- Filename : " powershell.exe" ; Parameters : " -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -Command " " $url='https://aka.ms/vs/17/release/vc_redist.x64.exe'; $out='{tmp} \vc_redist.x64.exe'; if (-not (Test-Path $out)) { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri $url -OutFile $out -UseBasicParsing }; Start-Process -FilePath $out -ArgumentList '/install','/quiet','/norestart' -Wait -NoNewWindow" " " ; StatusMsg : " Installing Visual C++ Redistributables..." ; Check : not IsVCRedistInstalled() and (Arch = " x64 " ); Flags : runhidden waituntilterminated
112- Filename : " powershell.exe" ; Parameters : " -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -Command " " $url='https://aka.ms/vs/17/release/vc_redist.arm64.exe'; $out='{tmp} \vc_redist.arm64.exe'; if (-not (Test-Path $out)) { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri $url -OutFile $out -UseBasicParsing }; Start-Process -FilePath $out -ArgumentList '/install','/quiet','/norestart' -Wait -NoNewWindow" " " ; StatusMsg : " Installing Visual C++ Redistributables..." ; Check : not IsVCRedistInstalled() and (Arch = " arm64 " ); Flags : runhidden waituntilterminated
111+ Filename : " powershell.exe" ; Parameters : " -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -Command " " $url='https://aka.ms/vs/17/release/vc_redist.x64.exe'; $out='{tmp} \vc_redist.x64.exe'; if (-not (Test-Path $out)) { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri $url -OutFile $out -UseBasicParsing }; Start-Process -FilePath $out -ArgumentList '/install','/quiet','/norestart' -Wait -NoNewWindow" " " ; StatusMsg : " Installing Visual C++ Redistributables..." ; Check : not IsVCRedistInstalled() and IsX64Arch( ); Flags : runhidden waituntilterminated
112+ Filename : " powershell.exe" ; Parameters : " -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -Command " " $url='https://aka.ms/vs/17/release/vc_redist.arm64.exe'; $out='{tmp} \vc_redist.arm64.exe'; if (-not (Test-Path $out)) { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri $url -OutFile $out -UseBasicParsing }; Start-Process -FilePath $out -ArgumentList '/install','/quiet','/norestart' -Wait -NoNewWindow" " " ; StatusMsg : " Installing Visual C++ Redistributables..." ; Check : not IsVCRedistInstalled() and IsArm64Arch( ); Flags : runhidden waituntilterminated
113113Filename : " {app} \{#ExeBasename}.exe" ; Description : " {cm:LaunchProgram,{#NameLong}}" ; Tasks: runcode; Flags : nowait postinstall skipifdoesntexist ; Check : ShouldRunAfterUpdate() and ExecutableExists()
114114Filename : " {app} \{#ExeBasename}.exe" ; Description : " {cm:LaunchProgram,{#NameLong}}" ; Flags : nowait postinstall skipifdoesntexist ; Check : (not WizardSilent()) and ExecutableExists()
115115
@@ -1307,6 +1307,25 @@ begin
13071307 Result := not IsBackgroundUpdate();
13081308end ;
13091309
1310+ // Helper functions to check architecture at runtime
1311+ function IsX64Arch (): Boolean;
1312+ begin
1313+ #if " x64" == Arch
1314+ Result := True;
1315+ #else
1316+ Result := False;
1317+ #endif
1318+ end ;
1319+
1320+ function IsArm64Arch (): Boolean;
1321+ begin
1322+ #if " arm64" == Arch
1323+ Result := True;
1324+ #else
1325+ Result := False;
1326+ #endif
1327+ end ;
1328+
13101329// Check if Visual C++ Redistributables are installed
13111330function IsVCRedistInstalled (): Boolean;
13121331var
0 commit comments