Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Installation Folder Url after publish the Application

How can I change the Installation Folder Url and Update location of a C# click once application after publish the application using MSBuild.exe

like image 671
Sumeshk Avatar asked Aug 17 '13 06:08

Sumeshk


1 Answers

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]/"

like image 72
Sumeshk Avatar answered Oct 21 '22 10:10

Sumeshk