[wix-users] Help Required
Edwin Castro
egcastr at gmail.com
Tue Oct 18 22:13:28 PDT 2022
[#InputformPS1] has to match your file id. I'd guess a verbose log will
indicate the value of InputformPS1 property shows that [#InputformPS1] is
getting evaluated as the empty string.
The file id of your script is Id="inputform.ps1". Try [#inputform.ps1]
instead.
--
Edwin G. Castro
On Tue, Oct 18, 2022, 21:49 Sai Kiran <kiransai.inturi at outlook.com> wrote:
> 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"
> xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
> xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
> xmlns:script="http://wixtoolset.org/schemas/v4/wxs/powershell">
>
> <Product Id="*" UpgradeCode="{5FFE60E1-B2BF-465C-86FB-6C8EACA7C5C8}"
> Name="input" Version="1.0.0.1" 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" />
> </Feature>
> </Product>
>
> <Fragment>
> <Directory Id="TARGETDIR" Name="SourceDir">
> <Directory Id="ProgramFilesFolder">
> <Directory Id="INSTALLFOLDER" Name="mycompany" />
> </Directory>
> </Directory>
> </Fragment>
>
> <Fragment>
> <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" />[#InputformPS1]
> </Component>
> </ComponentGroup>
>
> <Property Id="POWERSHELLEXE">
> <RegistrySearch Id="POWERSHELLEXE"
> Type="raw"
> Root="HKLM"
>
> Key="SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell"
> Name="Path" />
> </Property>
>
> <Condition Message="This application requires Windows PowerShell.">
> <![CDATA[Installed OR POWERSHELLEXE]]>
> </Condition>
>
> <SetProperty Id="InputformPS1"
> Before="InputformPS1"
> Sequence="execute"
> Value =""[POWERSHELLEXE]" -Version 2.0 -NoProfile
> -NonInteractive -InputFormat None -ExecutionPolicy Bypass -Command
> "& '[#InputformPS1]' ; exit $$($Error.Count)"" />
> <CustomAction Id="InputformPS1"
> BinaryKey="WixCA"
> DllEntry="CAQuietExec"
> Execute="deferred"
> Return="check"
> Impersonate="yes" />
> <InstallExecuteSequence>
> <Custom Action="InputformPS1" After="InstallFiles">
> <![CDATA[NOT Installed]]>
> </Custom>
> </InstallExecuteSequence>
>
> </Fragment>
>
> </Wix>
> ------------------------------
> *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> 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 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.
>
> Regards,
> Saikiran
> ________________________________
> From: Sai Kiran
> Sent: Monday, October 17, 2022 5:18 PM
> To: wix-users at lists.wixtoolset.org <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,
>
> Saikiran
>
>
>
> 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