我无法找出将Notepad ++的默认安装路径更改为我希望在运行我的Powershell脚本时要安装的驱动器的参数。我正在尝试执行无提示安装,并且无法手动更改它。有谁知道我可以添加什么参数来将该程序安装到E:\
驱动器上?下面是我的代码和我在PowerShell中尝试的内容。我一直在讨论很多关于-ArgumentList
的参数,以便弄清楚我是否可以将它指向E:\
驱动器,但目前为止还没有运气。如何在PowerShell中更改记事本++的默认安装路径
function install-Notepadpp()
{
$install="*PATH*\npp.6.6.2.Installer.exe"
Start-Process -FilePath $install -ArgumentList '/InstallDirectoryPath:"E:\"','/S' -Wait -Verb RunAs
Write-Host “Notepad++ has been installed.” -ForegroundColor Green}
##### This is Windows calling the function to install the script
install-Notepadpp