Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 如何在Visual Installer中打包powershell脚本,以及如何在MSI安装期间运行ps1文件?_Visual Studio_Powershell_Windows Installer_Installation - Fatal编程技术网

Visual studio 如何在Visual Installer中打包powershell脚本,以及如何在MSI安装期间运行ps1文件?

Visual studio 如何在Visual Installer中打包powershell脚本,以及如何在MSI安装期间运行ps1文件?,visual-studio,powershell,windows-installer,installation,Visual Studio,Powershell,Windows Installer,Installation,我已使用Visual installer创建了一个msi安装程序,但我想向安装程序添加一个powershell脚本(script.ps1)。该脚本应在MSI安装期间执行 我已将script.ps1添加到应用程序文件夹中,但在安装过程中如何执行它 是否必须添加包含以下命令的注册表项: powershell -file "C:\script.ps1" 我不明白如何实现我的目标。我发现有一篇帖子问了同样的问题,但是针对bat文件,但是没有太多的解决方案,我不理解帖子中给出的提示。这是

我已使用Visual installer创建了一个msi安装程序,但我想向安装程序添加一个powershell脚本(script.ps1)。该脚本应在MSI安装期间执行

我已将script.ps1添加到应用程序文件夹中,但在安装过程中如何执行它

是否必须添加包含以下命令的注册表项:

powershell -file "C:\script.ps1"
我不明白如何实现我的目标。我发现有一篇帖子问了同样的问题,但是针对bat文件,但是没有太多的解决方案,我不理解帖子中给出的提示。这是