cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Occasional contributor

PowerShell detection via System Search

Jump to solution

InstallShield 2014 Premier Edition 

In the basic msi package  we use InstallShield pre-defined check for PowerShell by searching the following registry:

HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine

Value: PowerShellVersion

 

This registry entry does not exist in some  Server even though a new Powershell version is installed.

Is there any InstallShield recommendation for this?

Or should I use following advice:

https://devblogs.microsoft.com/powershell/windows-powershell-2-0-deprecation/

=============================================================================

Installation Checks for Windows PowerShell 2.0

You may also have a legacy application that checks for the existence of Windows PowerShell on the box via the registry, particularly for the existence of HKLM:\Software\Microsoft\Windows\PowerShell\1\PowerShellEngine. As long as your application only targets supported versions of Windows and Windows Server (7/8.1/10 and Server 2008R2/2012/2012R2/2016), you can remove this validation altogether.

If not, you should instead check for the existence of the file %systemroot%\system32\WindowsPowerShell\v1.0\powershell.exe. If your installer absolutely requires a registry-based validations, you should first check for HKLM:\Software\Microsoft\PowerShell\3\PowerShellEngine (note the 3) before falling back to HKLM:\Software\Microsoft\PowerShell\1\PowerShellEngine.

=======================================================================================

 

0 Kudos
1 Solution

Accepted Solutions
Flexera
Flexera

Re: PowerShell detection via System Search

Jump to solution

Hi @angela_zakaim ,

 

Can you mention which server OS it doesn't have mentioned registry entry?There are two registry entries in general where powershell installation can be detected.

HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\Install

and

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3

 The later one as system search is accepted as an enhancement and will be fixed in future releases from InstallShield.

I would also recommend you to consider things given under Windows PowerShell 2.0 deprecation as well for future benefits.

 

Thanks,

Jenifer

 

View solution in original post

4 Replies
Highlighted
Flexera
Flexera

Re: PowerShell detection via System Search

Jump to solution

Hi @angela_zakaim ,

 

How about using Windows Powershell application requirement from Project Assistant->Installation Requirements->Software Requirement(Select yes)->Windows PowerShell?

 

If you want to prevent the entire installation from running if PowerShell is not installed, you can use the Installation Requirements page of the Project Assistant (instead of the System Search view) to add the PowerShell system search to your project. If you do that, InstallShield uses the POWERSHELLVERSION property in a launch condition for the installation.

Referral link:https://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/CAPowerShell.htm?#targetText=...

 

Thanks,

Jenifer

0 Kudos
Highlighted
Occasional contributor

Re: PowerShell detection via System Search

Jump to solution

Hello Jenifer,

Thank you for your reply.

I have tried these ways. They all use \create the System Search for the registry entry:

Key: HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine

Value: PowerShellVersion

and as I wrote previously, this doesn't seem to be correct in some cases.

Hence, I wondered if IS is aware of that.

Thank you.

Angela

0 Kudos
Flexera
Flexera

Re: PowerShell detection via System Search

Jump to solution

Hi @angela_zakaim ,

 

Can you mention which server OS it doesn't have mentioned registry entry?There are two registry entries in general where powershell installation can be detected.

HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\Install

and

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3

 The later one as system search is accepted as an enhancement and will be fixed in future releases from InstallShield.

I would also recommend you to consider things given under Windows PowerShell 2.0 deprecation as well for future benefits.

 

Thanks,

Jenifer

 

View solution in original post

Highlighted
Occasional contributor

Re: PowerShell detection via System Search

Jump to solution

Hello Jenifer,

The OS is Windows Server 2019 and it seems the customer has uninstalled PowerShell 2.0 for security reasons.

We will modify our install as needed.

This issue can be closed.

Thank you.

 

0 Kudos