I must manually install several times a day. Any automation here would
give me and my minions a radical speed boost.
All I want is a script that fills in a few common properties (Name,
Organization, Serial number, etc) then pushes the MSI into the system.
So eventually I should set this: Installer.UILevel = 2
To get there, I first just want a script that launches the install UI:
dim Installer : set Installer =
CreateObject("WindowsInstaller.Installer")
'Installer.UILevel = 2
Installer.InstallProduct "\\myBox\myShare\myFolder\myInstaller.msi"
That produces our old friend, the 0x80004005 code:
Msi API Error: InstallProduct,PackagePath,PropertyValues
When searching the net for this problem, some posts recommend what
MS's "documentation" suggests:
Installer.InstallProduct "\\myBox\myShare\myFolder\myInstaller.msi",
"PROPERTY=VALUE"
Of course that does not work, but it leaves me with no way to research
WHAT to write in the property field.
Could someone please write a VBS that (silently or loudly) installs an
MSI, then post it here? Thanks!
--
Phlip
http://c2.com/cgi/wiki?SheChangeDesignInTheDatabase
-- Ask about our Venture Capital
ignition outsourcing services --
set obj = CreateObject ("Wscript.Shell")
obj.run ("msiexec /i your.msi /qn PROPERTY=VALUE", 0, true)
That's from memory, but it's hopefully close enough.
--
Phil Wilson [MVP Windows Installer]
----
"Phlip" <phli...@yahoo.com> wrote in message
news:63604d2.03091...@posting.google.com...
On Error Resume Next
dim PropValues
dim DoubleQuote : DoubleQuote = chr(34)
dim Installer : set Installer = CreateObject("WindowsInstaller.Installer")
dim MsiPath : MsiPath = "\\myBox\myShare\myFolder\myInstaller.msi"
Installer.UILevel = 2
PropValues = "ACTION=INSTALL PROPERTY1=Something PROPERTY2=" & DoubleQuote &
"value with Space" & DoubleQuote
Installer.InstallProduct MsiPath, PropValues
I think methods InstallProduct and ApplyPatch incorrectly throw that access
violation when there is a reboot scheduled. Setting On Error Resume Next
will ignore that error. But just be sure to handle any other error
conditions by yourself.
--
Regards,
Sajan.
PS: Please don't send me direct emails, use the newsroom.
"Phlip" <phli...@yahoo.com> wrote in message
news:63604d2.03091...@posting.google.com...
set obj = CreateObject ("Wscript.Shell")
obj.run "msiexec /i C:\Temp\Setup1.msi /qn TARGETDIR=c:\FRED\TEST", 0, true
--
Phil Wilson [MVP Windows Installer]
----
"Phlip" <phli...@yahoo.com> wrote in message
news:0e2401c37bd3$684d7b10$a001...@phx.gbl...
> >The other thing you can try is:
> >
> >set obj = CreateObject ("Wscript.Shell")
> >obj.run ("msiexec /i your.msi /qn PROPERTY=VALUE", 0,
> true)
>
> Installer.InstallProduct "\\myBox\myShare\myFolder\myInstal
> ler.msi",
> >> "PROPERTY=VALUE"
> >>
> >> Of course that does not work, but it leaves me with no
> way to research
> >> WHAT to write in the property field.
> >>
> >> Could someone please write a VBS that (silently or
> loudly) installs an
> >> MSI, then post it here? Thanks!
>
> Google reveals you answering that to others.
>
> Please read my question.
>
> --
> Phlip
> What's missing?
> > Installer.InstallProduct "\\myBox\myShare\myFolder\myInstal
> > ler.msi",
In my genius for causing trouble for myself, I forgot that NT services
cannot entertain UNC paths.
In MS's genius for causing trouble for myself, they "forgot" to bubble
up an error message out of the MSI daemon saying "Yo, dude - I can't
do UNC paths".
So, if I A> put my MSI into the nearest friendly neighborhood Web
server, or B> put my MSI onto a shared drive, then I don't need to
write that vile "\\myBox\myShare" in its name. So most of the
scripting solutions presented here are closer to working.
>grumble<
Thanks for the support.
--
Phlip
http://www.greencheese.org/PhilosophyBrethrenThree
-- "Why have an attention span when you can
have a staff [of lawyers]?" -- Ian Sholes --