高级安装程序 powershell 内联脚本 APPDIR 为空

问题描述

我正在使用高级安装程序。我想将一个目录从安装目录移动到另一个目录。问题是 APPDIR 变量为空。如何恢复安装目录? APPDIR 始终为空。 谢谢。

<#
.NOTES
  "pwsh.exe" is run if required version is greater or equal to 6,otherwise
  "powershell.exe" is invoked by default
#>

#Requires -version 3
Param($appDir)

$programFilesDir = [Environment]::GetEnvironmentVariable("ProgramFiles")

echo $appDir >> "D:\install.log"
echo "$appDir_Installation\Java" >> "D:\install.log"
echo "$programFilesDir" >> "D:\install.log"

Copy-Item -Path "$appDir_Installation\Java" -Destination "$programFilesDir" -Recurse

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)