uac

How do I avoid UAC when my EXE file name contains the word “update”?

人盡茶涼 提交于 2019-11-28 07:20:59
I noticed the following phenomenon: An executable built with Delphi 7 and part of the name including "Update" (e.g. "UpdateMyApp.exe") causes UAC to step in to display a warning like "do you want to allow the program to make changes to your computer". This happens with a simple hello world application. Showing the file in explorer shows the shield symbol overlayed to the application icon. As soon as you rename the exe the shield disappears and the application starts without warnings. As mentioned this only happens to programs built with Delphi 7 and started on Windows 7 (I assume same on Vista

Where to put common writable application files?

梦想与她 提交于 2019-11-28 06:55:09
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 there an "official" Microsoft recommendation on this somewhere? Modify just the security on a specific sub

Showing the UAC prompt in PowerShell if the action requires elevation

笑着哭i 提交于 2019-11-28 06:30:31
I have a simple PowerShell script to stop a process: $p = get-process $args if ( $p -ne $null ) { $p | stop-process $p | select ProcessName, ID, HasExited, CPU, Handles } else { "No such process" } If I try to stop a process not started by the current user; it works on Windows Server 2003. However, on Windows Server 2008 (and other Windows flavours with User Account Control), I get the following error: Stop-Process : Cannot stop process "w3wp (5312)" because of the following error: Access is denied Is there any way to get around this without running PowerShell with elevated privileges ? It

Run child process non-elevated from an elevated/As Admin process

杀马特。学长 韩版系。学妹 提交于 2019-11-28 06:10:55
问题 My application has a built-in self update system via another app called "updater.exe" which is in the same folder with the main application to update. It downloads the newest version, terminates the old one (if it's running) and then overwrites it. The problem is, to do that the updater.exe must be run with the Administrator privileges in order to have access to C:\Program Files\MyApp So far so good, the main app runs the updater.exe with Admin privileges (using UAC) but then the problem

How does Windows decide whether to display the UAC prompt?

人走茶凉 提交于 2019-11-28 05:24:09
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 digitally signed. I already had a glance at following links: http://msdn.microsoft.com/en-us/library/windows

Diagnosing Windows application manifests

邮差的信 提交于 2019-11-28 04:12:24
问题 Windows application manifests have a very loose grammar — unrecognized parts are ignored. How can I diagnose which parts are recognized and which are not? The problem leading to this question is with an application that has a side-by-side UAC manifest with a requestedExecutionLevel of highestAvailable specified. This should switch Vista file virtualization off, but it does not. I want to find out why. The manifest is being used, as I checked by intentionally introducing a syntactic error, but

Mark MSI so it has to be run as elevated Administrator account

孤街醉人 提交于 2019-11-28 04:10:11
I have a CustomAction as part of an MSI. It MUST run as a domain account that is also a member of the local Administrators account. It can't use the NoImpersonate flag to run the custom action as NT Authority\System as it will not then get access to network resources. On Vista/2008 with UAC enabled if NoImpersonate is off then it will run as the executing user but with the unprivileged token and not get access to local resources such as .installState. See UAC Architecture Anyone know of a way to either Force the MSI to run with the elevated token in the same way that running from an elevated

Program Compatibility Assistant thinks my app is an installer

两盒软妹~` 提交于 2019-11-28 03:48:33
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 the app 'DataThingy' this isn't an issue, I guess this is related to the way that programs called *Setup

c# starting process with lowered privileges from UAC admin level process

流过昼夜 提交于 2019-11-28 01:57:37
I have one major problem with my app. I have an app & updater as a separate exe files. When an update is available, updater does the update, and on process completion it starts my app. The main problem is - app is installed in program files folder, so updater need UAC admin privileges, and that's ok, but when I need to run my app updater needs to run it as a normal user, because if it's run as an administrator drag and drop doesn't work (not an app problem, UAC blocks it). I've tried several different solutions, and even this one: How to run NOT elevated in Vista (.NET) It haven't helped me -

Can a process elevate itself after startup?

落花浮王杯 提交于 2019-11-28 01:15:32
问题 Is it possible for a process to gain administrator priviledges after it has started? If so, how? Examples should be in C or C++. Edit - Examples should also use umanaged code. 回答1: You cannot elevate the permissions of a process while the process is running. the common way around this is to spawn a new process with elevated permissions when required. This process then does the work that requires higher privileges and then quits, releasing control back to the main process. You should be able