Hi,
I am installing an MSDE instance using Setup ... call using a bat file.
I know the name of the instance (its a Given).
How do I uninstall automatically using a similar call?
I cannot afford to ask the user to uninstall it manually by using 'Add
remove programs'.
Also I would like to know if what I want to do is the correct way
or
Is there a standard way to uninstall (but not manually)?
In anycase I need to know how to uninstall an MSDE instance (Not MANUALLY) ?
Thanks
Subhojit
You can follow the following steps to uninstall manually.
Remove Files and Folders
Remove the MSDE 2000 instance data and program installation folders. You
can find the root folder information for the default instance data folder
in the SQLDataRoot registry key value under this registry key path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Setup
For example, remove the MSDE 2000 data folder for a default instance:
\Program Files\Microsoft SQL Server\MSSQL\Data
For example, remove the MSDE 2000 data folder for a named instance:
\Program Files\Microsoft SQL Server\MSSQL$<INSTANCENAME>\Data
For example, remove the MSDE 2000 program folder for a default instance:
\Program Files\Microsoft SQL Server\MSSQL\Binn
For example, remove the MSDE 2000 program folder for a named instance:
\Program Files\Microsoft SQL Server\MSSQL$<INSTANCENAME>\Binn
back to the top
Clean Up the Registry
WARNING : If you use Registry Editor incorrectly, you may cause serious
problems that may require you to reinstall your operating system. Microsoft
cannot guarantee that you can solve problems that result from using
Registry Editor incorrectly. Use Registry Editor at your own risk.
The Msizap.exe tool removes only Windows Installer specific keys or data
for the ProductCode . It is best to manually remove the MSDE 2000 registry
keys. Use Registry Editor to remove the following MSDE 2000 registry keys:
For an MSDE 2000 default instance, remove the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
For an MSDE 2000 named instance, remove the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<INSTANCENAME>
If the following registry key points to the MSDE 2000 instance ProductCode
, remove the value InstanceComponentSet.x . For example,
InstanceComponentSet.1 has a value that matches the ProductCode of
Sqlrun01.msi:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Component
Set\InstanceComponentSet.1
Remove the SQLServer Service registry key.
For an MSDE 2000 default instance, remove the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\MSSQLServer
For an MSDE 2000 named instance, remove the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\MSSQL$<INSTANCENAME>
Remove the SQLServerAgent Service registry key:
For an MSDE 2000 default instance, remove the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\SQLServerAgent
For an MSDE 2000 named instance, remove the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\SQLAgent$<INSTANCENAME>
Girish Sundaram
Microsoft SQL Server Support Engineer
E-mail: girishs@.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Hi Girish,
Thanks for replying.
**** "Just a request. Please read the posting before replying." ****
I really need to know how to uninstall MSDE instance "programatically" and
"not Manually".
Regards
"Girish Sundaram" wrote:
> You can follow the following steps to uninstall manually.
> Remove Files and Folders
> Remove the MSDE 2000 instance data and program installation folders. You
> can find the root folder information for the default instance data folder
> in the SQLDataRoot registry key value under this registry key path:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Setup
> For example, remove the MSDE 2000 data folder for a default instance:
> \Program Files\Microsoft SQL Server\MSSQL\Data
> For example, remove the MSDE 2000 data folder for a named instance:
> \Program Files\Microsoft SQL Server\MSSQL$<INSTANCENAME>\Data
> For example, remove the MSDE 2000 program folder for a default instance:
> \Program Files\Microsoft SQL Server\MSSQL\Binn
> For example, remove the MSDE 2000 program folder for a named instance:
> \Program Files\Microsoft SQL Server\MSSQL$<INSTANCENAME>\Binn
> back to the top
> Clean Up the Registry
> WARNING : If you use Registry Editor incorrectly, you may cause serious
> problems that may require you to reinstall your operating system. Microsoft
> cannot guarantee that you can solve problems that result from using
> Registry Editor incorrectly. Use Registry Editor at your own risk.
> The Msizap.exe tool removes only Windows Installer specific keys or data
> for the ProductCode . It is best to manually remove the MSDE 2000 registry
> keys. Use Registry Editor to remove the following MSDE 2000 registry keys:
> For an MSDE 2000 default instance, remove the following key:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
> For an MSDE 2000 named instance, remove the following key:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<INSTANCENAME>
> If the following registry key points to the MSDE 2000 instance ProductCode
> , remove the value InstanceComponentSet.x . For example,
> InstanceComponentSet.1 has a value that matches the ProductCode of
> Sqlrun01.msi:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Component
> Set\InstanceComponentSet.1
>
> Remove the SQLServer Service registry key.
> For an MSDE 2000 default instance, remove the following:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\MSSQLServer
> For an MSDE 2000 named instance, remove the following:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\MSSQL$<INSTANCENAME>
>
> Remove the SQLServerAgent Service registry key:
> For an MSDE 2000 default instance, remove the following:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\SQLServerAgent
> For an MSDE 2000 named instance, remove the following:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\SQLAgent$<INSTANCENAME>
>
> Girish Sundaram
> Microsoft SQL Server Support Engineer
> E-mail: girishs@.microsoft.com
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
|||Possibly you can use a batch file to delete the folders from the drives.
You can use a script to delete the registry entries. The command to do so
is shown below.
The command that you can use to remove registry entries is
xp_deletevalue
Syntax:
xp_deletevalue hive, key, value
Example:
EXEC master..xp_regdeletevalue 'HKEY_LOCAL_MACHINE',
'Software\Clients', 'PaulWehland'
Hope this answers your query
Girish Sundaram
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Hi -
As you probably know, you can manually remove an MSDE instance using the
add/remove programs in the Control Panel. While that doesn't 'completely'
remove MSDE, you can do the same thing programmatically:
1. Read the MSDE GUID value from the Registry Key:
<MSDEGUID> = HKLM\SOFTWARE\Microsoft\Microsoft SQL
Server\<YourInstanceName>\Setup\ProductCode
2. Execute: msiexec.exe /x "<MSDEGUID>"
I've not found a way to _completely_ remove MSDE programmatically, but the
above may do what you need. Hope it helps.
- Jeff
"Subhojit Banerjee" <SubhojitBanerjee@.discussions.microsoft.com> wrote in
message news:A60CFD94-FC3F-4EA0-BDC1-3D490579BA7C@.microsoft.com...[vbcol=seagreen]
> Hi Girish,
> Thanks for replying.
> **** "Just a request. Please read the posting before replying." ****
> I really need to know how to uninstall MSDE instance "programatically" and
> "not Manually".
> Regards
>
> "Girish Sundaram" wrote:
folder[vbcol=seagreen]
Microsoft[vbcol=seagreen]
registry[vbcol=seagreen]
keys:[vbcol=seagreen]
Server\<INSTANCENAME>[vbcol=seagreen]
ProductCode[vbcol=seagreen]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\MSSQL$<INSTANCENAME>[vbcol=seagreen]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\SQLAgent$<INSTANCENAME>[vbcol=seagreen]
rights.[vbcol=seagreen]
No comments:
Post a Comment