Showing posts with label uninstall. Show all posts
Showing posts with label uninstall. Show all posts

Thursday, August 20, 2015

Uninstall Fonts through VBScript

I had to uninstall Helvetica and FoundersGrotesk fonts from all the machines in our environment. They had been initially been deployed through MSI a few years back when no one bothered to check if the uninstall of that MSI was actually removing the fonts. So now, since those MSI were not uninstalling the fonts from the machine, I decided to write a VBScript to delete those fonts. While I could find scripts to remove the fonts, but none of them actually helped me to remove the fonts.

I wanted a script which will delete any font starting with Helvetica or FoundersGrotesk from Windows\Fonts folder and from Registry to completely remove it.

You can use this script for other fonts, by replacing Helvetica with your font name and then change the length from 9 to the one of your fonts length. I have mentioned this in comments in the script where you need to change it.

This script will work for both 32-bit an 64-bit machines.


'Script to Delete Font
'Created by: Piyush Nasa
'Date: 21-8-2015
const HKEY_LOCAL_MACHINE = &H80000002

Dim strFolder, objFSO, objFolder, oShell, sCurDir,FileName, oFSO
strFolder = "C:\Windows\Fonts"
Set oShell = CreateObject("WScript.Shell")
sCurDir = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\") - 1)

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strFolder)

strComputer = "."
Set objShell = Wscript.CreateObject("Wscript.Shell")
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

Call CleanFolder(objFolder) 'Remove Font Files

'Remove Registries

strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts"

oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath,_
 arrValueNames, arrValueTypes

For i=0 To UBound(arrValueNames)
'Change the length and Name in the line below    
    If (Left(arrValueNames(i), 9) = "Helvetica") Then
    'msgbox "Value Name: " & HKEY_LOCAL_MACHINE & "\" & strKeyPath & "\" & arrValueNames(i)
    objShell.RegDelete "HKEY_LOCAL_MACHINE\" & strKeyPath & "\" & arrValueNames(i)
    End If
Next




Sub CleanFolder(ByVal objParent)
  Dim objChild, objFile
Set oFSO = CreateObject("Scripting.FileSystemObject")
  Set oShell = CreateObject("WScript.Shell")
 
  For Each objFile In objParent.Files
   ' Wscript.Echo " " & objFile.Name
   'Change the length and Name in the line below    
    If (Left(objFile.Name, 9) = "helvetica") Then
FileName =objFSO.GetFileName(objFile)
strFile = strFolder & "\" & FileName
      If oFSO.FileExists(strFile) Then
' Delete the file
oFSO.DeleteFile strFile, True
    End If
    End If
  Next
  For Each objChild In objParent.SubFolders
    Call CleanFolder(objChild)
  Next
 
  Set oFSO = Nothing
End Sub

Tuesday, February 03, 2015

How to uninstall any version of Java

I wanted to uninstall Java from all the machines and install the latest one. There were sometimes multiple versions of Java which had to be removed. Some machines had both 32 bit and 64 bit Java versions. Here is the easiest batch script to uninstall any version of Java on the machine.
There were scripts available but they did not delete 64 bit versions of Java and some very old versions of Java. Hence I modified those scripts to meet my need.

set mycmd=reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s /f *java* for /f " usebackq delims={} tokens=2" %%i IN (`%mycmd%`) do ( msiexec /uninstall {%%i} /passive )
set mycmd=reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall /s /f *java* for /f " usebackq delims={} tokens=2" %%i IN (`%mycmd%`) do ( msiexec /uninstall {%%i} /passive )

Sunday, June 03, 2012

Packaging Google Chrome for Enterprise deployment

Many times it is an issue with the Administrators to deploy Google Chrome enterprise wide as there are lots of issues like:

1) Many people would have already installed various other versions of Chrome either through MSI or through exe.
2) How to customize Google chrome for enterprise wide deployment.

