MSDeploy runCommand using relative path

前端 未结 2 1831
臣服心动
臣服心动 2020-12-31 06:07

I am trying to run a command as a part of my packaging/deployment process via MSDeploy. In particular, I am trying to create a custom event log by running installut

2条回答
  •  心在旅途
    2020-12-31 06:31

    I realize this isn't the answer you probably wanted to hear but this is how I got around it.

    We created a powershell script on the destination server. So instead of running your command:

    installutil C:\inetpub\wwwroot\MyTestApp\bin\BusinessLayer.dll ... etc
    

    We would run:

    c:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe d:\powershell\installSites.ps1 siteName 

    The "sitename" is being passed in as a param into the powershell script. Inside the script it knows on that destination server which files to install, any commands that need to run, app pools to recycle, etc.

    Again, not as easy as finding a relative path, but it does the job.

提交回复
热议问题