PDA

View Full Version : INI reader app or prj



NewsArchive
10-23-2008, 01:51 AM
Does anyone have a sample app or prj that just opens and reads the SB ini
file?

Sim Sherer

NewsArchive
11-07-2008, 02:02 AM
Almost 2 weeks and no response at all?

What I need to do is compare the INI file on my website to the local INI
file and tell me whether or not my app qualifies for a download.
Yes I know SB does just that, but I have a user who complains that his app
NEVER sees an update unless I tell him to download.
I now need to emulate the SB interogation and display the results so that I
can proceed with investigation.

Can anyone help?

Sim Sherer
~~~~~~~~~~~~~

NewsArchive
11-07-2008, 02:04 AM
Hi Sim,

> Yes I know SB does just that, but I have a user who complains that his app
> NEVER sees an update unless I tell him to download.

If he can download an update (i.e. use the webupdate to download and install
an update) then this should not be a problem.

> I now need to emulate the SB interogation and display the results so that I
> can proceed with investigation.

You could create a small exe in SB that just downloads the ini file and
compares the version to whatever you have. Or do the same with NetTalk or
whatever. The current version from the webupdate is stored in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Lindersoft\WebUpdate\A pps\{APPLICATION
GUID}\LOCAL_VERSION

where APPLICATION GUID is the app GUID used in your install. Once you
download the INI, you just read it like any ohter INI file. The format is:

[SB5UPDATE]
Version=1.50.1212
Setup=BuildAutomatorInstall.exe

Then use GetReg() to read the registry key and compare.

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-07-2008, 02:05 AM
Sim,

Check out Clarion Mag. http://www.clarionmag.com/cmag/v7/v7n08webfetch.html

This can retrieve the ini file from your website and put it in a string
field.

Skip

NewsArchive
11-07-2008, 02:06 AM
Hi Skip,

Could you PLEASE download this and forward it to me
I do not have a ClarionMag subscription.

Thanks
Sim

NewsArchive
11-07-2008, 02:08 AM
http://www.youtube.com/watch?v=Yu_moia-oVI

Jeff Slarve

NewsArchive
11-07-2008, 02:09 AM
You bad! <g>

--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm

NewsArchive
11-07-2008, 02:10 AM
Subtle as a chainsaw<g>

Skip

NewsArchive
11-07-2008, 02:11 AM
Sim,

Can't do that, Sim. If you want the basis for the article, google wininet.
That will get you started.

The Clarion Mag subscription is worth many times more than the subscription
price. For the price of a couple of hours of your time, you get 10 years
worth of great Clarion articles and source code on every topic that you
could imagine.

Skip

NewsArchive
11-07-2008, 02:11 AM
Why don't you use the "Download File (HTTP)..." function and then "Get INI
Value..." in SetupBuilder?

With only three SetupScript lines, you can:

1. Download the file from the server
2. Retrieve the value from the INI
3. Display the value

The resulting EXE will only be around 146 KB.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
11-07-2008, 02:12 AM
Hi Skip,

> Check out Clarion Mag. http://www.clarionmag.com/cmag/v7/v7n08webfetch.html
>
> This can retrieve the ini file from your website and put it in a string
> field.

When you have SB, there is no need for this<g> Just create a small exe that
downloads the ini file using the Download script action. Then compare the
Version entry in the INI with the LOCAL_VERSION in the registry.

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-07-2008, 02:13 AM
Arnor,

Yep...but, in my case, I wanted to move the webupdate.exe functions into
source code in my app. In this app, I didnt really want to have to
distribute webupdate.exe and wanted some additional control over the web
updating process.

Skip

NewsArchive
11-07-2008, 02:13 AM
Hi Skip,

> Yep...but, in my case, I wanted to move the webupdate.exe functions into
> source code in my app. In this app, I didnt really want to have to
> distribute webupdate.exe and wanted some additional control over the web
> updating process.

Sure, but in this case that is not what Sim wants to do, all he wants to do
is download the ini. Easily done with a single line sb script:)

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-07-2008, 02:14 AM
Hi Skip,

> Sure, but in this case that is not what Sim wants to do, all he wants to do
> is download the ini. Easily done with a single line sb script:)

Also: Couldn't you use the internet classes in Clarion (ABAPI.INC and
ABDST.INC) for this? Personally I use NetTalk for ftp stuff and it works
great.

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-08-2008, 01:11 AM
The user can and indeed does download when instructed to do so, but
WebUpdate always says he is up-to-date. What I am trying to do is
investigate why WebUpdate does not identify the need for and subsequently
trigger the download. Other users do not have this problem.

