bhawkins
Posts: 19
Joined: Thu Apr 05, 2012 3:54 pm

Windows PowerShell Prerequisite

Hello,

Was wondering if anyone could help me determine the best way to find out if Windows PowerShell is installed.

This would be for Prerequisites ... MSSQL 2008 R2 Express.

I wish to determine this and then give warning to download and install .. so I only need to know if it is present or not and if not stop the install.

Cheers,
Bruce
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows PowerShell Prerequisite

Hello Bruce,
Was wondering if anyone could help me determine the best way to find out if Windows PowerShell is installed.

This would be for Prerequisites ... MSSQL 2008 R2 Express.
In order to achieve this you can add our "Windows PowerShell 1.0" predefined prerequisite before "SQL Server 2008 Express R2" prerequisite to your package.
I wish to determine this and then give warning to download and install .. so I only need to know if it is present or not and if not stop the install.
If you don't want to add "Windows PowerShell 1.0" prerequisite package to your project then you can use a custom launch condition which will check if the related package is installed or not on target machine.

In order to achieve this you can proceed like this:
- Go to "Search" page and add a new extended search (i.e. MY_SEARCH) like this:
  • Criteria: Registry value exists
    Registry Value: HKLM\SOFTWARE\Microsoft\PowerShell\1\Install
- Go to "Launch Condition" page -> "Custom" tab and add a new custom launch condition, using [New...] button, like this:
  • Condition: MY_SEARCH
    Description: Desired message
-Build and run your project.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bhawkins
Posts: 19
Joined: Thu Apr 05, 2012 3:54 pm

Re: Windows PowerShell Prerequisite

Hello Daniel,

Perfect, exactly what I needed.

I do not wish to install due to the possibility of reboot for WI and PowerShell. I just wish to indicate these are required and then wish to provide links for them to download and install themselves.

I do not wish to be responsible for a server having to be rebooted as a direct result of something we did.

Is there any way to display a http URL link on the customized dialog message?

Thanks again.
Cheers,
Bruce
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Windows PowerShell Prerequisite

Hello Bruce,
Is there any way to display a http URL link on the customized dialog message?
I'm afraid this is not possible.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”