Giter Club home page Giter Club logo

wixpowershellexample's Introduction

WiXPowerShellExample

wixpowershellexample's People

Contributors

damienbod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wixpowershellexample's Issues

MSI installer - invoke PowerShell script

I have a blocker in MSI installer package creation, please find the below details and let me know if any solutions,

  • I wants that PowerShell script as MSI installer package
  • Working in visual studio 2017 community version to make MSI installer package
  • For that I used WIX installer commands and created wxs file to make MSI
  • Successfully created MSI installer using WIX but while installing that MSI, it’s not invoking PowerShell script
    o But I could see that application installed ( listed in control panel & installation folder is created in C:\programFiles)
  • Used wix SetProperty, CustomAction & InstallExecuteSequence cmd but no luck with invoking Powershell script

wxs file :






<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="InvokeTestPS1"
         Before="InstallFinalize"
         Sequence="execute"
         Value ="&quot;[POWERSHELLEXE]&quot; -Version 2.0 -NoProfile -NonInteractive -InputFormat None -ExecutionPolicy Bypass -Command &quot;&amp; '[#InvokeTestPS1]' ; exit $$($Error.Count)&quot;" />
<CustomAction Id="InvokeTestPS1"
              BinaryKey="WixCA"
              DllEntry="WixSilentExec"
              Execute="immediate"
              Return="check"
              Impersonate="yes" />
<InstallExecuteSequence>
  <Custom Action="InvokeTestPS1" After="InstallFinalize">
    <![CDATA[NOT Installed]]>
  </Custom>
</InstallExecuteSequence>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.