*Edited: The new version has a few differences, please see the end of post on how to tackle this.*

First, I would like to mention here that Google Chrome Enterprise version can be downloaded from the following location:
http://www.google.com/intl/en/chrome/business/browser/

This site contains an MSI, which is already customized for business as in there are no desktop/Taskbar shortcuts and the application automatically goes to Program files folder.
If you need to customize this, it is best to capture this MSI as it runs a Setup.exe from within.
I would say that, this MSI is good enough to go like this too so not recommended to waste your time in capturing the MSI unless specifically required.

You can add master_preferences file in the Google\Chrome\Application folder with following contents:

{
"homepage" : "http://msiworld.blogspot.com",
"homepage_is_newtabpage" : false,
"browser" : {
"show_home_button" : true,
 "check_default_browser" : false,
 "window_placement": {
 "bottom": 1000,
 "left": 10,
 "maximized": false,
 "right": 904,
 "top": 10,
 "work_area_bottom": 1010,
 "work_area_left": 0,
 "work_area_right": 1680,
 "work_area_top": 0
 }
 },
 "bookmark_bar" : {
"show_on_all_tabs" : true
},
"distribution" : {
"skip_first_run_ui" : true,
"show_welcome_page" : false,
"import_search_engine" : false,
"import_history" : false,
"create_all_shortcuts" : true,
"do_not_launch_chrome" : true,
"make_chrome_default" : false
}
}

If you add this, change the install sequence of Custom Actions which are already there in the MSI to run before InstallFiles action. That is, move InstallFiles Action after DoInstall. This will make sure your master_preferences file is retained till end.
*Edited
There are are 3 Custom Actions by the name starting from : CallUninstaller
Change their condition to REMOVE="ALL"
This will enable for a clean upgrade else you will face issues while upgrading the application.
*
Uninstall Any Previous Version of Chrome:

To Uninstall any previous version of Chrome, I have written this VBScript which can be run before the installation of your MSI.

'==============================================================
'Lines to get the computer Name
Const HKEY_LOCAL_MACHINE = &H80000002
 Set wshShell = WScript.CreateObject( "WScript.Shell" )
 strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
 dim folder, MyProperties, arrMyProperties, Exe, Param, oReg, strKeyPath, strValueName

'==============================================================
 'To check whether the OS is 32 bit or 64 bit of Windows 7
'==============================================================
'Lines to detect whether the OS is 32 bit or 64 bit of Windows 7
 Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputerName & "\root\default:StdRegProv")
   strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"
   strValueName = "Identifier"

 oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
'==============================================================
'Checking Condition whether the build is 64bit or 32 bit
   if (instr(strValue,"64")) then
 folder = "C:\Program Files (x86)\Google\Chrome"
 RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")
 End If
if (instr(strValue,"x86")) then
 folder = "C:\Program Files\Google\Chrome"
 RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")
End If
'==============================================================

MyProperties = RegVal
arrMyProperties = Split(MyProperties, "-")
Exe = arrMyProperties(0)
Param = "--uninstall --multi-install --chrome --system-level --force-uninstall"
'Uninstall Previous version Chrome
'==============================================================
wshShell.run Exe & Param, 1, True
'Delete leftover folder and files from Previous version Chrome
'==============================================================
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists(folder & "\") Then 
   filesys.DeleteFolder folder
End If
Function ReadReg(RegPath)
      Dim objRegistry, Key
      Set objRegistry = CreateObject("Wscript.shell")
      Key = objRegistry.RegRead(RegPath)
      ReadReg = Key
 End Function


Hope these steps will reduce your efforts in deployment of Chrome.

*
With the New version 26.0.1410.64, Google has changed the install sequence. do the following:

1) In InstallExecuteSequence Table move InstallFiles action after DoInstall Custom Action. This DoInstall Custom Action is actually installing the Google Chrome from an exe. So if the MSI already had copied the master_preferences file, this exe will replace it with its own. If you place the InstallFile Action after DoInstall, then the file which you have added in your package will overwrite the one which Google provides.
2) You might have to write a small script to delete the shortcut from C:\Users\Public\Desktop, if you do not want a desktop shortcut.
Place this CA at the end just before InstallFinalize.

