Все вопросы: [uac]

113 вопросов

похожие теги:
18
голосов
1ответов
12412 просмотров

Dropping privileges in C++ on Windows

Is it possible for a C++ application running on Windows to drop privileges at runtime? For instance, if a user starts my application as Administrator, but there's no reason to run my application as administrator, can I in some way give up the Administrator-privileges? In short, I would like to...

2
голосов
1ответов
132 просмотров

UAC Testing with Website Generated Email

We would like to use Selenium to test email content generated from our website. We could mock a mail server, but how would we assert the content of the emails? We're using nUnit/Selenium/C#. Does anyone have a good approach to accomplishing this? Thanks in advance!

2
голосов
3ответов
3801 просмотров

UAC: Manifest file is ignored

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 admi...

2
голосов
2ответов
18473 просмотров

How can I add a manifest (for UAC support) to my VB.NET application?

How can I add and embed a manifest file in VB.NET, in order to add UAC support to my application?

0
голосов
1ответов
731 просмотров

Vista UAC - permissions and certificates for an exe

I'm a bit of a newbie with regard to UAC and certificates. I have an installer (bespoke) that needs to write files to Program Files, set registry keys, create SQL databases, add start menu shortcuts, etc. It thus requires elevation for pretty much everything it does. If this application is run ...

1
голосов
2ответов
349 просмотров

Prevent hotkey from being lost after a UAC prompt in Windows

BACKGROUND I wrote an app in C# that registers windows hotkeys (it takes a screenshot when I press PRINTSCREEN) My code to register the hotkey, capture screen , etc all works. No issues there. THE PROBLEM IF my app is running (and successfully has registered the hotkey) and then I do someth...

5
голосов
1ответов
17837 просмотров

Save File to Desktop in Vista/Windows 7 in .NET 2.0

I'm working on updating one of our applications. It must use .NET 2.0. One portion creates a file on the Desktop using FileStream fs = new FileStream(Environment.GetFolderPath (Environment.SpecialFolder.DesktopDirectory), FileMode.Create); But I get an UnauthorizedAccessException in Win...

4
голосов
3ответов
4570 просмотров

How do I create a manifest for a windows installer?

We have an installer for our application that must be downloaded and run with administrator privileges, like many other installers. However, the installer isn't named "setup.exe", so Windows doesn't automatically detect it as requiring elevation to run. Changing the installer name to make things...

1
голосов
2ответов
239 просмотров

Security and UAC for .NET

My WindowsForms application needs to access the Internet, but when I try to open a WebRequest the application crashes. I noticed when I run the application from a simple folder (My Documents for example) it works, but if I run from "Program Files" folder it doesn't. I know that the problem reside...

0
голосов
1ответов
1139 просмотров

Opening/Writing files as administrator/root using C++ (UAC/gksudo/etc.)

The application I'm working on requires the ability to edit certain protected files across Linux, OSX, and Windows [Vista]. Generally, when an application needs to do something with elevated privileges, a password request dialog appears asking the user to verify they want to allow the applicatio...

0
голосов
1ответов
453 просмотров

Programmatically launch sfx archive on Windows 7 (using _execv)? (C++)

My (MS Windows) application can update itself over the internet by download a self extracting archive and launching it via _execv (C++). Now while launching the sfx archive works fine on Windows XP, it doesn't on Windows 7. I guess it has to do with UAC, but even turning UAC off didn't cure this ...

5
голосов
2ответов
4376 просмотров

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

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 w...

41
голосов
7ответов
94304 просмотров

Java: run as administrator

Is there a way in Java to ask the system to get control over administrator functionality. Of course without doing: Right click on the exe -> run as admin. What I want is that there comes a frame from UAC like in Windows Vista or Windows 7. Or have I to do some settings while making an exe fro...

1
голосов
2ответов
446 просмотров

Elevated process in Vista does not overwrite files

I'm trying to run elevated process, say, file_copier.exe, from another host process with ShellExecuteEx and lpVerb = "runas" on Vista. It shows UAC dialog and runs elevated, and copies files to "dangerous" folders, but it does not overwrite existing files (exe's). I've read here: http://www.cod...

7
голосов
2ответов
2126 просмотров

Correct way to design around Windows UAC limitations?

I found out an application I wrote does not work properly under Windows Vista/7 if UAC is enabled at any level, because it writes files to the install directory of the program, defaults to "C:\Program Files\MyProgram." If UAC is disabled (or on any other version of Windows) it works properly - I ...

0
голосов
3ответов
718 просмотров

nsinstall: Bad file number error on Vista

