[wix-users] Help Required

Sai Kiran kiransai.inturi at outlook.com
Tue Oct 18 21:49:31 PDT 2022

Below is the script i have executed in wix installer. By executing the below script it is only creating folder in program file (x86) and powershell script is residing inside the folder but it is not getting executed.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"

      <Product Id="*" UpgradeCode="{5FFE60E1-B2BF-465C-86FB-6C8EACA7C5C8}" Name="input" Version="" Manufacturer="mycompany" Language="1033">
            <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Comments="Windows Installer Package"/>
            <MediaTemplate EmbedCab="yes"/>

            <Feature Id="ProductFeature" Title="mycompany" Level="1">
                  <ComponentGroupRef Id="ProductComponents" />

            <Directory Id="TARGETDIR" Name="SourceDir">
                  <Directory Id="ProgramFilesFolder">
                        <Directory Id="INSTALLFOLDER" Name="mycompany" />

            <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
             <Component Id="inputform.ps1" Guid="{87CB3CED-0101-4271-80DD-0D3AB7210343}">
     <File Id="inputform.ps1" Source="inputform.ps1" KeyPath="yes" Checksum="yes" />

            <Property Id="POWERSHELLEXE">
                  <RegistrySearch Id="POWERSHELLEXE"
                     Name="Path" />

            <Condition Message="This application requires Windows PowerShell.">
                  <![CDATA[Installed OR POWERSHELLEXE]]>

            <SetProperty Id="InputformPS1"
             Value =""[POWERSHELLEXE]" -Version 2.0 -NoProfile -NonInteractive -InputFormat None -ExecutionPolicy Bypass -Command "& '[#InputformPS1]' ; exit $$($Error.Count)"" />
            <CustomAction Id="InputformPS1"
                                Impersonate="yes" />
                  <Custom Action="InputformPS1" After="InstallFiles">
                        <![CDATA[NOT Installed]]>


From: Edwin Castro <egcastr at gmail.com>
Sent: Wednesday, October 19, 2022 4:37 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Sai Kiran <kiransai.inturi at outlook.com>
Subject: Re: [wix-users] Help Required

Hi Saikiran,

You're not really giving us a whole lot of information to go on.

What is your current authoring?
How are you validating that the powershell script is getting executed?
What does the log say?

Edwin G. Castro

On Tue, Oct 18, 2022 at 3:26 PM Sai Kiran via wix-users <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>> wrote:
Hi all,

I have tried custom actions also still it is not working. Could anyone who is willing to help me can connect with me in ms teams to my mail id: kiransai.inturi at outlook.com<mailto:kiransai.inturi at outlook.com> or you can mail to me.

From past one month onwards iam trying to execute the powershell script through wix installer pls help in solving this.

Thanks in advance.

From: Sai Kiran
Sent: Monday, October 17, 2022 5:18 PM
To: wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org> <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Subject: Help Required

Dear all,

I was trying to run powershell script using wix installer through visual studio. Either by using setup project or bootstrapper bundle how to run/write powershell script in the project.

Pls guide me.

NOTE: Kindly treat it as a high priority

Thanks and Regards,


Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

More information about the wix-users mailing list