On approximately 2/5/2004 5:16 AM, came the following characters from
the keyboard of Jimmy Bodkin:
Thanks for the info.

The trouble is that If I use a MsgBox then it would not work with my
implementation.

What I am trying to do is this.

I have a program that is used by a group of individuals and I am trying to
make the program look to see if there is a newer version of it self on start
up or if they click the check for updates on the Help Drop down menu.

I have it working by reading a seperate file that tells the current version
of the program but I would like to make it less likely that I or someone
else would forget to update that file.

So there are lots of ways to do that sort of thing, but you have not provided much detail in the nature of the environment or constraints of the problem. I will outline a technique that could work, in a network environment. This might give you some clue as to the type of information that you might need to provide to get more useful help.


Assumption:  LAN environment, individual workstations
Assumption:  Shared file space somewhere that all users can read
Assumption:  Local file space where application is installed
Assumption:  Application can determine its own version easily
Assumption:  Application is called "application.exe"

Issue: Application wants to alert user if there is a newer version of itself, at startup time, or via Help/Version Check menu.

Design: in the shared file space, create a directory named "application" where the latest version of the application installer is always placed.

Design: The build process for the application should place application installer in a file named "application\application_VERSION.exe", where the version reflects the version of the application built. This can generally be automated.

Design: The application contains a function that can be called at startup, and can be called by the Version Check menu function. It is passed the version of the currently running application. It looks in the directory "application" on the shared file space, and does

@foo = <application*.exe>;

It then extracts the VERSION information from each element of foo, and compares it to its own version information, using an appropriate comparison routine for the format of the version string. If it finds a version newer than itself, it alerts the user. Perhaps it could even give the user an option of executing the installation program for the newest version found.

Alternate: if the application is a single monolithic .exe, and no installation program is really needed, the last sentence above could be implemented as a simple copy of the newest version to the location of the currently running program. This can generally be achieved by some sequence of rename and copy commands, perhaps executed by a customized, generated batch file that gets "exec"d by the program.

I have been looking also to see if there is a way I can find out what
started the app and then if the -v option is selected the script will print
the data back to that memory location.

I have no clue what you are talking about here.


No luck on any of that as of yet but if I figure it out I will post.

If I use the Win32::Console doesn't that open a new Console window for the
output to be desplayed in?

I doubt that Win32::Console created consoles will automatically assume the role of STDOUT or STDERR. It is not at all clear what you sort of code you are expecting to execute in the running program to obtain the version of the non-running program.


--
Glenn -- http://nevcal.com/
===========================
The best part about procrastination is that you are never bored,
because you have all kinds of things that you should be doing.



Reply via email to