I'm attempting to build Firefox on my Windows Vista Ultimate machine. I keep getting the following error: nsinstall: Bad file number I've read that this error is caused because of UAC in Vista. Here are the two articles that lead me to this conclusion. https://wiki.mozilla.org/Penelope_Deve...

1
голосов
1ответов
518 просмотров

UAC gives me fits!

The code I am currently working on runs on Windows Server 2003, but needs to be able to write to EventLogs on multiple machines. I am coding in C#, using VS2008 Pro, and .NET Framework 3.5. The code itself is relatively simple (thanks to the framework): using (EventLog remoteEvtLog = new EventL...

4
голосов
1ответов
672 просмотров

Inhibiting registry virtualization programmatically

In the context of a generalized .NET-based component, which can be hosted in a variety of scenarios - i.e., 64 bit or not, interactive process or not, I need to write to the registry in an area that's subject to UAC virtualisation. However, I want to prevent such access from being virtualized in ...

1
голосов
1ответов
1478 просмотров

Is it possible to lower the privilege level when calling CoCreateInstance on Vista?

Okay, I have a plugin for IE that when installed needs to (with the user's permission) restart IE. To do this I have a DLL that is invoked by the installer. And it works, but the problem is that when IE is restarted on Vista, it is restarted with the administrator privileges of the installer, wh...

0
голосов
2ответов
473 просмотров

Moved to Windows 7 (64) for development. What about UAC settings? [Windows Application]

For years Windows XP (32 bit)was my development desktop (personal projects). I develop many hobby projects and distribute it as open source and have never worried or bothered about checking it in Vista (I have used Vista only for a week). But none of my users have complained much about my apps in...

1
голосов
4ответов
17248 просмотров

Windows 7 file access permission question

I installed my application in Windows 7 and as part of the installation, it installs some text files. Now, if I open the text file in notepad and try to save it, I get an "Access denied" error. I'm logged in as administrator on the machine and the file is not marked read only and security permiss...

8
голосов
2ответов
8650 просмотров

Vista UAC - Trouble Mapping Network Drives

We have an application that programmatically maps network drives. On Vista with UAC on, we get some strange issues. Our application maps the drive non-elevated, so if the user browses explorer and double clicks to run an exe, it prompts for UAC. So when they approve it, it prompts for a usern...

77
голосов
9ответов
47017 просмотров

Detect if running as Administrator with or without elevated privileges?

I have an application that needs to detect whether or not it is running with elevated privileges or not. I currently have code set up like this: static bool IsAdministrator() { WindowsIdentity identity = WindowsIdentity.GetCurrent(); WindowsPrincipal principal = new WindowsPrincipal(ide...

3
голосов
1ответов
1089 просмотров

Show UAC prompt when launching an app

I have an app which needs administrator privileges to do some things. I'd like to just show the UAC prompt when it starts, and then be elevated. I'm not sure how to do this, but I'm hearing about things like manifests and whatnot but not seeing a plain answer anywhere.

1
голосов
1ответов
1312 просмотров

GetPrivateProfileString() Gives Access Denied Error on Vista

A GetPrivateProfileString() call works fine on Windows XP but fails with an Access Denied error when run on Vista. The call is being made inside a thread spawned by a Windows service which I wrote. The Windows service itself is run using the credentials of a user account on the local machine (t...

3
голосов
1ответов
2984 просмотров

CreateDesktop() with Vista UAC (C Windows)

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 y...

31
голосов
5ответов
11876 просмотров

How do you de-elevate privileges for a child process

I know how to launch a process with Admin privileges from a process using: proc.StartInfo.UseShellExecute = true; proc.StartInfo.Verb = "runas"; where proc is a System.Diagnostics.Process. But how does one do the opposite? If the process you're in is already elevated, how do you launch the...

0
голосов
1ответов
267 просмотров

Screen saver crashes if UAC is enabled

Does screen saver require any manifest file? I'm renaming the .exe to .scr file. Right now i am not using any manifest file for the screen saver. But if if UAC is enabled, my screen saver crashes. How to by pass this UAC thing ?

1
голосов
1ответов
716 просмотров

UAC Application Manifest when you don't know runtime application name

I have a program that works fine if UAC is turned off. I want to be able to use a manifest to have it simply request elevation privileges when it launches. The instructions from MS say "The application manifest file should have the same name as the target executable file with a .manifest extens...

0
голосов
1ответов
664 просмотров

Run with administrative permission issue

I am using Windows Vista and I find something strange, I programatically invoke IE to open IE to access some local html page, the current user belongs to administrator group; I programatically invoke IE with RunAs parameter, and let IE to access access some local html page, the current user b...