3

I am trying to msdeploy to restore the site on destination computer from the package i created on source IIS 7 site. The destination server IIS is also IIS7. The destination server however does not have the drive D: as the physical drive. the D: is associated to a CD Row drive. I use the replace attribute while using msdeploy but the rule does not work. Below is my command msdeploy -verb:sync -source:package=d:\site.zip -dest:apphostconfig="Default Web Site" -replace:objectName="metaProperty",scopeAttributeName="name",scopeAttributeValue="Path",targetAttributeName="value",match="d:",replace="c:" -verbose -whatif > msdeploysync.log

However, the -whatif does not show the path changed to C: and also if i run the command, i get message saying "Device not ready" which means that the D: replace is not working.

i am stuck.. any help ?

1 Answer 1

3

The provided mechanism for changing the path (in a non-IIS version specific way, mind you) is to set a parameter of kind DestinationVirtualDirectory:

-setParam:kind=DestinationVirtualDirectory,scope="Default Web Site",value="c:\full\path\to\website"

If you would like to strick to simply replacing the drive, try changing your replace directive to this:

-replace:objectName=virtualDirectory,scopeAttributeName=physicalPath,match=^C:,replace=D:

Here's some official docs on the various parameter types: Using declareParam and setParam

Sign up to request clarification or add additional context in comments.

1 Comment

Let me try this today. but looks reasonable. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.