View Full Version : Remote unattended updates
NewsArchive
12-26-2012, 11:47 AM
Friedrich,
I've got a program that runs only on a server. Clients access it via
Thin@. When I do web update (manually or on a timer), I need to ensure
that no other client can remote in. One way to ensure this is to stop
the Thin@ services. So I've got this little bit of script:
Loop
Set Variable %MYAPPACTIVE% to FUNCTION:Detect Active
Application("MyApp.EXE") [File Name]
If %MYAPPACTIVE% Equals "1" Then
/* Display Message Box "The program is still running. Please
save your work an..." -- "The program is still running" */
Run Program C:\Thin@\NetManager /stopall (Always Install)
Else
Break Loop
End
End
After the install loop, normally where the Finished dialog displays
(removed as it happens on the server - no dialogs allowed):
Run Program C:\Thin@\NetManager /start (Always Install)
Both run elevated. Assume for the moment that stopping these services
closes running apps (checking on this).
--
Russ Eggen
RADFusion International, LLC
NewsArchive
12-26-2012, 11:48 AM
It can't. I'll rename them.
>Assume for the moment that stopping these services
> closes running apps (checking on this).
--
Russ Eggen
RADFusion International, LLC
NewsArchive
12-27-2012, 03:27 AM
Russ,
>
> It can't. I'll rename them.
>
So your problem is that the Thin@ "NetManager /stopall" does not stop the
service(s)?
Friedrich
NewsArchive
12-27-2012, 11:44 AM
No, I had my thinking jumbled. Stopping a service does not kill a
running program. The services are needed to connect, so that will
prevent others from connecting while an update is in progress. I still
need to kill any running processes. I'm thinking before stopping the
services to avoid any error dialogs opening.
--
Russ Eggen
RADFusion International, LLC
NewsArchive
12-28-2012, 01:24 AM
What I've done in the past is a polling solution, where every so often (5
minutes or whatever) each client checks for the existence of a file called
'getout.txt' on the server.
If it sees it, it notifies the user that it will be shutting down in 10
minutes.
After it's checked a few times and that file still exists, it's sayonara,
baby...
Jane Fleming
NewsArchive
12-28-2012, 08:05 AM
I like the way you think.
--
Russ Eggen
RADFusion International, LLC
NewsArchive
12-29-2012, 04:32 AM
> I like the way you think.
That's a slippery slope<g>.
Careful or the next time we see you it might be with a glass of wine in one
hand and a pink handgun in the other.
:-)
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
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.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-30-2012, 05:20 AM
Your point? ;-)
--
Russ Eggen
RADFusion International, LLC
NewsArchive
12-30-2012, 05:21 AM
> Your point? ;-)
Just an observation<g>
Charles
--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
developer tools!
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.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms - Now with PNG support!
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------
NewsArchive
12-31-2012, 06:38 AM
Russ
I think Charles was trying to tell you that girl bugs are contagious!
JohnG
NewsArchive
01-01-2013, 05:55 AM
Never argue with someone armed with a gun. Especially a pink one (who'd
want to steal it anyway? <g>)
--
Russ Eggen
RADFusion International, LLC
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.