Announcement
Collapse
No announcement yet.
Silent Check for Update but Visible Install
Collapse
X
-
(…) I have my TrueUpdate program running as invoker as suggested. (…) TrueUpdate reports "Unable to execute installer/patch file. File execution failed, elevation required."
(1) If I change the security of my programs "Program Data" folder, do I need to then copy my executible around after I download it so its priveldges change or will I be able to use UpdateHelper to just run it. Your example talks about extracting a ZIP not running a program.
(2) Who makes sure the UpdateHelper service is running - the Setup Factory installer or the TrueUpdate program?
(3) Is the Program Data folder the appropriate place to put these files? I thought it was preferable to the user's application data which is buried and it is easily accessible by all users of our software on the computer.
(4) For testing this prior to release, I assume I can manually change the security of the TrueUPdate folder without doing a thing to the installer?
If you haven't already done so, reading this might help a little.
Ulrich
Leave a comment:
-
Hi Ulrich,
It is a new program that we are releasing. I am setting up the program to do the silent check for updates or to allow for a manual "force" check for updates by passing an argument to TrueUpdate program. So, yes, I'm trying to implement what you suggest and have downloaded the updatehelper trial version for my testing prior to deciding if this approach will work. I have my TrueUpdate program running as invoker as suggested.
The program is installed in the Program Files folder and the ini files and TrueUpdate files are in the Program Data folder. When I download the update of our program, I write the file into a sub folder off the Program Data folder and use the TrueUpdate server files to launch it. That is when I get the error that you describe in your articles - the executible won't run because it doesn't have enough privileges. Specifically, TrueUpdate reports "Unable to execute installer/patch file. File execution failed, elevation required."
So to clarify my questions....
(1) If I change the security of my programs "Program Data" folder, do I need to then copy my executible around after I download it so its priveldges change or will I be able to use UpdateHelper to just run it. Your example talks about extracting a ZIP not running a program.
(2) Who makes sure the UpdateHelper service is running - the Setup Factory installer or the TrueUpdate program?
(3) Is the Program Data folder the appropriate place to put these files? I thought it was preferable to the user's application data which is buried and it is easily accessible by all users of our software on the computer.
(4) For testing this prior to release, I assume I can manually change the security of the TrueUPdate folder without doing a thing to the installer?
Thanks for your help. I'm happy to pay for the UpdateHelper but don't really think I need a consult. Just a little nudge in the right direction.
- Lisa
Leave a comment:
-
(.…) as soon as I try to actually run the program update (the exe installer) I get the error message.
(…) I believe we use Setup Factory and the TrueUpdate files can be written to our programs data folder where the .ini file lives.
And then I think I have to also put in the update helper into that same folder and somehow have it running on my customers computers as a service? Not quite sure how to do that but I think where I really get confused is after my TrueUpdate program downloads my update to a subfolder of my programs data folder.
Sorry but a lot of what you include in your documentation is a little bit over my head.
Ulrich
Leave a comment:
-
Ulrich -
I read over all your information and I still don't get it. I guess because your example talks about a ZIP being extracted and I'm trying to run a program update (exe) which we download from an FTP site using TrueUpdate. I have the TrueUpdate program working silently but as soon as I try to actually run the program update (the exe installer) I get the error message.
From what I understand from reading your information, when our program is originally installed we need to install the original "true update" files in a special folder and then use my installer to change the security permissions on that folder. I don't actually write the installer code but I believe we use Setup Factory and the TrueUpdate files can be written to our programs data folder where the .ini file lives.
And then I think I have to also put in the update helper into that same folder and somehow have it running on my customers computers as a service? Not quite sure how to do that but I think where I really get confused is after my TrueUpdate program downloads my update to a subfolder of my programs data folder. Do I have to then use the update helper to copy that file from one folder to another which changes its permissions so I can run it and trigger the UAC? But then how is it started?
Sorry but a lot of what you include in your documentation is a little bit over my head.
Thanks for the help!
- Lisa
Leave a comment:
-
Hum... I am not sure what you mean. Being logged in using an administrator account is not the same as running as administrator, right? So even if your user account is an administrator, you still have "normal" privileges, and you still may be unable to write in a folder or replace a file created by a process running "as administrator" (with elevation). This is why I state in my post that you should set the permissions on the folder (and the files in it), making sure that a non-elevated process can write in it, and replace the files later.
Ulrich
Leave a comment:
-
..Actually I think the folder must be writeable as it's successfully creating the log file and downloading the .ts3 to it.
Leave a comment:
-
Is there a reason why %appdata% might not be writable when logged in as an Admin?
Leave a comment:
-
The current executable will run the *.ts3, which then will replace the *.exe, unless of course the folder or executable is not writable.
Ulrich
Leave a comment:
-
Yes, I've read your post - that was what lead me to using %appdata% in the first place. However I'm not confident to proceed unless I can find out why the updater can't update itself. It doesn't write any errors to the log - it just says it needs to restart and then just exits. Is it supposed to physically replace the existing updater.exe or should it just start the new instance from a separate .exe?
Leave a comment:
-
It is hard to diagnose what you missed, but if the exe file does not get replaced, it is possible that the user account has insufficient privileges. If the file was deployed by an admin, the user may not be able to delete the file, even when it is a "public" folder.
I cover most of the issues in my post, have you read it?
Ulrich
Leave a comment:
-
I'm having this problem too. My customer doesn't want the UAC prompt each time the app starts up.
I have made the mistake in putting the updater in Program Files, so am I right in thinking that I will have to move it to %appdata% in order for it to be able to update itself? I have briefly tried running my updater from this folder, but as I've changed the elevation level, it prompts for the app updater to be restarted. It successfully downloads a new version (.ts3) but it doesn't replace the original updater - if you start it again it still thinks an update is needed and just loops. So unless I'm doing something wrong, it doesn't seem like using %appdata% works?
Leave a comment:
-
There are different situations possible with TrueUpdate:- Silent until an update is available
The global variable g_SilentUntilUpdateAvailable will allow you to perform an update check, and exit silently if no newer version was published. Only when an update exists, the Welcome dialog (or whatever you are using) would be displayed on the desktop. The UAC dialog would be shown when the patch / update installer is started - which is a different process to the TrueUpdate client.
- Interactive or silent update check, no UAC prompt
Again, using g_SilentUntilUpdateAvailable, you can start the TrueUpdate client and have it show an dialog only when a new version is available. However, instead of asking for administrative privileges by showing the UAC, you can perform the tasks requiring elevation using the UpdateHelper tool you mentioned. Yes, the update installer or patch executable needs to be silent for this to work, but not the update check (the TrueUpdate interface) itself.
If you install the TrueUpdate into the ProgramFiles folder, then it can't run without administrative privileges, because it can't update itself at that location while running as logged user. For this reason, I always recommend that the update client is deployed into a sub folder of %ApplicationDataFolderCommon%.
Ulrich
Leave a comment:
- Silent until an update is available
-
Silent Check for Update but Visible Install
It seems the ideal setup for my typical application is that the 'check for available update' task should be completely silent (no UAC dialog) and if an update is available then a prompt should appear and a visible installation should start. I've been researching this a bit and experimented with using the UpdateAction tool from Ulrich but this approach doesn't appear to be possible with that tool since it requires a completely invisible/silent installation.
Has anyone attempted something like this or are there any suggestions as to an approach. Thanks in advance.Tags: None
Leave a comment: