home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 September
/
CHIPCD_9_99.iso
/
software
/
uaktualnienia
/
OptionPackPL
/
MTS4.CAB
/
WSH_Uninst.vbs
< prev
next >
Wrap
Text File
|
1998-04-27
|
1KB
|
37 lines
' Filename: Uninst.vbs
'
' Description: Sample VB Script that uninstalls the Sample Bank package
'
' This file is provided as part of the Microsoft Transaction Server Samples
' See the MTS Software Development Kit for more information on Scriptable Administration Objects
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
' PURPOSE.
'
' Copyright (C) 1997 Microsoft Corporation, All rights reserved
Dim packageName
packageName = "Sample Bank"
' First, we create the catalog object
Dim catalog
Set catalog = CreateObject("MTSAdmin.Catalog.1")
' Then we get the packages collection
Dim packages
Set packages = catalog.GetCollection("Packages")
packages.populate
' Remove all packages that go by the same name as the package we wish to uninstall
numPackages = packages.Count
For i = numPackages - 1 To 0 Step -1
If packages.Item(i).Value("Name") = packageName Then
packages.Remove (i)
End If
Next
' Commit our deletions
packages.savechanges