Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 3.2 not installable on Win7 #7079

Closed
mast-eu opened this issue Aug 30, 2019 · 8 comments · Fixed by #7090
Closed

version 3.2 not installable on Win7 #7079

mast-eu opened this issue Aug 30, 2019 · 8 comments · Fixed by #7090

Comments

@mast-eu
Copy link
Member

mast-eu commented Aug 30, 2019

Current behaviour

I was testing the MSI for the upcoming 3.2 release. Seems like it can be normally installed on Win10, but not on Win7.
Could someone on Win7 please doublecheck?

Expected behaviour

Installs also on Win7 without issues.

Steps to reproduce

  1. Download the artifact from https://ci.appveyor.com/project/gitextensions/gitextensions/builds/26854222/artifacts. This is build 6443, coresponding to 6fe0126, the current tip of branch release/3.2.
  2. Extract the ZIP archive and launch GitExtensions-3.2.0.6443.msi, just like you normally would.
  3. Go through the configuration dialogs. As far as I can tell, it doesn't matter what options you select. Go with your preferences.
  4. After the last dialog, the installer will start installing GitExtension 3.2, but roll back everything before finishing.

Screenshots

Untitled

Did this work in previous version of GitExtensions

Yes.

Debug

Launch the installer again from command line with msiexec.exe /i GitExtensions-3.2.0.6443.msi /L*vx! debug.log. This creates a detailed log file.

I think the key part is:

Action 23:48:35: ConfigureTelemetry. 
MSI (s) (90:08) [23:48:35:762]: Executing op: CustomActionSchedule(Action=ConfigureTelemetry,ActionType=1025,Source=BinaryData,Target=WixQuietExec,CustomActionData="C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" -Version 3.0 -NoProfile -NonInteractive -InputFormat None -ExecutionPolicy Bypass -Command "& 'C:\Program Files (x86)\GitExtensions\set-telemetry.ps1' 1 ; exit $($Error.Count)")
MSI (s) (90:D8) [23:48:35:765]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIC876.tmp, Entrypoint: WixQuietExec
WixQuietExec:  Impossibile avviare Windows PowerShell versione 3.0 perch‚ non Š installato correttamente.
WixQuietExec:  Error 0xfffa0000: Command line returned an error.
WixQuietExec:  Error 0xfffa0000: QuietExec Failed
WixQuietExec:  Error 0xfffa0000: Failed in ExecCommon method
CustomAction ConfigureTelemetry returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 23:48:35: InstallFinalize. Return value 3.

Basically, it is trying to run PowerShell 3.0, which is not available on Win7.

@mast-eu mast-eu added type: regression regression, normally to latest official release ❕ priority: high labels Aug 30, 2019
@mast-eu mast-eu added this to the 3.2.0 milestone Aug 30, 2019
@RussKie
Copy link
Member

RussKie commented Aug 30, 2019 via email

@mast-eu
Copy link
Member Author

mast-eu commented Aug 30, 2019

Up-to-date Win7 SP1 (Home Premium) with PowerShell 2.0.

> $PSVersionTable

Name                           Value                                           
----                           -----                                           
CLRVersion                     2.0.50727.8806                                  
BuildVersion                   6.1.7601.17514                                  
PSVersion                      2.0                                             
WSManStackVersion              2.0                                             
PSCompatibleVersions           {1.0, 2.0}                                      
SerializationVersion           1.1.0.1                                         
PSRemotingProtocolVersion      2.1  

@RussKie
Copy link
Member

RussKie commented Sep 1, 2019

Can you try changing this to PS 2.0 and see if it fixes it?
https://github.com/gitextensions/gitextensions/blob/master/Setup/UI/TelemetryDlg.wxs#L20

@mast-eu
Copy link
Member Author

mast-eu commented Sep 1, 2019

Can you try changing this to PS 2.0 and see if it fixes it?

I tried, and it did not fix it. However, you helped me to get further:
Now it's complaining that the method IsNullOrWhitespace in

[bool]$telemetryEnabled = -not [string]::IsNullOrWhiteSpace($Enabled);
hasn't been found. In fact, IsNullOrWhitespace does not exist in PowerShell 2.0. I have IsNullOrEmpty, though.
Thus, I changed the line to [bool]$telemetryEnabled = -not [string]::IsNullOrEmpty($Enabled); , built the MSI again and ran it on my Win7 machine.

This time, the installation was successful and in GitExtensions.settings I find

<item>
   <key>
     <string>TelemetryEnabled</string>
   </key>
   <value>
     <string>True</string>
   </value>
 </item>

So it's seems to work. I write seems, because, using IsNullOrEmpty was just a quick shot from the hip:

  • I did not test on Win10.
  • I did not test to disable telemetry (i.e. to change the passed parameter).
  • I am not sure that this will always work as intended.

Maybe tomorrow I can dedicate more time on this, if needed.

@RussKie
Copy link
Member

RussKie commented Sep 2, 2019

hasn't been found. In fact, IsNullOrWhitespace does not exist in PowerShell 2.0. I have IsNullOrEmpty, though.
Thus, I changed the line to [bool]$telemetryEnabled = -not [string]::IsNullOrEmpty($Enabled); , built the MSI again and ran it on my Win7 machine.

Great! It is perfectly valid to use IsNullOrEmpty, I just made a habbit of using IsNullOrWhitespace.

You could also write the line as follows:

[bool]$telemetryEnabled = ![string]::IsNullOrEmpty($Enabled);

I have done quite a bit of testing of the original change for various use-cases, so it should "just work" (c) 😎

@RussKie
Copy link
Member

RussKie commented Sep 2, 2019

As part of your fix I suggest to add a comment before line 17 in TelemetryDlg.wxs saying something like:

"<!-- Windows 7SP1 supports only PowerShell 2.0 -->"

@mast-eu
Copy link
Member Author

mast-eu commented Sep 2, 2019

I could probably send a PR this evening (CET). Do you prefer it to master, release/3.2 or both branches?

@RussKie
Copy link
Member

RussKie commented Sep 2, 2019 via email

@RussKie RussKie added type: bug 🐛 area: installer and removed type: regression regression, normally to latest official release labels Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants