Second call to Apply install causes reboot

Got a problem you cannot solve? Try here.
uptime
Posts: 15
Joined: Mon Sep 18, 2006 11:33 am

Second call to Apply install causes reboot

Postby uptime » Mon Sep 18, 2006 4:43 pm

I need to start 2 services. The dependencies are as follows:
service1<-executable<-service2
The executable will populate the database which the second service needs. The first service is to start the db.

I have this:

Code: Select all

 
  [other code to create  folders,install files, extract files etc....]
  Control Service Database:  start on install [wait for completion]
  Apply Install (get result into variable SUCCESS)
  Run Program populateDatabase.exe (WAIT)
  Control Service Service2 start on install [wait for completion]
  Apply Install (get result into variable SUCCESS)


I notice that after the last apply install it forces the Finish dialog to prompt the user to reboot as opposed to the finish checkbox.

I *think* the second call to Apply Install triggers the creating/installing of files again, which might make the windows installer think to reboot since it's overwriting files, but I'm not sure.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Sep 18, 2006 8:48 pm

That would certainly be the cause. You may use load order groups to work around this problem. This way, one service will be initialized before another one, in the order you specify.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

uptime
Posts: 15
Joined: Mon Sep 18, 2006 11:33 am

Postby uptime » Tue Sep 19, 2006 12:00 am

Even if I use "Install Service" won't I still need to call Apply Install before it will be started? Also, to install as a service I need to pass some command line arguments, I don't see where I can do that.

Also, I need to run an executable between starts of services.

uptime
Posts: 15
Joined: Mon Sep 18, 2006 11:33 am

Postby uptime » Tue Sep 19, 2006 12:38 am

I see where I can put in command line arguments :D

Judging by the service groups you can put precedence, however I don't see how you will be able to run an executable between starting the services.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Sep 19, 2006 3:10 am

Ah, I see - if you need to run a program in between, there doesn't seem to be another way to do this, really.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

uptime
Posts: 15
Joined: Mon Sep 18, 2006 11:33 am

Postby uptime » Tue Sep 19, 2006 11:05 am

I'm going to force the SUCESS variable to COMLPLETE after the second apply install. Are there any harmful consequences by doing that?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Sep 19, 2006 2:00 pm

No harmful side effects whatsoever. That variable just helps you know what the outcome of the installation attempt was. You can even use a different variable in its place in the Apply Changes command - its just an ordinary variable.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

uptime
Posts: 15
Joined: Mon Sep 18, 2006 11:33 am

Postby uptime » Tue Sep 19, 2006 4:18 pm

I noticed though that having a second call to Apply Install will re-copy all my files though. Which now doubles the install time. I know I can set it to not to overwrite if the files exists within Install Files command, however on an upgrade will need to overwrite those files.

Is there any way to install files only once, during multiple calls to Apply Install?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Sep 19, 2006 6:27 pm

Nope.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

uptime
Posts: 15
Joined: Mon Sep 18, 2006 11:33 am

Postby uptime » Tue Sep 19, 2006 9:59 pm

hmmmm....ok thanks Michael :D

uptime
Posts: 15
Joined: Mon Sep 18, 2006 11:33 am

Postby uptime » Thu Sep 21, 2006 3:51 pm

I found a solution. Instead of using "Control Service" which is dependant on Apply install, I'm using windows' Net command to start a service, so Now I do "run program Net Start ServiceName".

Just to let you all know if you need to start a registered service use:
net start ServiceName

To stop:
net stop ServiceName

Now things are working ok.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 231 guests