uac

How can I get elevated permissions (UAC) via impersonation under a non-interactive login?

梦想的初衷 提交于 2019-11-28 00:58:57
I have a class library that keeps system-wide configuration data in the registry (HKLM\Software\XXX). This library is used in various applications (services, windows forms, web apps, console apps) on various versions of Windows (XP, 2003, 7, 2008 R2). Because of this, the identity of the app is not consistent and may not even be a member of the machine's Administrators group. So I've created an AD domain admin user and do impersonation to gain write access to the registry. This works perfectly in XP/2003, but not in UAC-enabled systems (7/2008R2). It is my understanding that only interactive

How to detect file redirection to the Windows VirtualStore?

限于喜欢 提交于 2019-11-27 21:34:16
Since the release of Win Vista, Microsoft introduced file virtualization for legacy applications running as 32bit processes. Released as part of Microsoft's User Account Control (UAC) any legacy applications attempting to write to any locations considered protected by the operating system are redirected to the VirtualStore. At this point, steps have been taken to ensure that the application in question now runs as a 64bit process that is UAC aware, however, this does little to address the issue of migrating the users data to a location that is considered safe from virtualization. While

How to embed a manifest file at compile time in Visual Studio 2010

安稳与你 提交于 2019-11-27 20:42:05
I have a project with a manifest file with the following node: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> ...meaning I want it to only run "as administrator" by default. from searching around, to make this work I have two options: "Embed" it. deploy the manifest file with the exe, and name it YourProject.exe.manifest. I've tried option 2, and when I run my app it doesn't ask for admin rights? So, how do I do option 1 in VS2010? I've heard of mt.exe, but this is no good to me as it's done post build. I need the option to part of the solution and the project file

Windows Vista/Windows 7 privilege: SeDebugPrivilege & OpenProcess

你离开我真会死。 提交于 2019-11-27 19:43:46
Everything I've been able to find about escalating to the appropriate privileges for my needs has agreed with my current methods, but the problem exists. I'm hoping maybe someone has some Windows Vista/Windows 7 internals experience that might shine some light where there is only darkness. I'm sure this will get long, but please bear with me. Context I'm working on an application that requires accessing the memory of other processes on the current machine. This, obviously, requires administrator rights. It also requires SeDebugPrivilege (no, it is not a misspelling of SetDebugPrivilege ),

UAC need for console application

大城市里の小女人 提交于 2019-11-27 19:43:22
I have a console application that require to use some code that need administrator level. I have read that I need to add a Manifest file myprogram.exe.manifest that look like that : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator"> </requestedPrivileges> </security> </trustInfo> </assembly> But it still doesn't raise the UAC (in the console or in debugging in VS). How can I

How do I create a manifest file to launch application with admin privileges?

大憨熊 提交于 2019-11-27 19:30:33
I want to create a manifest file for my VB 6.0 program, so that when I launch my application, the OS should ask the user for administrator privilege. I also want to know how it can be embedded in the application? Cody Gray You don't actually create the manifest file in VB. A Windows application manifest is a standard text document, formatted as XML. You can create it in Notepad and save it with the appropriate file name in your application's directory ( YourAppName.exe.manifest ). Microsoft has more information available here: Application Manifests . It even includes a sample manifest that you

How to prevent “This program might not have installed correctly” messages on Vista

我的梦境 提交于 2019-11-27 17:12:48
I have a product setup executable that copies some files to the user's hard drive. It's not a typical installer in the normal sense (it doesn't add anything to the Start Menu or Program Files folders). Each time the setup program is run on Vista, after the exe terminates, Vista produces a task dialog: This program might not have installed correctly Reinstall using recommended settings This program installed correctly Is there a function I need to call from the exe or registry entry to set, to indicate to the operating system that the program installed correctly (or to at least supress this

Do high-integrity tokens *have* to have the Administrators group enabled?

无人久伴 提交于 2019-11-27 15:50:49
When UAC is enabled, and you log in with an administrative account, you get two tokens: the elevated token; this has the Administrators group enabled, is high integrity (i.e., the mandatory integrity label SID is S-1-16-12288) and has elevation type TokenElevationTypeFull. the limited token; this has the Administrators group disabled, is medium integrity (S-1-16-8192) and has elevation type TokenElevationTypeLimited. Do these three factors always match up in this way? That is, does the kernel require that only tokens with the Administrators group enabled can have high integrity and/or

Bypassing elevation when launching a new process

我只是一个虾纸丫 提交于 2019-11-27 15:47:39
OK, here's my problem: I'm trying to launch a third-party application. This application is apparently configured to require elevation, presumably via an embedded manifest. My program is running in the context of a non-administrative user, and I want the third-party application to run in the same context. When I call CreateProcess it returns error code 740, "The requested operation requires elevation." I've tried the CREATE_PRESERVE_CODE_AUTHZ_LEVEL flag which sounded relevant but it made no difference. The third party application does work without administrator privilege, e.g., if I disable

CreateDesktop() with vista and UAC on (C, windows)

我是研究僧i 提交于 2019-11-27 14:31:52
I asked this in CreateDesktop() with Vista UAC (C Windows) I set a bounty but in trying to vote down the only answer the "accept" was pressed by mistake (i've been awake for more than 48 hs). so I am asking it again. I'm using CreateDesktop() to create a temporary desktop where an application will run, perform a cleanup action (while remaining out of the way) and terminate. I'm closing that desktop once the application is gone. Everything is fine when using Windows XP and even Vista. The problem arises when you enable the (annoying) UAC. Everything is OK when you create a desktop, but when you