Discussion:
MSIEXEC /JM (Advertising a Windows Service)
(too old to reply)
c***@mannington.com
2006-02-27 15:10:18 UTC
Permalink
We have a method to get updates to our non local people via BITS in
place. They do not have administrative rights to their laptops. We
have a service running as Local System Account which does the
following.

1 - If the application is running then the new msi is just advertised.
msiexec /jm filename /qn /l*v c:\appUpdater.log


2 - If the application is not running then the new msi is advertised
and installed.
msiexec /jm filename /qn /l*v c:\appUpdater.log
msiexec /i filename /qb! /l*v c:\appUpdater.log

It works fine for windows applications. Unfortunately Visual Studio
doesn't appear to create the msi file correctly for windows services.

I have three basic questions:

1) Can we use this methodology for windows services - when running
just advertise the new msi and then when the laptop restarts the new
version is installed and started.

example - msiexec /jm filename /qn /l*v c:\appUpdater.log.

2) Does the new version of visual studio (2005) update the
ServiceInstall and ServiceControl tables correctly? We have the new
version but don't have it installed yet.

3) If the new version doesn't create the msi tables correctly then
which is better and more intergrated to Visual Studio - Wise,
InstallShield or what?

Thanks.

E. Cheryl Hughes
Phil Wilson
2006-02-27 15:39:41 UTC
Permalink
Visual Studio setp projects don't use the ServiceInstall and ServiceControl
tables at all. It uses custom actions in installer classes. If that's the
issue, you could update the ServiceInstall and ServiceControl tables after
the build or use another tool like InstallShield.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280
Post by c***@mannington.com
We have a method to get updates to our non local people via BITS in
place. They do not have administrative rights to their laptops. We
have a service running as Local System Account which does the
following.
1 - If the application is running then the new msi is just advertised.
msiexec /jm filename /qn /l*v c:\appUpdater.log
2 - If the application is not running then the new msi is advertised
and installed.
msiexec /jm filename /qn /l*v c:\appUpdater.log
msiexec /i filename /qb! /l*v c:\appUpdater.log
It works fine for windows applications. Unfortunately Visual Studio
doesn't appear to create the msi file correctly for windows services.
1) Can we use this methodology for windows services - when running
just advertise the new msi and then when the laptop restarts the new
version is installed and started.
example - msiexec /jm filename /qn /l*v c:\appUpdater.log.
2) Does the new version of visual studio (2005) update the
ServiceInstall and ServiceControl tables correctly? We have the new
version but don't have it installed yet.
3) If the new version doesn't create the msi tables correctly then
which is better and more intergrated to Visual Studio - Wise,
InstallShield or what?
Thanks.
E. Cheryl Hughes
c***@mannington.com
2006-03-16 22:10:51 UTC
Permalink
Phil & others interested parties

I did get this working. Basically, the advertise of a "windows
service" msi file doesn't have an "advertiser entry point" (even if
using the ServiceInstall tables and such correctly) to call the
"install on demand" feature of the Windows Installer.

I got this email from someone at Microsoft:

"There are only a few things that can trigger an install on demand.
Things like Extensions, Verbs, Shortcuts, CLSIDs, and ProgIds.
ServiceInstall is not one of them."

Therefore, I changed the logic in my code to stop the windows service,
advertise and then install, and then restart the windows service.

I agree that Visual studio .net doesn't create the msi files correctly.
However, for our needs, it will work. We are pushing out updates of
our specific applications to our own remote people who don't have
administrative rights to their own laptops (basically, people who work
for the same company I do). If we were publishing software to the
general public, InstallShield or Wise would be a better solution.

I appreciate all of the help.

Cheryl
Post by Phil Wilson
Visual Studio setp projects don't use the ServiceInstall and ServiceControl
tables at all. It uses custom actions in installer classes. If that's the
issue, you could update the ServiceInstall and ServiceControl tables after
the build or use another tool like InstallShield.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280
Post by c***@mannington.com
We have a method to get updates to our non local people via BITS in
place. They do not have administrative rights to their laptops. We
have a service running as Local System Account which does the
following.
1 - If the application is running then the new msi is just advertised.
msiexec /jm filename /qn /l*v c:\appUpdater.log
2 - If the application is not running then the new msi is advertised
and installed.
msiexec /jm filename /qn /l*v c:\appUpdater.log
msiexec /i filename /qb! /l*v c:\appUpdater.log
It works fine for windows applications. Unfortunately Visual Studio
doesn't appear to create the msi file correctly for windows services.
1) Can we use this methodology for windows services - when running
just advertise the new msi and then when the laptop restarts the new
version is installed and started.
example - msiexec /jm filename /qn /l*v c:\appUpdater.log.
2) Does the new version of visual studio (2005) update the
ServiceInstall and ServiceControl tables correctly? We have the new
version but don't have it installed yet.
3) If the new version doesn't create the msi tables correctly then
which is better and more intergrated to Visual Studio - Wise,
InstallShield or what?
Thanks.
E. Cheryl Hughes
Loading...