Download “Upgrade_and_Install_blog.coretech.dk.zip” Upgrade_and_Install_blog.ctglobalservices.com_.zip – Downloaded 721 times –

a couple of weeks ago I wrote an article about the new script that enabled the user to find product code automatically from the product have, you can read it here

I promised to do a follow up! explaining how to uninstall, then afterward install iTunes (or any other product), without knowing the version/product code.

By using the function from the other article this is very easily done:


All we have is the product code finder function, and uninstall function, and a log function.

We call the uninstall function sending the productcode as a parameter.

This product code I found by using the GetProductCode function in the same line.

After the uninstall, we install the msi packages again. Using error handling we check if the install is OK (0 = Success, 3010 = success but reboot pending)

otherwise we call the logerror function, which will log the error to the errorlog on the local PC. this means we can after a deployment, connect to the eventlog and read the error messages, if needed.