$uka
Posts: 13
Joined: Mon Jan 09, 2017 8:51 pm

installer hangs when executing powershell script

Hi,

I'm using Advanced Installer 13.5 74683 and custom action with powershell script causes my installer process to hang.
It just shows "Configuring ..." with my app name, window remains responsive.

For this to reproduce powershell script must access the installer process object MainWindowTitle property for example like this:

Code: Select all

	$processes= Get-Process -Name "InstallerProcess" -ErrorAction Continue
	foreach($process in $processes)
	{
		#I don't want to kill installer process
		if($process.MainWindowTitle -ne "InstallerProcessTitle")
		{
			try 
			{
				$process.Kill()
			}
			catch 
			{
			}
		}
	}
I've attached app start action and powershell script custom action.

Can you confirm is this a bug? Is there any workarounds?

Thanks
Attachments
start-installed-app-action.png
start-installed-app-action.png (46.34 KiB) Viewed 3700 times
powershell-script-action.png
powershell-script-action.png (47.12 KiB) Viewed 3700 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: installer hangs when executing powershell script

Hello,

I tested the scenario but I cannot replicate the behavior. Can you please try to send us a small buildable sample (AIP + its referenced files) to support at advancedinstaller dot com so we can fully test and investigate this on our side?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
$uka
Posts: 13
Joined: Mon Jan 09, 2017 8:51 pm

Re: installer hangs when executing powershell script

Hello,

Thanks for the response! But I've figured it out.
It was Windows Defender - it was heuristically scanning my setup and did not like the powershell script at all (it was deleting from program files also querying for process properties) and Windows Defender caused the hang. Antivirus systems are becoming more and more vicious, one day they will block Notepad from launching.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: installer hangs when executing powershell script

You're always welcome.

Thank you for your follow up. This is good to know.

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

Return to “Common Problems”