johjoh70771
Flexera beginner

The CA specification "Run 64-bit Powershell script" seams to have no influence

Hello,

I have the impression, that the CA specification "Run 64-bit Powershell script" does not work, has no influence.

Bug or feature?

Regards
Johannes

Labels (1)
Tags (1)
0 Kudos
5 Replies
varul
Revenera
Revenera

Re: The CA specification "Run 64-bit Powershell script" seams to have no influence

Hello,
What version of installshield you are using?

When you set the "Run 64-bit Powershell script" you are not seeing the customaction running on a 32 bit or 64 bit machine?
0 Kudos
varul
Revenera
Revenera

Re: The CA specification "Run 64-bit Powershell script" seams to have no influence

I have attached the sample project with powershell customaction, Please try the sample and see its working or not.

 

 

 

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: The CA specification "Run 64-bit Powershell script" seams to have no influence

Here's a quick example project with its installer with "Run 64-bit Powershell Script = Yes"

It will just pop up a message box with "Operation complete" showing the powershell custom action fired.

0 Kudos
johjoh70771
Flexera beginner

Re: The CA specification "Run 64-bit Powershell script" seams to have no influence

Many thanks to you both!

This solution seams to work in 32-bit- and in 64-bit-environment.

But in my tests in about 40% , the messagebox pops up behind my dialog.

Is there a way to make it sure, that the box pops up in front?

Regards
Johannes

 

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

Re: The CA specification "Run 64-bit Powershell script" seams to have no influence

This behaviour is due to how the Windows OS handles the popups - and not caused by Installshield.

You would need to include something in the powershell to get the OS to handle the window and set it to the foreground.

An example of a windows API that could help:

SetForegroundWindow function:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforegroundwindow

There are some examples of powershell using this API here: 
https://stackoverflow.com/questions/12801563/powershell-setforegroundwindow 

0 Kudos