Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

automatic software update

Posted on 1998-07-31
8
Medium Priority
?
295 Views
Last Modified: 2013-11-19
I need to implement automatic software update feature. I want to place INF file, containing information for all up to date version of all client components. Client application would connect to the server and based on INF file will download, decompress and update file on the client. For OLE components solution already exists. It is CoGetClassObjectFromURL that does all these tasks. The problem is that I have to update non-OLE component the same way. I looked at Setup API and found that in general these functions provide me with everything except installing from remote site only from local disk. Is there a link on the Internet with example or could some one give me useful tip how to implement this feature. I want to utilize INF file rather then develop my own protocol.
0
Comment
Question by:galkin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 7

Author Comment

by:galkin
ID: 1320030
Edited text of question
0
 
LVL 2

Expert Comment

by:lucidity
ID: 1320031
You can have a simple GetHttpFile() function get a data file (INF) from your website, the data file would contain information about the lastest upgrade. The program would compare its upgrade and if doesn't have the latest it will download it.

-----MY.INF on site
Version 1.112
File /upgrades/v1.112.zip
-----

-----MY.INF on localhost
Version 1.111
.
-----


if the client does not have version 1.112 it will download v1.112.zip and do something depending on what you have in the zip file. All you need to do is use a GetHttpFile function (which I can give you if you need it) to get the INF and then get again if you need the zip file.

Is this what you want to do?
0
 
LVL 7

Author Comment

by:galkin
ID: 1320032
I need example of how to parse INF file and decompress updated files. The most important part is how to specify dependency files in INF file and how to handle locked files.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Expert Comment

by:lucidity
ID: 1320033
OK, you can read a line at a time from the .inf file. then use strtok() to get the first token in the inf file... make sure you specify terminating characters. As far as the update file goes you would be better off using .CAB files. The CABSDK is on the microsoft site, and I have some source somewhere to use them. Works just like a zip but has c++ implementation (zip you would have to call to DOS or something).

What kind of inf file are you using. the INF file is just a regular text file, if you don't know how to parse a text file RTFM! If you want some source to parse it you better post it up here.
0
 
LVL 7

Author Comment

by:galkin
ID: 1320034
Parsing INF file is only one task. Of cause I can write parser myself but this parser will be custom. Any change in INF file format will affect my parser. I would prefer reuse existing technologies, i.e. use setup API as parser. Also I need clear solution about how to download and replace files. I could download them into temporary files and then replace them but i am not sure this is the most efficient way of doing this. I would like to know what way GoGetClassObjectFromURL does updating OLE server. Ideally I need its functionality execpt I don't need to create object from updated file.
0
 
LVL 1

Expert Comment

by:payn
ID: 1320035
First, the less relevant comment: zip decompression doesn't require a call to DOS. There are free, cross-platform libraries for reading ZIP files. The Info-Zip unzip package comes with complete source code. Much of the code is copyrighted, but you're still free to use it, even within commercial projects. Check http://www.cdrom.com/pub/infozip/ for more information.

As far as the INF format, you don't need to parse it. Call SetupOpenInfFile (if you don't know the name of the .inf file, only the directory it's in--e.g. because you just expanded a random .zip archive--start with SetupGetInfFileList), then use the various Setup functions after that (either SetupInstallFileEx, one by one, or SetupInstallFromInfSection, section by section). That's the easy part.

So here's what you do: You get the file from a URL. That's easy. If it's a CAB you use Microsoft's APIs to go through it; if it's a ZIP you use Info-ZIP; if you want to use .tgz that's just as easy. Once you've gotten your .inf file and all the other files it needs, just use the standard Setup API calls to do your setup.

By the way, I've built the same solution myself a few times, and I've avoided using .cab and .inf because "standards" which change all the time and which are dependent on Microsoft's APIs really aren't of much use to me, unless they make my life much easier. I find it much simpler to FTP a .zip file into a subdirectory of the program's directory (or the Common Files directory or whatever) and expand it... Or to build a real installer program (e.g. using InstallShield) and just have my program download and run it.

0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 400 total points
ID: 1320036
This may not be what you're looking for...but you said "I would prefer reuse existing technologies"

Why don't you use Microsoft SMS (part of back office) to do the distribution ?  It can do what you want out the box and then some.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1320037
Bought This Question.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question