Sim Sherer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NewsArchive
11-08-2008, 01:12 AM
Hi Sim,

> The user can and indeed does download when instructed to do so, but
> WebUpdate always says he is up-to-date. What I am trying to do is
> investigate why WebUpdate does not identify the need for and subsequently
> trigger the download. Other users do not have this problem.

My guess is that WebUpdate is being blocked from connecting to the internet.

When you say "download when instructed" I take that you mean that they do
NOT use WebUpdate to download and install updates, but rather download a
full install and run that.

Some firewall programs will pop up a question to allow/block programs first
time they are executed. If the user clicks "Block" that application is
blocked forever unless the user goes into the firewall software and removes
it. I seem to recall Norton Internet Security was like that.

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-08-2008, 01:13 AM
But Jeff, we hardly know each other!

Sim Sherer

NewsArchive
11-08-2008, 01:14 AM
>Could you PLEASE download this and forward it to me
>I do not have a ClarionMag subscription.

Let me get this straight.

You report a problem not getting the Clarion book you expected from Amazon.

As Amazon won't provide the book, I offer to send you a copy at my expense.

And now you're asking one of my subscribers to send you subscriber-only
material.

How much other stuff, I wonder, do you have that you haven't paid for?

I think you're on your own, pal.

--

Dave

Clarion Magazine: http://www.clarionmag.com
In-depth Clarion articles, news, tips & tricks, printed books and e-books

NewsArchive
11-08-2008, 01:16 AM
Hey Arnor,

Havent tried those ABC classes...may have to take a look.

Also, if Sim or his customer just wants to look at the ini, then just using
the browser will work...like...

http://www.mysite.com/wupdatefolder/wupdate.ini

Skip

NewsArchive
11-09-2008, 02:51 AM
That may very well be the problem.
I just wanted to see that it was not perhaps something in my code.

Sim

NewsArchive
11-09-2008, 02:52 AM
Hi Sim,

> That may very well be the problem.
> I just wanted to see that it was not perhaps something in my code.

How are you calling the WebUpdate from your application?

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-09-2008, 02:52 AM
In my Help menu, I have a procedure call:

Run('wupdate.exe /C /S',1)
RC = RunCode()
If RC = 1
Message('There is an program update available',Update now!')
Run('wupdate.exe')
Halt() ! To close the app
Else
Message('No updates to download','No new updates')
End

Sim Sherer

NewsArchive
11-09-2008, 02:53 AM
Hi Sim,

> Run('wupdate.exe /C /S',1)

Aha! This _will_ fail under Vista. Run uses CreateProcess not ShellExecute
or ShellExecuteEx. The wupdate.exe needs to be elevated under Vista and if
you use the Clarion RUN it will NOT elevate and will just fail - don't
remember if you get an ErrorCode() returned or not.

Since you _must_ wait for the wupdate.exe to execute so you can get the exit
code from it, you need to use ShellExecuteEx and get the process ID and then
use WaitForSingleObject to wait for it and GetExitCodeProcess to get the
exit code. If you need I can send you a sample app that shows how you can
do this.

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-09-2008, 02:54 AM
Hi Dave,

Please see your private email.

Sim

NewsArchive
11-10-2008, 02:02 AM
I have kept my users (so far successfully) away from Vista, but yes
I would like to know how this should be done. Your example would
be appreciated.

Thanks

Sim

NewsArchive
11-10-2008, 02:03 AM
> I have kept my users (so far successfully) away from Vista, but yes
> I would like to know how this should be done. Your example would
> be appreciated.

Would be nice timesaver if there was a RunSecure() with the same operations
and facilities as Run()
--

Mark Riffey
http://www.rescuemarketing.com/blog/
Guy Kawasaki & the Wall Street
Journal staff read it, maybe you should too.

NewsArchive
11-11-2008, 01:47 AM
Hi Sim,

> I have kept my users (so far successfully) away from Vista, but yes
> I would like to know how this should be done. Your example would
> be appreciated.

I will upload the demo to Icetips today and let you know when it's there. I
bet the problem you are having is because the Webupdate doesn't run properly
under vista.

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
11-11-2008, 01:48 AM
>Please see your private email.

Likewise.

--

Dave

Clarion Magazine: http://www.clarionmag.com
In-depth Clarion articles, news, tips & tricks, printed books and e-books