• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 22
Solved Kodi 17.x Installation problem with KB2670838 Win7 x64
#31
(2017-03-22, 22:50)nogginthenog Wrote: I have a fix.

...

The fix that worked for me was to add "C:\Windows\System32\WindowsPowerShell\v1.0" to the Windows PATH (environment variable). That enables the executable powershell.exe to be found when the installer calls it.

After that, Kodi 17.1 installer completes succesfully on my system.

Yes, this worked for me. thanks!
Reply
#32
On my system:
c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

In System Properties >Advanced Tab > Enviroment Variables > System Variables
I added an entry:
Variabe Name: WindowsPowerShell (I also tried PowerShell)
Variable Value: %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

The same error still occurs (using the original 17.1 installer).
Reply
#33
(2017-03-23, 08:20)Hoopy Wrote: On my system:
c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

In System Properties >Advanced Tab > Enviroment Variables > System Variables
I added an entry:
Variabe Name: WindowsPowerShell (I also tried PowerShell)
Variable Value: %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

The same error still occurs (using the original 17.1 installer).

You are taking the right approach to editing an environment variable, but the variable you need to edit already exists and is called PATH, not a name like WindowsPowerShell that you invent. It contains a series of paths (folder names) where Windows will look for executable files. You need to add the folder name where powershell lives to whatever contents the PATH variable already has - in other words, do not wipe out what is already in PATH, but extend it.

For you, and others who have asked, there is any amount of help on the PATH variable available online.
Reply
#34
(2017-03-23, 03:38)acw666 Wrote: as i said on my post yesterday, 16,1 17.0 & 17.1 RC1 works correctly when installing so the powershell.exe is in the correct path.... so why is it not in the correct path for 17.1 installer..

Because, as I said in #24, the Kodi installer has only recently had code added that tries to call powershell and fails to check it can be done.

See #32 and #33 above for instructions.
Reply
#35
Hi,

My WindowsPowerShell folder is in c:\windows\SysWOW64\,
so I've added this environment variable: name: PATH value:%SYSTEMROOT%\SysWOW64\WindowsPowerShell\v1.0\
And voilà ! Setup successful
Thank you guys for having made me follow the right direction
Reply
#36
(2017-03-23, 11:29)pyrrhus Wrote: And voilà ! Setup successful
Thank you guys for having made me follow the right direction

You are welcome, Pyrrhus. It's not every day one gets the chance to help the King of Epirus and Macedon.
Reply
#37
(2017-03-22, 23:17)Rechi Wrote: Do you know why the directory where your powershell.exe is located is not in PATH?
I need to know why this is the case on your machine to do a proper fix for the installer.

Can you just pull the Powershell path from the following reg key instead:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine\ApplicationBase

edit: I have a couple of reg keys under \Powershell so you might need to recursively scan the whole HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell key and check each 'PSCompatibleVersion' value. When you find one that lists the version of PS your script requires, grab the ApplicationBase value.
Reply
#38
(2017-03-23, 14:14)beeswax Wrote: Can you just pull the Powershell path from the following reg key instead:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine\ApplicationBase

edit: I have a couple of reg keys under \Powershell so you might need to recursively scan the whole HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell key and check each 'PSCompatibleVersion' value. When you find one that lists the version of PS your script requires, grab the ApplicationBase value.

That's all very well, but if I were using powershell every day, I would probably have (a) moved it to a more convenient location (b) renamed it to something like ps.exe. Then there are people who will have, intentionally or accidentally, deleted it altogether; and then there are the different versions of Windows to consider, maybe with different registry keys; and people who have registry damage, and so on, and on, and on...

In short, you can write pages of code trying to be sure you have located an executable on other people's systems and you will still end up with something that is not fully robust. I wrote software that sold well for 20 years in 70 countries, and I can tell you, this is not the right approach. Don't try to second-guess the user's system or to fix it for them. The right approach is: try to execute the program that you need; have a reliable test to see if you succeeded in executing it; if that test fails, inform the user that the program (which you name) is missing from its proper place, and leave them to fix it.
Reply
#39
Can I please get someone to post a screenshot of how the Path Variable should be added. I have tried it multiple ways and I cannot get this fix to work for some reason. I must be missing something when trying to add it. Thank you.
Reply
#40
Thanks for all the reports that powershell directory is not in PATH.
I now changed the check to not call powershell.
Please test http://mirrors.kodi.tv/test-builds/win32...rypton.exe and response back if it is (still) working.

For anyone interested in the changes, they are https://github.com/xbmc/xbmc/commit/36abacf.
Reply
#41
(2017-03-23, 17:17)Rechi Wrote: Thanks for all the reports that powershell directory is not in PATH.
I now changed the check to not call powershell.
Please test http://mirrors.kodi.tv/test-builds/win32...rypton.exe and response back if it is (still) working.

For anyone interested in the changes, they are https://github.com/xbmc/xbmc/commit/36abacf.

Hello, I just tried to install this one, same result it fails with the same error.
Reply
#42
(2017-03-23, 17:34)pala66 Wrote: Hello, I just tried to install this one, same result it fails with the same error.

Please execute the following commands in a cmd and post the output of them here.
  • Code:
    wmic qfe get hotfixid | findstr /r "^KB2670838[^0-9]"
  • Code:
    cmd /Q /C "wmic qfe get hotfixid | findstr /r "^^KB2670838[^^0-9]""
Reply
#43
(2017-03-23, 17:17)Rechi Wrote: I now changed the check to not call powershell.

For anyone interested in the changes, they are https://github.com/xbmc/xbmc/commit/36abacf.

I really don't see that this helps at all. It still depends on PATH; the only difference is that PATH must now include the folder where wmic.exe lives (C:\Windows\System32\Wbem in my case). If that is missing, the installer will still fail. Moreover, unless I am mistaken, it will still give the wrong error message, telling the user that the hotfix is not installed, where the real problem is that wmic was not found. This is exactly the same situation as you had originally, except with wmic substituted for powershell.

In my view, whether you call powershell or wmic or anything else, you must first run it with null parameters and use some test to see whether it was able to run at all. Then if you were able to run it, run it again for your intended purpose of checking for the hotfix. This way you can report errors separately and without being misleading: an error telling the user if your executable is missing; and a separate error if it is present, ran successfully, and really did report that the hotfix is missing.

Being short of time, I have done minimal testing on this latest change, just looked at the code, so apologies if I have missed something.
Reply
#44
Thank you for you response.

I checked the PATH.
It already has the WindowsPowerShell path included.

Still getting the same error. i.e. No change using original installer.

Tried the new installer from:
http://mirrors.kodi.tv/test-builds/win32...rypton.exe

The same error
Reply
#45
(2017-03-23, 17:43)Rechi Wrote:
(2017-03-23, 17:34)pala66 Wrote: Hello, I just tried to install this one, same result it fails with the same error.

Please execute the following commands in a cmd and post the output of them here.
  • Code:
    wmic qfe get hotfixid | findstr /r "^KB2670838[^0-9]"
  • Code:
    cmd /Q /C "wmic qfe get hotfixid | findstr /r "^^KB2670838[^^0-9]""

No luck trying to run those commands either, I get the following:

C:\Users\Kodi>wmic qfe get hotfixid | findstr /r "^KB2670838[^0-9]"
'wmic' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Kodi>cmd /Q /C "wmic qfe get hotfixid | findstr /r "^^KB2670838[^^0-9]"
"
'cmd' is not recognized as an internal or external command,
operable program or batch file.
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 22

Logout Mark Read Team Forum Stats Members Help
Kodi 17.x Installation problem with KB2670838 Win7 x643