Uninstalling SQL Server Developer Tools CTP3 (Code-named “Juneau”)

If you have previously installed SQL Server Developer Tools, CTP3 Code-named “Juneau”  and are wanting to upgrade to the SSDT CTP4 bits released today, this post will provide the necessary steps to totally remove CTP3 from your machine. Keep in mind that it is recommended that you start using CTP4 from a machine that has not had Juneau previously installed on it.

Note: The following must be done at your own risk, as the scripts and steps within are provided “as-is.”

If you have previously installed SQL Server Developer Tools CTP3, Code-named “Juneau” and would like to fully remove the product, do the following:

1. If you do not have it already, download and install PowerShell 2.0 from https://support.microsoft.com/kb/968929 (Most systems already have PowerShell installed, including Windows 7)

2. Download Windows Installer PowerShell Module (Module.msi) from https://psmsi.codeplex.com/releases/view/35457 - Do not select “Run” if prompted by the browser, make sure you choose to only “Save” the file.

clip_image002

3. Start a new Windows Command Prompt session as an Administrator. (Right-click on Command Prompt in the programs list and select Run As Administrator)

4. From the command prompt, navigate to the location where you downloaded Module.msi

5. At the command prompt, execute the command ‘msiexec /i Module.msi’ to kick off the installer.

image

6. Once the Module.msi has finished installing, download the CTP3 Uninstall PowerShell script from here

7. Open a new PowerShell session as an Administrator (Right-click Windows PowerShell in the programs list and select Run As Administrator)

clip_image006

8. From the PowerShell prompt, navigate to the directory to which the uninstall script was downloaded.

9. The script you have downloaded is not a signed script, therefore you must change your PowerShell execution policy to enable unsigned script execution, if it is not so already. Do this by running ‘Set-ExecutionPolicy RemoteSigned’ from the PowerShell command prompt as this will allow you to run unsigned scripts.

UPDATE (11/22/11): It has been reported that using the RemoteSigned policy may not fully enable script execution due it the file having been downloaded from the internet. If you find that this is the case, here are two workarounds available at this time. The first is to use the ‘set-executionpolicy unrestricted’ command instead of the RemoteSigned command above, then execute the script. The second workaround is to right-click on the downloaded uninstall.ps1 –> Properties. Click the ‘Unblock’ button from the General tab of the Properties dialog, if it is available. This should enable you to run the script as in step 10, without having to first change the execution policy. Note – The browser which you used to download the script may affect what you must do to enable script execution.

10. In the PowerShell prompt, type ‘.\uninstall.ps1’ to initiate the SSDT CTP3 uninstall process.  

11. You will be prompted several times during script execution for user input in order to continue the uninstall process. In order to continue uninstalling, press the ‘y’ key and press Enter to confirm.

clip_image008y

-Sample screenshot from partway through execution of the uninstall script-

12. NB – The system may reboot while uninstalling various products or patches. If this happens and your system is rebooted, go back to Step 7 (Run PowerShell as Administrator) and re-run the script. The script will continue from where it left off.

13. The script will re-run itself after it has finished executing to detect if all uninstalls have been carried out successfully.

clip_image010

14. At this point, you have successfully uninstalled SQL Server Developer Tools CTP3 (Code-name “Juneau”).

15. After this process is complete, you should not have to re-install VS2010/SP1 as these should be untouched by the uninstall script.

16. Go here, and follow the “Get It” link to download SSDT CTP4!