My workaround is to have my batch file modify the deployment manifest file with something like: (use your filename instead of yourfilenamegoeshere.application)
ECHO Adding trustURLParameters="true" to deployment manifest... IF EXIST ".\BuildClickOnceInstallationPackageReplaceText.vbs" del ".\BuildClickOnceInstallationPackageReplaceText.vbs" /F /Q IF ERRORLEVEL 1 GOTO TheError echo Set objFS=CreateObject("Scripting.FileSystemObject") > BuildClickOnceInstallationPackageReplaceText.vbs IF ERRORLEVEL 1 GOTO TheError echo strFile = WScript.Arguments.Item(0) >> BuildClickOnceInstallationPackageReplaceText.vbs IF ERRORLEVEL 1 GOTO TheError echo Set objFile = objFS.OpenTextFile(strFile,1,False,0) >> BuildClickOnceInstallationPackageReplaceText.vbs IF ERRORLEVEL 1 GOTO TheError echo allTheContents = objFile.ReadAll >> BuildClickOnceInstallationPackageReplaceText.vbs IF ERRORLEVEL 1 GOTO TheError echo objFile.Close >> BuildClickOnceInstallationPackageReplaceText.vbs IF ERRORLEVEL 1 GOTO TheError echo Set objFile = objFS.OpenTextFile(strFile,2,True,0) >> BuildClickOnceInstallationPackageReplaceText.vbs IF ERRORLEVEL 1 GOTO TheError echo objFile.Write Replace(allTheContents,"<deployment ","<deployment trustURLParameters=""true"" ") >> BuildClickOnceInstallationPackageReplaceText.vbs IF ERRORLEVEL 1 GOTO TheError echo objFile.Close >> BuildClickOnceInstallationPackageReplaceText.vbs cscript /nologo BuildClickOnceInstallationPackageReplaceText.vbs yourfilenamegoeshere.application IF ERRORLEVEL 1 GOTO TheError IF EXIST ".\BuildClickOnceInstallationPackageReplaceText.vbs" del ".\BuildClickOnceInstallationPackageReplaceText.vbs" /F /Q IF ERRORLEVEL 1 GOTO TheError pause exit :TheError ECHO Error occurred. Aborting mission. pause
No comments:
Post a Comment