Sumeshk
Sumeshk

Reputation: 1988

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

Upvotes: 7

Views: 4865

Answers (1)

Sumeshk
Sumeshk

Reputation: 1988

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

Upvotes: 4

Related Questions