uac

Elevated process in Vista does not overwrite files

Hello! 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.codeproject.com/KB/vista-security/UAC...

Java: run as administrator

Is there a way in Java to ask the system get control over the system. Without doing: Right click on an 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 from the jar? ...

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

I asked this in http://stackoverflow.com/questions/1188396/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...

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 problem. The downloaded sfx archive has th...

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 application to perform those operations as an admini...

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 resides in the UAC permissions, but I don't unde...

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 elevate properly sounds pretty messy, fra...

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

Hi, 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 Windows 7 (and Vista too, I'm assuming, ...

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 something that causes a UAC prompt - usually thi...

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 under Vista, an orange UAC dialog is shown...

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 administration rights at launch. Here's my ma...

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

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 write code in the main() function which d...

VB.NET with the UAC

I have an application that sends keystrokes to the computer using sendkeys. This works fine when the user is logged in. However, if a UAC window is open or the user is on the Windows Login screen , the sendkeys doesn't work. My understanding is that the UIPI requires code signing of my application. Can anyone provide me with a complete h...

"An unidentified program wants to access your computer" in vista

How to show the publisher's name instead of "An unidentified program wants to access your computer" in vista? ...

"An unidentified program wants to access your computer" in vista

How to obtain code sign certificate and how to sign the program with it? Any amount will pay for it? or without paying dollars how to get signing? ...

Showing the UAC prompt in PowerShell if the action requires elevation

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

Program Compatibility Assistant thinks my app is an installer

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

Elevating a process to run as admin doesn't work

Elevating a process to run as admin doesn't work. If I run that application from an elevated command prompt it runs fine. But my code below doesn't. Process setupws = new Process(); setupws.StartInfo.FileName = @"setupws.exe"; setupws.StartInfo.Verb = "runas"; setupws.StartInfo.UseShellExecute = true; setupws.Start(); setupws.WaitForEx...

Publisher name does not appear on the UAC dialog

I've signed my .msi with this command line: signtool.exe sign /f mycert.pfx /p /t http://timestamp.verisign.com/scripts/timstamp.dll /d "MSIName.msi" /v "MSIName.msi". The 'Digital Signature' tab is displayed on the .msi properties dialog and contains the right information but when the UAC dialog appears the 'Publish Name' is still ...