uac

RUNASADMIN in Registry doesnt seem to work in Windows 7

我只是一个虾纸丫 提交于 2019-12-06 20:31:47
问题 For a while now the installer for my program has used the below code to make my app run with administer privileges. But it seems to have no effect under Windows 7. In Vista it worked beautifully. If I right click the shortcut and tell it to run as Administer, the program will start fine. But by using the below, code it should be made to run the program that way all the time. It doesn't anymore. Does anyone know if Win 7 still uses this key? UAC is also on by the way. Registry.SetValue(@"HKEY

How to change file association without UAC confirmation?

点点圈 提交于 2019-12-06 13:17:12
问题 When I was working with file association in a .NET application I hadn't had found a way to set it without UAC popping up a confirmation dialog. Today, when I opened uTorrent and looked up for file association, I've found that you can enable (writing to registry) without any confirmation from the UAC. How is that possible? uTorrent is not running as an admin. Edit: Well, I have just discovered with Process Monitor (Sysinternals) that what uTorrent.exe does is to create a few keys ( uTorrent

How to do Vista/UAC aware self-extract installer

ぐ巨炮叔叔 提交于 2019-12-06 12:51:22
问题 I distribute my software with a WinZip self-extract archive (SFX). I am aware of this and that. But those doesn't seem to work for SFX scenarios. While installing, the SFX unpacks and starts a contained program (written by me), that does the installation. This includes the creation of a registry entry for the programs list under the windows control panel. Further, the program has a manifest. So it should be "Vista-aware". The SFX-executable also includes a manifest. The problem is that the

Install files to original user's My Docs folder via Inno Setup on Windows Vista/7

六眼飞鱼酱① 提交于 2019-12-06 12:43:29
问题 In the [Run] section of an Inno Setup script, there's a flag runasoriginaluser that allows the script to run a process as the original user: the spawned process will execute with the (normally non-elevated) credentials of the user that started Setup initially (i.e., the "pre-UAC dialog" credentials). Is there an equivalent flag or workaround for the {userdocs} shell folder constant? This is apparently a known limitation within Inno Setup (and other installers, generally), but I'm hoping

BDE, Windows 7 and UAC

走远了吗. 提交于 2019-12-06 12:36:00
I have a very old application written in delphi 5 running in some customers which uses the BDE. Now some users with Windows Vista and 7, had experimented some problems with the multiuser access. i' think which these problems are related to the location of the net .and .lck files. so the question is which is the proper way to confgure the BDE under Windows Vista and 7 to avoid permissions and UAC conflicts? In addition to the above answer, you'll want to make sure that the .net and .lck files are located in a user-specific directory under Windows 7, specifically: C:\Users\{User Name}\AppData

Is there a way an NON-elevated process can copy a file to a protected directory?

一笑奈何 提交于 2019-12-06 11:52:51
问题 I am fine with it asking the user for elevation when it is ready to copy a file. The program that needs to do the copying cannot run elevated (it looses many important environment variables and I am not in a position to change the way it is started). My fallback will be to have it spawn a process with elevation that actually does the file copy, but I would prefer not to have to add yet another exe to what I am working on. 回答1: Use the COM Elevation Moniker to instantiate the IFileOperation

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

六眼飞鱼酱① 提交于 2019-12-06 11:48:12
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 seen one app that appears to do this. As far as I can tell, this other apps is not being run with Admin rights, and yet it can affect all apps in the system, including those with Admin privilege. It would seem that there's a way to do this, then, but I'm at a

why does my application work differently when running as administrator?

ⅰ亾dé卋堺 提交于 2019-12-06 11:36:34
问题 I have a small Delphi application that writes a key to the LOCAL_MACHINE registry. When I run it on Windows 7 professional with user that has administrator privileges it fails to write the value, but when I right click and choose "Run as administrator" it does work. The code is: var reg : TRegistry; begin Result := false; reg := TRegistry.Create; reg.RootKey := HKEY_LOCAL_MACHINE; if (reg.OpenKey('Software\YepYep', TRUE)) then Begin try reg.WriteString('ProductKey', Trim(ProductKey)); Result

Windows 7 folder sharing API

ぐ巨炮叔叔 提交于 2019-12-06 10:03:36
I wonder if it's possible to programmaticaly share folders in Windows 7 while running in restricted logon session: 1) NetShareAdd returns ERROR_ACCESS_DENIED. 2) Command line net share says the same. 3) But explorer has no problems creating new shares without invoking UAC. How does it do that? Any help will be greatly appreciated. UAC in windows 7 is less strict than it was in Vista. Windows 7 regards Explorer as a trusted application so it will silently create the share without a UAC prompt (you can change this behavior in the Control Panel). Your application isn't a trusted one (OK, you

UAC: Manifest file is ignored

依然范特西╮ 提交于 2019-12-06 07:25:40
One of my Executables writes some configuration into a XML file to C:\Program Files\MyApp\config.xml. It needs to run as Administrator on Vista / Server 2008, otherwise the OS won't let it write to that location. I included a manifest file named config.exe.manifest, to automatically request administration rights at launch. Here's my manifest file: <?xml version="1.0" encoding="utf-8"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level=