Wednesday, April 11, 2012

Installation and Uninstallation of MSU in silent mode

MSU are the Microsoft Update files.
You can easily install the MSU file silently without reboot with the following command line:


wusa.exe Windows6.1-KB123456-x86.msu /quiet /norestart

To Uninstall it Silently you need to follow this simple procedure:

1) Run this command:
expand c:\temp\Windows6.0-KB123456-x86.msu –F:Windows6.0-KB123456-x86.xml c:\temp

2) This will create an XML file in temp folder as per the name above.
Edit this xml in notepad.

3)Find the assemblyidentity tag. Then, note the values of the following attributes:
  • The name attribute
  • The publickeytoken attribute
  • The processArchitecture attribute
  • The version attribute
4) Use the below command to uninstall the MSU from your machine.
start /w pkgmgr /up:name~publickeytoken~processArchitecture~~version

Note: The variables above need to be replaced by the vaules you have copied in step 3.

Monday, November 28, 2011

Repackaging Microsoft Visual Studio 2010 Pro (Or any other version)

There are a lot of sites referring the installation of Microsoft Visual Studio 2010 in silent mode, but if you have a closer look, no one gives the complete information on the installation and Un-installation of the package.
Here are the steps which I followed to install Visual Studio on 32 bit as well as 64 bit machines. I assure you that you can save atleast 1 to 2 man days by taking information from here before proceeding with your packaging.
Copy the compete source to a directory and name this directory as per your standard naming convention.
Copy these files to this main directory (Explanation and details also provided later)
  1. VS2010_Uninstall-RTM.ENU.exe
  2. Dfusrprf.xml
  3. User.vbs
  4. Arpsuppress64.reg
  5. Arpsuppress32.reg
  6. Arpsuppresswow64.reg
  7. ConfigurationFile.ini
  8. Setup.vbs
  9. Uninstall.vbs
  10. Uninstall.bat
These files are the complete list of files which will do the trick to install and un-install the MS Visual Studio 2010 package.
You can use WISE Script Editor to create an exe for most of the part. Since I wanted to give the content in a simpler way, I am mentioning it like this in text for you.
Details of these files are:
  • VS2010_Uninstall-RTM.ENU.exe: This is the uninstall file provided by Microsoft and this will un-install any version of Visual Studio. You can download this from http://archive.msdn.microsoft.com/vs2010uninstall/Release/ProjectReleases.aspx?ReleaseId=4321
  • Dfusrprf.xml:
Use the following content for this file:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE userprefs>
<dotfuscator>
<p982>True</p982>
<p974>False</p974>
<p984>False</p984>
<p979>0</p979>
<p981>0</p981>
<p985>False</p985>
<p975> </p975>
<p976> </p976>
<p980>0</p980>
<p973>False</p973>
<p986 />
<p990>False</p990>
<p987 />
<p989>0,0,0,0</p989>
<p988 />
</dotfuscator>
  • User.vbs: The Dfsusrprf.xml needs to be copied in each users profile, you can use active setup to run this file in each user. You can use the below content for this file:
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
sCurDir = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\") - 1)

sup = oShell.ExpandEnvironmentStrings ("%USERPROFILE%")

If Not oFSO.FolderExists (sup & "\AppData\Local\PreEmptive Solutions\Dotfuscator Community Edition\5.0") Then
oFSO.CreateFolder sup & "\AppData\Local\PreEmptive Solutions"
oFSO.CreateFolder sup & "\AppData\Local\PreEmptive Solutions\Dotfuscator Community Edition"
oFSO.CreateFolder sup & "\AppData\Local\PreEmptive Solutions\Dotfuscator Community Edition\5.0"
End If

