我無法找出將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