From: Kevin Provance on 6 Oct 2009 20:23 Since my installer (Inno) is download based (serious pascal scripting), meaning that new files are downloaded on demand, my app shells out to a stub of the installer to download the new file via a silent command line and then quite. The installer then downloads the file, installs it and restarts it. Works really well. - Kev (Bill McCarthy and Alex Clarke is free to use this text in their ED project) "Eduardo" <mm(a)mm.com> wrote in message news:hagm8v$kut$1(a)aioe.org... | | There are several things that you'll need to do whaterver method you use. | | One of these things is about the rights. | You'll need to run as admin to do that on Vista. | But if your program usually don't run as admin, you'll need to scale | privilleges in order to do that. It is the "runas" option in the | ShellExecute API for that purpose. | | But the "main" problem is that when you are done updating, you should | come back to non provilleged execution mode, as normal user. And the API | don't provide a direct way for doing that. | | Leaving the program running as admin could have consequences, because | the folders are not wirualized, etc. | | I found a page that described a workaround for doing that, I'll see if I | can find it again... | | Here is the article: | | http://www.codeproject.com/KB/vista-security/VistaElevator.aspx?msg=1922231 | | And this: | http://www.codeproject.com/KB/vista-security/RunNonElevated.aspx | | Anyway, the source code is in C, but it may help.
From: Eduardo on 6 Oct 2009 20:53 Kevin Provance escribi�: > Since my installer (Inno) is download based (serious pascal scripting), > meaning that new files are downloaded on demand, my app shells out to a stub > of the installer to download the new file via a silent command line and then > quite. But the UAC must ask for elevation to run that program...
From: Kevin Provance on 6 Oct 2009 21:02 "Eduardo" <mm(a)mm.com> wrote in message news:hagopm$n77$1(a)aioe.org... | Kevin Provance escribi�: | | > Since my installer (Inno) is download based (serious pascal scripting), | > meaning that new files are downloaded on demand, my app shells out to a stub | > of the installer to download the new file via a silent command line and then | > quite. | | But the UAC must ask for elevation to run that program... With Inno, you have your choice of running as admin or not.
From: Nobody on 6 Oct 2009 22:02 Is the EXE to be replaced inside "Program Files"? If so, then you would have permissions problems as the "Users" group can't write to "Program Files" in Windows 2000+. If this is company network, you can use RUNAS like Eduardo suggested. In this case, create a user account for this purpose to make things easy to manage. If it's meant for general usage, you have to use an update service running under the local system account to perform the update. There are commercial update services available, mostly in the range of $200+.
From: Eduardo on 6 Oct 2009 22:07
Kevin Provance escribi�: > "Eduardo" <mm(a)mm.com> wrote in message news:hagopm$n77$1(a)aioe.org... > | Kevin Provance escribi�: > | > | > Since my installer (Inno) is download based (serious pascal scripting), > | > meaning that new files are downloaded on demand, my app shells out to a > stub > | > of the installer to download the new file via a silent command line and > then > | > quite. > | > | But the UAC must ask for elevation to run that program... > > With Inno, you have your choice of running as admin or not. And how would it write to Program files\Application folder\ whitout admin rights on Vista with UAC? |