oFSO.CopyFile sCurDir & "\dfusrprf.xml" , sup & "\AppData\Local\PreEmptive Solutions\Dotfuscator Community Edition\5.0\" , OverwriteExisting
  • Arpsuppress64.reg: Suppress Add/Remove Program (ARP) Entries in 64 bit
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Help Viewer 1.0]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Team Foundation Server 2010 Object Model - ENU]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio 2010 Tools for Office Runtime (x64)]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{034106B5-54B7-467F-B477-5B7DBB492624}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0F37D969-1260-419E-B308-EF7D29ABDE20}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1AB7EDC5-D891-34C5-9FF1-BE6A85ACC44B}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1CB6C387-65A7-327F-B4A5-7DDC75A291AF}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1D1CEEF8-3741-45BD-8E77-963E1DEBDDD3}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4A8CE6D7-4D52-43B9-970B-03FC75FAD667}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5D068141-189F-39E2-A052-E40D4B561256}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{662014D2-0450-37ED-ABAE-157C88127BEB}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8438EC02-B8A9-462D-AC72-1B521349C001}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{88BAE373-00F4-3E33-828F-96E89E5E0CB9}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8FF0ACBD-17A5-3637-95F4-D7C69723E2BF}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{94D70749-4281-39AC-AD90-B56A0E0A402E}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{95120000-00B9-0409-1000-0000000FF1CE}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B40EE88B-400A-4266-A17B-E3DE64E94431}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D4AD39AD-091E-4D33-BB2B-59F6FCB8ADC3}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DA67488A-2689-4F10-B90F-D2F6977509D6}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F5079164-1DB9-3BDA-853B-F78AF67CE071}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FCADA26A-5672-31DD-BF0E-BA76ECF9B02D}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0826F9E4-787E-481D-83E0-BC6A57B056D5}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BBDE8A3D-64A2-43A6-95F3-C27B87DF7AC1}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server 10 Release]
"SystemComponent"=dword:00000001
  • Arpsuppress32.reg: Suppress ARP entries in 32 bit
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KB968369]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Help Viewer 1.0]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server 10]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server 10 Release]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Team Foundation Server 2010 Object Model - ENU]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio 2010 Tools for Office Runtime (x86)]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio 2010 Professional - ENU]
"DisplayName"="Microsoft_VisualStudio2010Pro_10.0.30319.1_0_EN_DTP_v1.0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio Macro Tools]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{035400A4-29BD-3723-BEED-E2718A68CDE0}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0DDCEC37-369C-484B-B16D-B4413FD42FB9}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0F37D969-1260-419E-B308-EF7D29ABDE20}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{112C23F2-C036-4D40-BED4-0CB47BF5555C}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{14DD7530-CCD2-3798-B37D-3839ED6A441C}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{170DE2A7-4768-370C-9671-D8D17826EFBF}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1803A630-3C38-4D2B-9B9A-0CB37243539C}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{196E77C5-F524-4B50-BD1A-2C21EEE9B8F7}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2012098D-EEE9-4769-8DD3-B038050854D4}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2A2F3AE8-246A-4252-BB26-1BEB45627074}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2D9FEBEE-F1B7-344F-BFDF-760E18332D96}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{33AE9E89-47C9-4A0D-9E9D-BDD6966A3804}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3A9FC03D-C685-4831-94CF-4EDFD3749497}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3BB19A2B-B9C5-3872-8FDF-3047CC9F9841}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{40416836-56CC-4C0E-A6AF-5C34BADCE483}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{41B31ABE-5A6E-498A-8F28-3BA3B8779A41}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{47C39E4A-28F2-33B1-B9B7-97F24E52D917}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4815BD99-96A4-49FE-A885-DCF06E9E4E78}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4A6F34E2-09E5-4616-B227-4A26A488A6F9}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4E968D9C-21A7-4915-B698-F7AEB913541D}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4F44B5AE-82A6-4A8A-A3E3-E24D489728E3}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{58721EC3-8D4E-4B79-BC51-1054E2DDCD10}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6A86554B-8928-30E4-A53C-D7337689134D}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6CDEAD7E-F8D8-37F7-AB6F-1E22716E30F3}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6ED37A91-7710-3183-BE50-AB043FF6689E}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{729A3000-BC8A-3B74-BA5D-5068FE12D70C}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{78C3657E-742C-40B1-9F53-E5A921D40F17}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{97CE8B73-AA5A-4987-A1BE-50DD1A187478}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC41D924-8C68-4BD5-A7A1-0AE4176C31A6}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ACE28263-76A4-4BF5-B6F4-8BD719595969}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B5153233-9AEE-4CD4-9D2C-4FAAC870DBE2}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B7E38540-E355-3503-AFD7-635B2F2F76E1}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B857D868-F8B0-43EE-BC2B-D9E5ED21F237}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BC0464FA-A0BA-3E38-85BF-DC5B3A401F48}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C688457E-03FD-4941-923B-A27F4D42A7DD}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C6DD625F-4B61-4561-8286-87CA0275CEA1}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C965F01C-76EA-4BD7-973E-46236AE312D7}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CFEF48A8-BFB8-3EAC-8BA5-DE4F8AA267CE}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D441BD04-E548-4F8E-97A4-1B66135BAAA8}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DC3D6AFB-78B4-489F-81D7-30B66E0C2417}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E5AE9031-79A5-4627-9641-BEFA82819B08}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F3494AB6-6900-41C6-AF57-823626827ED8}]
"SystemComponent"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F990B526-8F7C-46E0-B1F1-6C893A8B478F}]
"SystemComponent"=dword:00000001
  • Arpsuppresswow64.reg: Suppress entries which are going through wow6432 node in registry.
Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall]
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio Macro Tools]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{0DDCEC37-369C-484B-B16D-B4413FD42FB9}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{0E3DFC64-CC49-4BE2-8C9C-58EF129675DB}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{112C23F2-C036-4D40-BED4-0CB47BF5555C}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{14DD7530-CCD2-3798-B37D-3839ED6A441C}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{1803A630-3C38-4D2B-9B9A-0CB37243539C}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{2012098D-EEE9-4769-8DD3-B038050854D4}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{2A2F3AE8-246A-4252-BB26-1BEB45627074}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{2D9FEBEE-F1B7-344F-BFDF-760E18332D96}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{3A9FC03D-C685-4831-94CF-4EDFD3749497}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{40416836-56CC-4C0E-A6AF-5C34BADCE483}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{41B31ABE-5A6E-498A-8F28-3BA3B8779A41}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{4E968D9C-21A7-4915-B698-F7AEB913541D}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{6A86554B-8928-30E4-A53C-D7337689134D}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{6CDEAD7E-F8D8-37F7-AB6F-1E22716E30F3}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{729A3000-BC8A-3B74-BA5D-5068FE12D70C}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{78C3657E-742C-40B1-9F53-E5A921D40F17}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{AC41D924-8C68-4BD5-A7A1-0AE4176C31A6}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{ACE28263-76A4-4BF5-B6F4-8BD719595969}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{B7E38540-E355-3503-AFD7-635B2F2F76E1}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{BC0464FA-A0BA-3E38-85BF-DC5B3A401F48}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{CFEF48A8-BFB8-3EAC-8BA5-DE4F8AA267CE}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{E5AE9031-79A5-4627-9641-BEFA82819B08}]
"SystemComponent"=dword:00000001
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C688457E-03FD-4941-923B-A27F4D42A7DD}]
"SystemComponent"=dword:00000001
  • ConfigurationFile.ini: To Un-install SQL Server 2008 completely use below content”
;SQLSERVER2008 Configuration File
[SQLSERVER2008]
 
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter.
 
ACTION="Uninstall"
 
; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, and Tools. The SQL feature will install the database engine, replication, and full-text. The Tools feature will install Management Tools, Books online, Business Intelligence Development Studio, and other shared components.
 
FEATURES=SQLENGINE,REPLICATION,SNAC_SDK
 
; Displays the command line parameters usage
 
HELP="False"
 
; Specifies that the detailed Setup log should be piped to the console.
 
INDICATEPROGRESS="False"
 
; Setup will not display any user interface.
 
QUIET="True"
 
; Setup will display progress only without any user interaction.
 
QUIETSIMPLE="False"
 
; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system.
 
X86="False"
 
; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS).
 
INSTANCENAME="SQLEXPRESS"
  • Setup.vbs: To install the package with customizations
Dim oExplorer
Dim oShell                   ' Windows Scripting Host shell
Dim oFSO                            ' File system object
Dim sCurDir, AppName, srd ' Script path
Dim sWinDir ' Windows root path
Dim sProgress ' Text in IE window
Dim scpf86, spf, strAppMsg, oEnv
 
'=======================================================================
' Main
 
On Error Resume Next
 
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
 
sCurDir = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\") - 1)
 
sWinDir = oShell.ExpandEnvironmentStrings ("%WinDir%")
 
