PC Review


Reply
Thread Tools Rate Thread

Launch a Windows Installer shortcut from a vb script

 
 
=?Utf-8?B?TWFyZ2UgRQ==?=
Guest
Posts: n/a
 
      1st Dec 2004
Is there a way to run a Windows Installer shortcut from a vbscript? I do not
want to run the .exe because I want the self healing properties of the
Windows Installer shortcut.
 
Reply With Quote
 
 
 
 
Anthony Hunter
Guest
Posts: n/a
 
      8th Dec 2004
You can use the following command line.

msiexec.exe /i <msi filename>



Anthony

"Marge E" <(E-Mail Removed)> wrote in message
news:4ABDA89B-B85E-43E2-93AD-(E-Mail Removed)...
> Is there a way to run a Windows Installer shortcut from a vbscript? I do

not
> want to run the .exe because I want the self healing properties of the
> Windows Installer shortcut.



 
Reply With Quote
 
 
 
 
JFHENSENS
Guest
Posts: n/a
 
      29th Dec 2004

Hi!

I'm working on a similar project. I have to display a message (a smal
.hta file) to the user before launching Microsoft Access XP. But I wan
to keep the Self-Healing functionality available.

So, I've replaced the 'Microsoft Access.lnk' file with a shortcut whic
launch a vbscript and I've modified the association type of .mdb file
in the same way that I've done with the shortcut.

Below, you will find the script part (lightened) which is execute
after the message has been closed by the user.

It creates an instance of the Microsoft Access XP application which i
intercepted by the Windows Installer service... The same kind o
process used by windows installer shortcuts. I've found thi
information on the following web page :

'COM Resources' (http://www.zerog.com/ianetmanual/COM_V.html)

the user executes a script that contains the following line:
oobj = createobject(\"myserver.mylib\")

the windows installer service 'intercepts' the request for an instanc
of the object, and based on settings contained in the installation
verifies that all key members of components provided by the featur
listed in the com tables are properly installed. since the file is no
found, the windows installer service reinstalls the appropriate feature
then allows the instance of the server to be created and handed back t
the calling script.

Here is the script I've written...

option explicit

dim objarguments, objaccess, fso
dim strfilepath
dim intcount, i


on error resume next

set objarguments = wscript.arguments

intcount = objarguments.count

select case intcount
case 0
strfilepath = empty
case else
for i = 0 to intcount - 2
strfilepath = strfilepath & objarguments(i) & \" \"
next

strfilepath = strfilepath & objarguments(i)
end select

set objarguments = nothing


set objaccess = createobject(\"access.application.10\")

if err.number <> 0 then
wscript.quit 1
end if

objaccess.visible = true

if not isempty(strfilepath) then
set fso = createobject(\"scripting.filesystemobject\")

if fso.fileexists(strfilepath) then
objaccess.opencurrentdatabase(strfilepath)
end if

set fso = nothing
end if


do while objaccess.visible
wscript.sleep 1000
loop

set objaccess = nothing

That's all I've found concerning this matter. If you have foun
something else, please let me know...

Kind regards,

Jean-Fran&ccedil;oi


-
JFHENSEN
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1260229.htm

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Installer version 1.0 to Windows Installer version 1.1. jw Windows XP General 2 9th Jan 2006 06:38 PM
Windows Installer version 1.0 to Windows Installer version 1.1 jw Windows XP Basics 1 9th Jan 2006 06:34 PM
June's Windows Installer Chat on MSDN: Using the Windows Installer with the Driver Install Frameworks Tools (DIFXApp) Tyler Robinson [MSFT] Microsoft Windows 2000 MSI 0 15th Jun 2005 12:20 AM
BUG: Script blocking strips script parameters during script authorization Jonathan K. Shay Spyware Announcements 3 2nd May 2005 06:18 PM
Please advise a good Windows Installer book in addition to "VB/VBA Developer's Guide to the Windows Installer" Maxim Masiutin Microsoft Windows 2000 MSI 3 11th Apr 2004 12:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:38 PM.