|
Prev: My Edit boxes are flickering when CView object is redrawing itself.
Next: AfxBeginThread hangs, but not when the application is being debugged
From: GT on 9 May 2008 06:20 In a couple of weeks I'm going to start looking at our installation again. Following a previous round of help in this group, we now use MS Visual Studio 2005's "Setup and Deployment" -> "Setup Project". All is well on XP, but I need guidance/help to build a Vista compatible install. Top of the list is ease of use and convenience for our users. Ideally, I would like anyone to be able to install our application on their PCs. The application itself works on Vista, but our licensing requires an elevated install - a term that I don't fully understand. The only access to Vista is on an employee's parent's PC!. Clearly, I would rather not 'mess up' that PC by installing and removing lots of times! We have been advised (elsewhere) that in order to install on Vista, we should run our application (or the license files) once in an elevated setup to activate our license files. I know that Vista has tighter control over access privileges and even an administrator doesn't have administrator access to the PC, but I don't know what an elevated install actually entails and I don't know how to do any of this on Vista. We have been advised to build... "a small helper executable that you launch during installation that already has elevated permissions (Vista's UAC prompt)". I can build a small executable that opens, then closes our license files, but my questions are: 1. What do I have to code to give my small exe an elevated permission in Vista's UAC prompt? 2. What is Vista's UAC prompt? 3. Is this possible using Visual Studio 2005's - "Setup Project"? Thank you all in advance! GT
From: Tom Serface on 9 May 2008 12:41 I think this would be especially true if you are installing any devices or programs that access ports or something else that might be blocked by a firewall. I typically tell people to run my MFC applications from an Administrator (or elevated) user at least once so the proper registry stuff can be set up and from that point on they can run as a limited or standard user. If you just start the program as part of the install you can take care of a lot of that stuff at that point. I've never done an installation program specifically for Vista, but I've run lots of them and I think Vista will just prompt for an administrator ID and password when it feels the need to elevate. I'd think your program would have to handle whatever happens if the users fails to log in at that point. I don't think the VS 2005 setup stuff can do this well, although it may just rely on Vista UAC to do the right thing. It would be easy enough to try with a simple setup that accesses the registry. You should get all kinds of noise from Vista and Firewall asking if you want to Allow this or that and then you have to press Continue then you have to say Allow again and eventually it works. Tom "GT" <ContactGT_remove_(a)hotmail.com> wrote in message news:017b715e$0$13142$c3e8da3(a)news.astraweb.com... > In a couple of weeks I'm going to start looking at our installation again. > Following a previous round of help in this group, we now use MS Visual > Studio 2005's "Setup and Deployment" -> "Setup Project". All is well on > XP, but I need guidance/help to build a Vista compatible install. > > Top of the list is ease of use and convenience for our users. Ideally, I > would like anyone to be able to install our application on their PCs. The > application itself works on Vista, but our licensing requires an elevated > install - a term that I don't fully understand. The only access to Vista > is on an employee's parent's PC!. Clearly, I would rather not 'mess up' > that PC by installing and removing lots of times! > > We have been advised (elsewhere) that in order to install on Vista, we > should run our application (or the license files) once in an elevated > setup to activate our license files. I know that Vista has tighter control > over access privileges and even an administrator doesn't have > administrator access to the PC, but I don't know what an elevated install > actually entails and I don't know how to do any of this on Vista. > > We have been advised to build... "a small helper executable that you > launch during installation that already has elevated permissions (Vista's > UAC prompt)". I can build a small executable that opens, then closes our > license files, but my questions are: > > 1. What do I have to code to give my small exe an elevated permission in > Vista's UAC prompt? > 2. What is Vista's UAC prompt? > 3. Is this possible using Visual Studio 2005's - "Setup Project"? > > Thank you all in advance! > GT >
From: David Ching on 9 May 2008 12:52
"GT" <ContactGT_remove_(a)hotmail.com> wrote in message news:017b715e$0$13142$c3e8da3(a)news.astraweb.com... > 1. What do I have to code to give my small exe an elevated permission in > Vista's UAC prompt? > 2. What is Vista's UAC prompt? This is described at http://msdn.microsoft.com/en-us/library/bb756996.aspx, specifically http://msdn.microsoft.com/en-us/library/bb756973.aspx You need to put a manifest into your small exe with: <requestedExecutionLevel level="requireAdministrator" /> > 3. Is this possible using Visual Studio 2005's - "Setup Project"? > I'm not sure. I believe Vista launches all Setup programs as elevated regardless of the manifest, but you should still put in the manifest as described above to avoid file and registry key virtualization (where Vista tells you e.g. it is putting your files and reg keys in one place but is really putting them in another, less global, place so if you are a virus it won't take out the entire machine). -- David |