![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum for Windows Vista help and discussion. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
|
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Application updating I'm hoping someone here can give me ideas, or at least point me in the right direction. Our application (under XP) is capable of downloading and installing updates to itself. An XML manifest is stored on the server, which outlines all the updated files. However, since the format of this file might need to change over time, the application itself isn't qualified to read this file. Instead, it uses a DLL. The DLL is always up to date (i.e. able to read the file manifest) because the application first downloads the latest version of the DLL from the server. It then invokes code in the DLL, which processes the manifest, creates a list of files that need to actually be downloaded, and returns control to the application. Next, the application needs to exit, and allow the files to be installed (one of which is invariably the application itself). This process is handed over to another exe, which the application downloads the latest version of as well. The installer reads the manifest, examines the downloaded files, installs everything, and then re-launches the main application. All of this is working under XP. When it comes to Vista, we obviously are going to encounter some challenges. The primary problem is that the application, which must run as a standard user, has to somehow download a DLL and an EXE, and place them into CSIDL_PROGRAM_FILES_COMMON. Is there any way to do this? (At this point I'm just assuming that I wouldn't be able to download them to anywhere outside of \Program Files and still be able to execute them.) Also, if I'm able to get the update installer exe written somewhere, will the application (which is currently marked as asInvoker) be able to execute the installer, which is marked requireAdministrator? Thanks, Dave |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Application updating Hello, <snip> > The primary problem is that the application, which must run as a standard > user, has to somehow download a DLL and an EXE, and place them into > CSIDL_PROGRAM_FILES_COMMON. > > Is there any way to do this? (At this point I'm just assuming that I > wouldn't be able to download them to anywhere outside of \Program Files > and still be able to execute them.) > I'm afraid this isn't possible. Standard users cannot write to this area. One solution I can think of is to create an "updater" service or a scheduled task that handles all the logic for updating your application and is completely seperate from your main application (accepts no input from the app) - from requesting the difference file from the server to stopping all of the running instances of your program and updating them. Since it would run as a service, it will be able to work its magic in a privileged context; and, since it accepts no input from "normal user" land (other than perhaps an 'update now' command and settings such as how often to check for updates), it wouldn't open any obvious security holes. > Also, if I'm able to get the update installer exe written somewhere, will > the application (which is currently marked as asInvoker) be able to > execute the installer, which is marked requireAdministrator? Again, I would suggest running the updater as a windows service or a scheduled task. You could then begin an update process by starting the task/service, or using some form of IPC. Note that the update installer would need to be able to work without showing a GUI and use IPC to report errors to your program. -- - JB Microsoft MVP - Windows Shell/User Windows Vista Support Faq http://www.jimmah.com/vista/ |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Application updating Thanks for the reply. I've come up with a solution that, thus far, seems to be working. As mentioned in the original message, the majority of the updating procedure is already carried out by an external program, so that bit hasn't changed. What I did was to allow the main program to have an option of where it loads the external program from. If the update programs aren't located in the common program files folder, or if new update programs are available, the main program will download and execute the update program from the user's private folder. In this case, the updater is told by the main app that it's a new version, and it copies itself (and the other update helper tools) to the common program files folder, such that the next application requiring to update itself can find them in the expected location. So far this is working well on my dev environment, with only some minor problems here and there. But overall, this is a workable solution. It only presents a single escalation prompt, and doesn't require installing a service of any type. Thanks again, Dave "Jimmy Brush" <JimmyBrush@discussions.microsoft.com> wrote in message news:1104B471-6320-4B0E-9657-4D82D4205457@microsoft.com... > Hello, > > <snip> >> The primary problem is that the application, which must run as a standard >> user, has to somehow download a DLL and an EXE, and place them into >> CSIDL_PROGRAM_FILES_COMMON. >> >> Is there any way to do this? (At this point I'm just assuming that I >> wouldn't be able to download them to anywhere outside of \Program Files >> and still be able to execute them.) >> > > I'm afraid this isn't possible. Standard users cannot write to this area. > > One solution I can think of is to create an "updater" service or a > scheduled task that handles all the logic for updating your application > and is completely seperate from your main application (accepts no input > from the app) - from requesting the difference file from the server to > stopping all of the running instances of your program and updating them. > > Since it would run as a service, it will be able to work its magic in a > privileged context; and, since it accepts no input from "normal user" land > (other than perhaps an 'update now' command and settings such as how often > to check for updates), it wouldn't open any obvious security holes. > >> Also, if I'm able to get the update installer exe written somewhere, will >> the application (which is currently marked as asInvoker) be able to >> execute the installer, which is marked requireAdministrator? > > Again, I would suggest running the updater as a windows service or a > scheduled task. You could then begin an update process by starting the > task/service, or using some form of IPC. > > Note that the update installer would need to be able to work without > showing a GUI and use IPC to report errors to your program. > > > -- > - JB > Microsoft MVP - Windows Shell/User > > Windows Vista Support Faq > http://www.jimmah.com/vista/ |
My System Specs![]() |
|
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Send to function wont open WinMail and attach pdf from adobe application. I know this can be accomplished by right clicking on the pdf file but I need the application to do the task. Any suggestions? | DonE | Vista mail | 2 | 07-07-2008 09:39 PM |
| programmatically updating vb6 application | JTL | Vista file management | 0 | 05-07-2008 04:43 AM |
| Self-Updating WPF Application | Tim Haughton | Avalon | 1 | 02-14-2008 11:53 AM |
| appdata-local-Application Data-Application Data-Application Data infinitum ad nauseum. WHY | keepout | Vista General | 15 | 09-15-2007 08:50 PM |
| Windows Application vs XAML Browser Application | Denis | Avalon | 0 | 04-20-2007 02:43 AM |
| Complimentary Industry Resources Vista Forums has joined forces with TradePub.com to offer you a new, exciting, and entirely free professional resource. Visit http://vistax64.tradepub.com today to browse our selection of complimentary Industry magazines, white papers, webinars, podcasts, and more across 34 industry sectors. No credit cards, coupons, or promo codes required. Try it today! |