uac

How to prevent uninstaller elevating for Standard Windows 10 user?

断了今生、忘了曾经 提交于 2019-11-27 05:59:02
问题 We have an x86 Win32 desktop application. When the installer is run by a Standard (non-Admin) user, we avoid elevating and/or showing a UAC prompt and install under C:\Users\username\AppData\Roaming\... instead of the common Program Files directory. On Windows 10, when our uninstaller is launched from Control Panel -> Programs -> Programs and Features , no UAC prompt is shown and the uninstaller runs without elevating. This is the desired behaviour. When the same uninstaller is launched from

Where to store Application Data in Windows 7 and Vista

ⅰ亾dé卋堺 提交于 2019-11-27 05:55:56
问题 My application needs to, like most, store data. The application was previously used on XP only where it would store the data in Program Files . Now that our customers are moving to Windows 7 I had to upgrade it so that it stored the data in a new folder. I opted for the ApplicationData folder as I thought I would be allowed access without needing UAC at all. Now on some Windows 7 machines this is fine, but on others access to the folder fails, presumably because of permissions, but when ran

UAC and Java

给你一囗甜甜゛ 提交于 2019-11-27 05:54:27
问题 Is it possible to ask for elevated permissions from within a Java Application? Suggestions I've seen seem to all be centered around running an external executable or setting up a manifest to request privileges on launch. These aren't available to, for instance, applets. Is there any way to request elevation from a running application? 回答1: UAC is not something that a running process can request (doesn't matter what language you are running in). You have to request elevation at launch time.

How does Windows decide whether to display the UAC prompt?

放肆的年华 提交于 2019-11-27 05:34:46
问题 In my VB6 application I open other EXE files. My application runs without any UAC prompt, but I have an EXE which checks for updates to software. This prompts the UAC prompt. So how does Windows decide whether to show the UAC prompt? I saw this link . So does it depend on the code I wrote in my application? It is interesting that my application (that is the main EXE file) does not prompt UAC whereas a small EXE which checks and downloads updates prompts the UAC. I have all the EXE files

Program Compatibility Assistant thinks my app is an installer

假装没事ソ 提交于 2019-11-27 05:16:23
问题 I have created a .NET C# WinForms application on Win 7 RTM x64, which let's say I have called DataInstaller. When I run this program outside of the debugger (just an empty form with no functionality at the moment), it works fine until I close the form. I then get a message from the Program Compatibility Assistant that says: This program might not have installed correctly I then get the option to reinstall using recommended settings or to say that the install did work as expected. If I name

Cannot access network drive in PowerShell running as administrator

▼魔方 西西 提交于 2019-11-27 05:09:58
问题 I'm running PowerShell in a Windows 7 x64 virtual machine. I have a shared folder on the host mapped as a network drive (Z:). When I run PS normally I can access that drive just fine, but if I run it "as administrator" it tells me: Set-Location : Cannot find drive. A drive with the name 'Z' does not exist. At line:1 char:13 + Set-Location <<<< Z: + CategoryInfo : ObjectNotFound: (Z:String) [Set-Location], DriveNotFoundException + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell

Disabling UAC programmatically

♀尐吖头ヾ 提交于 2019-11-27 04:24:37
Is it possible to programmatically disable UAC in Vista? Or, can I make my application run unrestricted by the UAC setting in any way? FYI, the application needs to mount hard drives on the fly, which is why I can't ask for UAC permission each time... Update: I'm looking for something in line with what Kosi2801 mentioned, basically to ask the user to always start the program in an 'elevated' mode. I'd want the permission to be a 1 time thing, I'm not saying that I programmatically disable UAC without asking permission first. I'm sure there are lots of programs that need to operate in this mode

Privileges/owner issue when writing in C:\\ProgramData\\

风流意气都作罢 提交于 2019-11-27 04:02:28
As pointed out in Writing config file in C:\Program Files (x86)\MyApp\myapp.cfg, vs. Administrator privilege , it is not a good idea to write a config file in C:\Program Files (x86)\MyApp\myapp.cfg . Instead of this, my software now saves its data in a subdir of %ALLUSERSPROFILE% (ex : C:\ProgramData\MyApp\myapp.cfg on Win7) [I use myfile = open(filename, 'a') in Python to do this.] I now encounter an issue about this file : I installed the software with User A , and ran it, then the file C:\ProgramData\MyApp\myapp.cfg was written. Then, I changed user to User B , and ran my software again :

How to add manifest <requestedPrivileges> info into delphi project

对着背影说爱祢 提交于 2019-11-27 03:51:45
What is the easiest way to add the <requestedPrivileges> manifest info to a Delphi XE project (.exe)? Is it possible to add just the required node like: <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator"/> </requestedPrivileges> or do i have to add the whole manifest file, like? <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="VistaLogonCustomizer.exe" type="*"/> <description>elevate execution level</description>

Where to put common writable application files?

只愿长相守 提交于 2019-11-27 01:36:18
问题 I thought that CSIDL_COMMON_APPDATA\company\product should be the place to put files that are common for all users of the application and that the application can modify, however, on Vista this is a read-only location, unless modified by the installer (as per MSDN - http://msdn.microsoft.com/en-us/library/ms995853.aspx), so... what's best? Modify the location's security settings to allow writing or use CSIDL_COMMON_DOCUMENTS\company\product instead? Maybe there's a third option? Also, is