PDA

View Full Version : Service installs SB7



NewsArchive
09-21-2009, 01:19 AM
Friedrich,

I can add a service, no problem. Actually a bit too easy <g>. The help
topic for it could stand some embellishment (later). ;-)

Anyway, what about web updates? If I make a change to the service program,
how does web update handle this? Do I need to stop, uninstall first? Any
examples?

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-21-2009, 01:20 AM
> Anyway, what about web updates? If I make a change to the service program,
> how does web update handle this? Do I need to stop, uninstall first?

Hi Russ,

You handle this in your new web update installer (not the wupdate.exe -
that is simply a transport).

What I would do is use SetupBuilder to stop the service gracefully (early
in the script before the files are installed).

Then setup a loop where you test to see if the service is still running
(that gives it time to shutdown). If the service does not shutdown nicely
based on a condition in your loop, then you can always force it to shutdown
and again loop and re-test to be sure.

After it is closed, you proceed with the install, then at the end of it you
restart the service.

Does that help?

Charles



--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
09-21-2009, 01:21 AM
Not really.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-21-2009, 01:22 AM
Hi Russ,

100% what Charles said. If your service is running, then the file(s) are
locked and cannot be replaced. It's a good idea to detect running services
from your web update, then stop the service, replace the files, and restart
it (if it was running).

Friedrich

NewsArchive
09-21-2009, 01:22 AM
BTW, the "Edit Service..." function can handle all this.

Friedrich

NewsArchive
09-21-2009, 01:23 AM
Thanks. That makes sense.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-21-2009, 01:24 AM
When I stop a service, must I remove it too? Or can I re-start the service
despite updates to the service?

Also, thinking about adding a Wait dialog, but not sure when it closes (if
ever). Unless the whole thing is placed in a LOOP with BREAK and CYCLE.
Something along the lines of:

LOOP
Set Variable %MYService% to FUNCTION:Check Service "This Service" [Is
Running]
If %MyService% Equals "1" Then
Stop Service "This Service"
Wait Dialog: Display "Stopping My Service..."
CYCLE
ELSE
BREAK
END
END

Does the wait dialog close when the LOOP breaks?

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-21-2009, 01:25 AM
On the "wait" screen - close it yourself (pic attached).

I would "guess" that if the service .EXE has the same name as the original,
you wouldn't need to remove and reinstall it, assuming it runs under the
same user credentials and with the same privileges and just overwrites the
existing file(s). But then, the Universe is littered with my bad guesses
<g>

Other topic - is this "newsgroup at" a good email address at which to reach
you?

Jane

NewsArchive
09-21-2009, 01:26 AM
Jane,

Thanks, but that dialog has me confused. If I select the close option, will
it even display at all? ;-)

The name won't change, so you've confirmed my own guess <g>.

That is actually a non-existent email address. Best bet is to use reggen AT
radfusion DOT com.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-21-2009, 01:27 AM
Try playing with the attached.

Jane Fleming

NewsArchive
09-21-2009, 01:28 AM
Jane,

Thanks. I guess I don't understand the Wait function, despite your example.
How does it close? How long does it stay open?

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-21-2009, 01:28 AM
Russ,

> Thanks. I guess I don't understand the Wait function, despite your example.
> How does it close? How long does it stay open?

If I understand it correctly it stays open until you close it, or the
script ends.

--
Lee White

Enroll Today at http://CWaddons.com

Reports....: http://www.cwaddons.com/products/rpm/
Free Review: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Faxing.....: http://www.cwaddons.com/products/afe/

NewsArchive
09-21-2009, 01:29 AM
Not strictly true, Lee.
If you download the example I put together for Russ, you'll see varying
behavior. I open Wait inside a wizard loop and without marking the separate
thread box it closes almost immediately. If I mark it (as in that script),
it closes when I click to the next wizard screen.

I didn't have much time to play, and frankly that's a script function I've
only used in the circumstance I mentioned to Russ - when I need to run a
support file that may take a while to complete.

Jane

NewsArchive
09-21-2009, 01:29 AM
Jane,

> I open Wait inside a wizard loop and without marking the separate

I don't use it that way. the only time I've used it is with a LOOP of
my own. In this use, unless I missed something, I have to explicitly
close it.

--
Lee White

Enroll Today at http://CWaddons.com

Reports....: http://www.cwaddons.com/products/rpm/
Free Review: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Faxing.....: http://www.cwaddons.com/products/afe/

NewsArchive
09-21-2009, 01:29 AM
> I have to explicitly close it.

Or drop out of the script since I'm not using a Wizard loop.

--
Lee White

Enroll Today at http://CWaddons.com

Reports....: http://www.cwaddons.com/products/rpm/
Free Review: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Faxing.....: http://www.cwaddons.com/products/afe/

NewsArchive
09-21-2009, 01:30 AM
> Or drop out of the script since I'm not using a Wizard loop.

I use it in the PageSnip install while I run the executable for the Tracker
PDFTools Pro Print Driver install.

I set a message, then launch the Tracker installer with command line flags
to run it in the silent mode.

Then when it finishes I close it.


Charles

--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - "Get ProPath, make your Clarion programs ready
for Windows 7 and Vista!"
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
09-21-2009, 01:30 AM
Yep. Same thing I do with my USB driver installer.

Jane Fleming

NewsArchive
09-21-2009, 01:31 AM
Russ,

Mashed the button too soon!<g>

Wait Dialog Operation...
Operation of Display sets the initial text
Operation of Update Status Text changes the initial text
Operation of Update Dialog Title changes caption text
Operation of Close, closes the current Wait Dialog

--
Lee White

Enroll Today at http://CWaddons.com

Reports....: http://www.cwaddons.com/products/rpm/
Free Review: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Faxing.....: http://www.cwaddons.com/products/afe/

NewsArchive
09-21-2009, 01:32 AM
Thanks! That's making sense.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-21-2009, 01:33 AM
Most of my use of the Wait function, BTW, has been while running a
third-party USB driver installer included as a support file, rather than in
any kind of SetupBuilder wizard loop.
So I've opened it when the EXE was invoked and closed it afterwards.

Jane