Const HKEY_LOCAL_MACHINE = &H80000002
 
AppName = "Microsoft_VisualStudio2010Pro_10.0.30319.1"
 
set oEnv = oShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1
 
If Not oFSO.FolderExists (sWinDir & "\logs") Then oFSO.CreateFolder sWinDir & "\logs"
 
 
' Install Microsoft Visual Studio 2010
oShell.Run chr(34) & sCurDir & "\Setup\setup.exe" & Chr(34) & " /q /full /norestart" , 1, 1
 
 
'#################### Installation Date ####################
 
strComputer = "."
 
Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
 
Set colItems = objWMIService.ExecQuery("Select * from Win32_LocalTime")
 
For Each objItem in colItems
    mn= objItem.Month
    dy= objItem.Day
if Len(objItem.Day) =1 then
dy="0" & objItem.Day
end if
 
If Len(objItem.Month) =1 then
Mn="0" & objItem.Month
end if
 
mix=dy & "/" & Mn & "/" & objItem.Year
Next
 
' Const HKEY_LOCAL_MACHINE = &H80000002
 
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
 
strValueName2 = "Installation Date"
strValue2 = mix
‘This is for inventory key installation date, you can leave this
‘oShell.Run "reg.exe IMPORT " & chr(34) & sCurDir & "\Inventory.reg" & chr(34)
 
 
If oFSO.FolderExists (srd & "\Program Files (x86)") Then
                oShell.Run sWinDir & "\sysnative\reg.exe IMPORT " & chr(34) & sCurDir & "\arpsupress64.reg" & chr(34)
                oShell.Run sWinDir & "\sysnative\reg.exe IMPORT " & chr(34) & sCurDir & "\arpsupresswow64.reg" & chr(34)
Else
                oShell.Run "reg.exe IMPORT " & chr(34) & sCurDir & "\arpsuprees32.reg" & chr(34)
End If
 
 
strKeyPath2 = "SOFTWARE\XXXApps\Desktop\" & AppName
 
oshell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\XXXApps\Desktop\" & AppName & "\Installation Date", strValue2, "REG_SZ"
 
 
 
' ##################Copy Config File#########################
 
 
sCPF86=oShell.ExpandEnvironmentStrings ("%commonprogramfiles(x86)%")
 
If oFSO.FolderExists(sCPF86) Then
spf = oShell.ExpandEnvironmentStrings ("%programfiles(x86)%")
Else
spf = oShell.ExpandEnvironmentStrings  ("%programfiles%")
End if
 
Const OverwriteExisting = TRUE
 
