private string GetExeFileCommandLineArguments(CodeActivityContext context) { string doNotDeleteArgument = "-enableRule:DoNotDeleteRule"; string computerNameArgument = string.Format("computerName='{0}',", ComputerName.Get(context)); string userNameArgument = string.Format("userName='******',", Username.Get(context)); string passwordArgument = string.Format("password='******',", Password.Get(context)); string webApplicationArgument = string.Format("-setParam:'IIS Web Application Name'='{0}'", IISWebApplication.Get(context)); string msdeployArguments = (Test.Get(context) ? "-whatif" : ""); msdeployArguments += " -source:package='{0}' -dest:auto,{1}{2}{3}authtype='Basic',includeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:\"{4}\" {5} {6} {7} {8}"; msdeployArguments = string.Format(msdeployArguments, Path.GetFullPath(ZipPackageFilename.Get(context)), (string.IsNullOrEmpty(ComputerName.Get(context)) ? "" : computerNameArgument), (string.IsNullOrEmpty(Username.Get(context)) ? "" : userNameArgument), (string.IsNullOrEmpty(Password.Get(context)) ? "" : passwordArgument), Path.GetFullPath(ParamFilename.Get(context)), (string.IsNullOrEmpty(IISWebApplication.Get(context)) ? "" : webApplicationArgument), (DoNotDeleteFiles.Get(context) ? doNotDeleteArgument : ""), (AllowUntrustedSSLConnection.Get(context) ? "-allowUntrusted" : ""), (!string.IsNullOrEmpty(CommandLineParams.Get(context)) ? CommandLineParams.Get(context) : "")).Trim(); return(msdeployArguments); }
private string GetCmdFileCommandLineArguments(CodeActivityContext context) { string doNotDeleteArgument = "-enableRule:DoNotDeleteRule"; string computerNameArgument = string.Format("/M:{0}", ComputerName.Get(context)); string userNameArgument = string.Format("/U:{0}", Username.Get(context)); string passwordArgument = string.Format("/P:{0}", Password.Get(context)); string webApplicationArgument = string.Format("\"-setParam:'IIS Web Application Name'='{0}'\"", IISWebApplication.Get(context)); string msdeployArguments = (Test.Get(context) ? "/t" : "/y"); msdeployArguments += " {0} {1} {2} {3} {4} {5} {6}"; msdeployArguments = string.Format(msdeployArguments, (!string.IsNullOrEmpty(IISWebApplication.Get(context)) ? webApplicationArgument : ""), (DoNotDeleteFiles.Get(context) ? doNotDeleteArgument : ""), (!string.IsNullOrEmpty(ComputerName.Get(context)) ? computerNameArgument : ""), (!string.IsNullOrEmpty(Username.Get(context)) ? userNameArgument : ""), (!string.IsNullOrEmpty(Password.Get(context)) ? passwordArgument : ""), (AllowUntrustedSSLConnection.Get(context) ? "-allowUntrusted" : ""), (!string.IsNullOrEmpty(CommandLineParams.Get(context)) ? CommandLineParams.Get(context) : "")).Trim(); return(msdeployArguments); }