How can I change the Installation Folder Url and Update location of a C# click once application after publish the application using MSBuild.exe
Atlast i figured it myself.
Here is how :
Create a batch file by copying the following commands and replace
[PATH] -> Absolute path to mage.exe
[path to current version]-> published folder having the current version
[deploy path]-> published folder path having the exe file
[New Installation Url]-> Installation url you want to update
"[PATH]\mage.exe" -Update "[path to current version]\MyApp.application" -ProviderUrl "[New Installation Url]/MyApp.application"
"[PATH]\mage.exe" -Update "[path to current version]\MyApp.application" -AppManifest "[path to current version]\MyApp.exe.manifest"
"[PATH]\mage.exe" -Sign "[path to current version]\MyApp.application" -CertFile "[path]\TemporaryKey.pfx" -Password mypassword
"[PATH]\mage.exe" -Update [deploy path]\MyApp.application" -ProviderUrl "[New Installation Url]/MyApp.application"
"[PATH]\mage.exe" -Update "[deploy path]\MyApp.application" -AppManifest "[path to current version]\MyApp.exe.manifest"
"[PATH]\mage.exe" -Sign "[deploy path]\MyApp.application" -CertFile "[path]\TemporaryKey.pfx" -Password mypassword
"[deploy path]\setup.exe" /url="[New Installation Url]/"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With