oFSO.CopyFile sCurDir & "\ConfigurationFile.ini" , spf & "\Microsoft Visual Studio 10.0\Common7\", OverwriteExisting
 
oFSO.CopyFile sCurDir & "\VS2010_Uninstall-RTM.ENU.exe" , spf & "\Microsoft Visual Studio 10.0\Common7\", OverwriteExisting
 
'####################Edit ARP Info##############################
 
 
If oFSO.FolderExists(sCPF86) Then
strKeyPath11 = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio 2010 Professional - ENU"
Else
strKeyPath11 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual Studio 2010 Professional - ENU"
End if
 
strValueName13 = "NoModify"
dwvalue11 = 1
 
strValueName14 = "NoRemove"
 
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath11,strValueName13,dwValue11
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath11,strValueName14,dwValue11
 
 
strStringValueName15 = "HelpLink"
strStringValueName16 = "URLUpdateInfo"
strStringValueName17 = "Readme"
 
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath11,strStringValueName15
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath11,strStringValueName16
oReg.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath11,strStringValueName17
 
 
'################Edit Shortcut###########################
 
 
spd =  oShell.ExpandEnvironmentStrings ("%ProgramData%")
 
oFSO.DeleteFile(spd & "\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2010\Microsoft Windows SDK Tools\Install Microsoft FXCop.lnk")
 
oFSO.DeleteFile(spd & "\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2010\Microsoft Visual Studio 2010 Documentation.lnk")
 
oFSO.DeleteFile(spd & "\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2010\Microsoft Windows SDK Tools\Tools Reference.lnk")
 
' ###############Active Setup#############################
 
 
oFSO.CopyFile scurDir & "\USER.vbs" , spf & "\Microsoft Visual Studio 10.0\Common7\", OverwriteExisting
oFSO.CopyFile scurDir & "\dfusrprf.xml" , spf & "\Microsoft Visual Studio 10.0\Common7\", OverwriteExisting
 
 
strKeyPath21 = "SOFTWARE\Microsoft\Active Setup\Installed Components\{0F37D969-1260-419E-B308-EF7D29ABDE20}"
strValueName21 = "StubPath"
strValue21 = spf & "\Microsoft Visual Studio 10.0\Common7\USER.vbs"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath21
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath21,strValueName21,strValue21
 
strValueName22 = "Version"
strValue22 = "1,0"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath21,strValueName22,strValue22
 
oShell.Run chr(34) & scurDir & "\USER.vbs" & chr(34)
  • Uninstall.vbs: To Un-install MS Visual Studio Silently:
Dim oShell, oFSO, oReg
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
 
On Error Resume Next
 
sWindir = oShell.ExpandEnvironmentStrings("%windir%")
 
sCPF86=oShell.ExpandEnvironmentStrings ("%commonprogramfiles(x86)%")
 
If oFSO.FolderExists(sCPF86) Then
spf = oShell.ExpandEnvironmentStrings ("%programfiles(x86)%")
Else
spf = oShell.ExpandEnvironmentStrings  ("%programfiles%")
End if
 
sys32 = sWindir & "\system32"
 
set oEnv = oShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1
 
'MsgBox "The uninstallation of the application will take approximately 45 minutes to complete." , 0, "Visual Studio 2010 Pro"
 
 
' ################ Remove Active Setup ####################
Const HKEY_LOCAL_MACHINE = &H80000002
 
strComputer = "."
 
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
 
strKeyPath1 = "Software\Microsoft\Active Setup\Installed Components\{D7DAD1E4-45F4-3B2B-899A-EA728167EC4F}"
oReg.DeleteKey HKEY_LOCAL_MACHINE, strKeyPath1
 
 
 
