Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

VB script for install/remove msi package


3 replies to this topic

MIB426

MIB426
  • Members
  • 12 posts

Posted 26 November 2003 - 03:14

Hi

I have msi package created by MTS. Its for Application proxy purpose. (DCOM)

I know I can use either
CODE

'Run the export package to register the DCOM component

Dim WshShell
Set WshShell = CreateObject("Wscript.Shell")

WshShell.Run("C:\CINET.MSI")
set WshShell = Nothing


or

CODE

Dim msi
Set msi = CreateObject("WindowsInstaller.Installer")
' set the UI level to basic
msi.UILevel = 2
' launch the installer
msi.InstallProduct "C:\CINET.MSI", ""
' clean up
Set msi = Nothing


to install my package. I like 2nd method so It doesnt show up dialog.

Does anyone know how to remove my package in VBScript?

Thank You


Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 26 November 2003 - 04:04

Couldn't you just run shellexecute on msiexec.exe? Something like:
msiexec.exe /x YOURPRODUCTCODE
Regards
-Stein Åsmul

MIB426

MIB426
  • Members
  • 12 posts

Posted 26 November 2003 - 04:14

Hi
I never know u can use it..
so I rewrite my code as below

CODE

Dim WshShell
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run("msiexec.exe /x CINET")
Set WshShell = Nothing


Now I got error...do u know how to get YOURPRODUCTCODE?

thanks

MIB426

MIB426
  • Members
  • 12 posts

Posted 26 November 2003 - 04:18

Hi

I found out I can just point to msi file. My problem is sloved.

Thank you for the tip