uac

Execute code in another users context

I have an app with a manifest that requires running as administrator, but part of the app is to map a drive using WNetAddConnection2 which I believe requires it to be run in the normal user context due to credentials etc. Is there a way to execute this bit of code in the normal user context without creating a separate process. EDIT Fro...

What actions will require UAC elevation in Windows?

I'm marking this as a community wiki because I'm not really looking for one complete answer. So if you feel like posting one or two things that will activate the UAC prompt instead of a comprehensive list then go ahead. What actions in Windows will activate UAC? I'd like to avoid it as much as possible because my application doesn't n...

Why does IGraphBuilder::RenderFile not find ffdshow Video Decoder?

When I install K-Lite Codec Pack (5.90 Basic) as an administrator then run an application that calls IGraphBuilder::RenderFile as a standard user, the resulting graph doesn't have the ffdshow video decoder filter. However, when I run the application as the (original installing) admin the ffdshow video decoder is in the graph. Is there s...

Change a registry value in VB.NET

I have searched a lot to find a solution for my problem, but I can't find any specific solution. I need to change a value which is stored under HKEY_LOCAL_MACHINE\SOFTWARE\APP_NAME. It is not possible to use .NET's registry functions, since they have drastic restrictions. The following snippet should solve my problem: Dim regKey As Re...

Admin required for Visual Studio 2008 Setup Project

I have a VS 2008 Setup Project that is installing a very simple application in the local user's App Folder. When the Setup Project runs, it is requiring the Admin to login to run it. How can I allow a Standard User to run the installation. There are no Prerequisites. The MSI file is the only file to be run (no Setup.exe). I have sig...

Privilege Elevation only when and if required.

My application only very occasionally requires privilege elevation... I need to reference some 3rd party COM components that only work correctly when run as administrator. I would like my application to request privilege elevation only when it needs it... Generally, I don't want my application to run as administrator unless I need to us...

Prompt with UAC when user doesn't have access to copy a file

In my application, if the user saves a file to a folder they don't have permissions for, File.Copy will fail. An example is saving a document to the C:\ root. Instead of denying access, I'd like to prompt the user to elevate permissions with a UAC prompt, but only for this save function (not for the entire application). Is there a way t...

Windows Server 2008 R2: ASP queries to IIS fail with UAC enabled

I have some ASP code that creates a virtual directory in IIS. However, when running on IIS7 in Windows Server 2008 R2, the call to GetObject fails with "permission denied". This only occurs when UAC is enabled; the entire process works perfectly if UAC is disabled. Set objIIS = GetObject("IIS://localhost/W3SVC/" & siteNumber & "/Root"...

RegOpenKeyEx return ERROR_SUCCESS but it shouldn't (windows 7)

Hi, I've got a problem about RegOpenKeyEx, the code: #include <tchar.h> #include <stdio.h> #include <windows.h> #pragma comment (lib, "Advapi32.lib") int main () { TCHAR *keyName = _T("SOFTWARE\\foobar2000\\capabilities"); HKEY key = NULL; if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyName, 0, KEY_ALL_ACCESS, &key) != ERROR_SUC...

How to put a Windows UAC Shield overlay on a button using wxPython?

I have a button that will launch a process that requires UAC elevation. I want to display the Windows UAC shield overlay on the button, how do I do this in wxPython? The application is only going to run on Windows, so I don't need to worry about it not working on other systems. edit 2: Got it: BCM_SETSHIELD = 0x0000160C btn_apply = wx....

Inno Setup and Permissions for non-admins: everyone, users, or authusers?

Should I give "modify" permissions to 'everyone' or 'users' or 'authusers' if, under UAC, I want to make data folders and files writable to non-admin users of the program? I want that basically everyone who can sit at the computer can read/write the data through the program. I've also read that using 'everyone' for modify permission can...

How to supress the warning in IE's protected mode

I have a BHO which captures webpages as images and I run another process to pngcrush the images thus created. The problem that I face in UAC enabled systems is that everytime IE runs, I get a warning for the pngcrushing process that I spawn from the BHO. I read here - http://msdn.microsoft.com/en-us/library/bb250462(VS.85).aspx#wpm_eleb...

UAC and elevation prompt pattern

I've read several questions regarding UAC and privilege elevation but I've not found a satisfactory/comprehensive answer. I have this scenario: on Windows 6 or above, when the user opens a configuration window I have to show the shield (BCM_SETSHIELD) on the OK button only if privilege elevation will be required to complete the task. --...

How would a SIP request would look like when inviting more clients to conversation

Hi, I've finished my SIP client and it works, as long as it comes to one on one, or x on x if the participants are defined in the beginning of the call. I would like to attach a caller or a callee in the middle of the call, I understand the main issue is in the media session joining implementation, but I do need to tell the new partici...

Access to HKLM registry branch on Win 7 from within application

Is is possible to write to the HKLM registry branch in Win 7 from an application? My existing code is not able to write to the HKLM registry branch on Win 7 machines, while it is able to do this on XP machines. How do you allow an application read/write access to HKLM on Win 7, or should all applications now just use HKCU instead? Wha...

What would be the best implementation to detect repeating SIP message?

Hi, I've wrote a SIP UAC, and I've tried a few ways to detect and ignore repeating incoming messages from the UAS, but with every approach I tried, something went wrong, my problem is that all the messages that has to do with the same call has the same signature, and to compare all of the message text is too much, so I was wondering, w...

Can a manifest resource be added to a VB6 project using the Resource Editor?

We have a VB6 project that compiles to an ActiveX EXE that happens to have the word "patch" in the filename (it is part of a police dispatch system), which is causing Installer Detection on Windows 7 to think that it requires elevation. Rather than renaming the EXE, I want to embed a manifest resource into the compiled EXE that will req...

How to use SetWindowsHookEx in Vista and hook Admin apps with UAC?

I'm trying to figure out if there's a way to use SetWindowsHookEx and be able to affect apps that are run with Admin rights on Vista, with UAC enabled. This is an app that will need to add a small button to the caption bar of other windows to enable some multi-monitor-aware handling. I would have thought this couldn't be done, but I've...

C++ REG_SZ to char* and Reading HKLM without Elevated Permissions

So I've been trying to get a REG_SZ value out of the registry and store it as a char*. After looking around the internet this is what I came up with. The problem is that the value I get is not what is stored in the registry, I get a bunch of random garbage. How would I correctly get the value? HKEY hKey; char value[256]; // Open the key...

Prevent UAC Virtualization?

Hello, I have a VB6 app that I've been selling for over 12 years. Sometimes I have users that have a hard time getting the app to run. The data writes are going into /My Documents so nothing but the installation files (EXE, etc.) are going into C:\Program Files (or C:\Program Files (x86)). The fix to their problem is to start the app...