I am trying to install Reportviewer 2015 using Package resource in my servers on top of old Reportviewer. The old reportviewer was also installed through DSC.
Is there any way to modify the DSC script so that the same script will uninstall the old version and install the new version without affecting the applications which depend on the reportviewer?
Or can we modify the package module in any way so that we can Ensure a particular version of Package is present in server and a particular version is not there?
Existing Code :
Everything is possible with enough donuts and time...
Honestly I dont know the details of what you're trying to do BUT typically the ProductID/Name tends to be unique across releases so you can maybe use the ensure=absent on the "old" version then add it to the dependson of the new.
You are right, but If I write a package resource to uninstall the older version and another resource to install new version in my automation script, every time the script runs it will do both jobs. Again after first time I don't need the uninstall resource to be there. So , in a way that will be junk in my code.
I think if we have a version parameter in Package module , it will solve the problem. If we mention a version it will search for the particular installer version in the directory specified and install it.
That simply sounds like you need to refine your test-targetresource script so that it simply "checks for" the old one then quietly closes if it's not found.
Another option would simply be to write the replacement logic into you install custom resource. Then you only need to call one resource and the installation understands it needs to look for and remove the old version if found.
You must be logged in to reply to this topic.