'###################Uninstall################
 
 
If oFSO.FolderExists(sCPF86) Then
spf64 = oShell.ExpandEnvironmentStrings  ("%programfiles%")
oShell.Run chr(34) & spf64 & "\Microsoft SQL Server\100\Setup Bootstrap\Release\setup.exe" & chr(34) & " /ConfigurationFile=" & chr(34) & spf & "\Microsoft Visual Studio 10.0\Common7\ConfigurationFile.ini" & chr(34) ,0 ,1
oFSO.DeleteFolder(spf64 & "\Microsoft SQL Server\100")
Else
oShell.Run chr(34) & spf & "\Microsoft SQL Server\100\Setup Bootstrap\Release\setup.exe" & chr(34) & " /ConfigurationFile=" & chr(34) & spf & "\Microsoft Visual Studio 10.0\Common7\ConfigurationFile.ini" & chr(34) ,0 ,1
oFSO.DeleteFolder(spf & "\Microsoft SQL Server\100")
End if
 
oShell.Run chr(34) & spf & "\Microsoft Visual Studio 10.0\Common7\VS2010_Uninstall-RTM.ENU.exe" & chr(34) & " /q /full" , 0 ,1
 
code1 = "{B7E38540-E355-3503-AFD7-635B2F2F76E1}"
code2 = "{4F44B5AE-82A6-4A8A-A3E3-E24D489728E3}"
code3 = "{B40EE88B-400A-4266-A17B-E3DE64E94431}"
code4 = "{BBDE8A3D-64A2-43A6-95F3-C27B87DF7AC1}"
 
oshell.run sys32 & "\msiexec.exe /x " & code1 & " REBOOT=ReallySuppress /qn /l*v " & chr(34) & sWindir & "\Logs\MicrosoftVisualStudio_2010_Uninstall.log" & chr(34) , 1, 1
oshell.run sys32 & "\msiexec.exe /x " & code3 & " REBOOT=ReallySuppress /qn /l*v " & chr(34) & sWindir & "\Logs\MicrosoftVisualS_2010_Uninstall.log" & chr(34) , 1, 1
oshell.run sys32 & "\msiexec.exe /x " & code4 & " REBOOT=ReallySuppress /qn /l*v " & chr(34) & sWindir & "\Logs\SQLServer2008NativeClient_2010_Uninstall.log" & chr(34) , 1, 1
 
If Not oFSO.FolderExists(sCPF86) Then
oshell.run sys32 & "\msiexec.exe /x " & code2 & " REBOOT=ReallySuppress /qn /l*v+ " & chr(34) & sWindir & "\Logs\MicrosoftSQLServer_2008SetupSupportFiles_Uninstall.log" & chr(34) , 1, 1
End if
 
' #################Remove Registry###############################
 
strKeyPath = "SOFTWARE\XXXApps\Desktop\Microsoft_VisualStudio2010Pro_10.0.30319.1_0_EN_DTP_v1.0"
 
oReg.DeleteKey HKEY_LOCAL_MACHINE, strKeyPath
 
'################## Clean Uninstall ##############################
 
spd = oShell.ExpandEnvironmentStrings ("%Programdata%")
sup = oShell.ExpandEnvironmentStrings ("%UserProfile%")
 
oFSO.DeleteFolder(spf & "\Microsoft Visual Studio 10.0")
oFSO.DeleteFolder(sup & "\Documents\Visual Studio 2010")
oFSO.DeleteFolder (spd & "\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2010")
 
 
'Msgbox "Uninstallation of the application is completed. Please reboot your system." , 0, "Visual Studio 2010 Pro"
 
 
oEnv.Remove("SEE_MASK_NOZONECHECKS")
  • Uninstall.bat: To uninstall through deployment tool, you should use this .bat file so that it removes SQL and all other components as well. I have made this batch script so that it runs on both 32 and 64 bit machines:
@echo off
 
if exist %windir%\sysnative\cmd.exe (
cd %windir%\sysnative )
SET SUBDIR=%~dp0
wscript.exe %SUBDIR%Uninstall.vbs