uac

How to design autostart application that runs as admin on Windows Vista/7?

强颜欢笑 提交于 2019-12-19 10:26:12
问题 I have the need for my application to start and stop Windows Services based on certain events. The thing is that this application needs to run as an elevated normal user (In order to stop services), as well as auto start when Windows starts. Additionally, it need to be in the systray with an user interface. What are my options here? I suppose that there are at least two possibillities: To make the application auto start by putting it in the Startup folder or in the ..\Run key in the registry.

Is there a shared folder in Windows to which non-elevated users have write access?

戏子无情 提交于 2019-12-19 06:30:35
问题 I know that commonappdata (All Users) can hold system-wide application settings, but under Vista/7 non-elevated users can't write to that directory. Is there a folder which is shared among users and any non-admin user can write to it? Here is why I need this: My app is installed in PF directory by an Inno Setup installer with elevated rights. Then when the actual non-admin user runs the program, it copies its settings to the user's AppData directory using another non-elevated Inno Setup

java getRuntime().exec an exe that requires UAC

我与影子孤独终老i 提交于 2019-12-19 04:55:51
问题 So we have a java process that runs as a windows service. It needs to execute a command with Runtime.getRuntime().exec(command) . The command it executes requires UAC. This is on windows server 2008 and sounds like you cannot disable UAC for a single executable so is there any other way to make this work? 回答1: If your Java application runs as a windows service, it most likely runs under one of the system accounts: SYSTEM (most probable), LOCAL SERVICE, or NETWORK SERVICE. Thus if the service

WindowsError: [Error 740] The requested operation requires elevation even after disabling UAC

倖福魔咒の 提交于 2019-12-19 04:23:23
问题 I have disabled UAC and running my script in python. command = "abcd.exe" subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate() Also, I set the application abcd.exe from its property to run as admin. Then I'm getting the following error: WindowsError: [Error 740] The requested operation requires elevation 回答1: You could try using: subprocess.call(["abcd.exe"], shell=True) Basically the important part here is shell=True ; if set to False , then you will get the

What are the differences between “Run as administrator” and a manifest with requireAdministrator?

為{幸葍}努か 提交于 2019-12-19 04:08:17
问题 I've written a program with a manifest that includes requireAdministrator. On Windows 7 systems with UAC enabled, Windows pops up a dialog asking for permissions, as it should. Works great. If a user starts my program by right-clicking it and choosing "Run as administrator", then Windows 7 also pops up a dialog asking for permissions. However, there are some slight differences in how my program operates in some of the more esoteric parts of my program. So what are the differences between "Run

Run Java application as administrator on Windows

☆樱花仙子☆ 提交于 2019-12-19 03:25:13
问题 I am writing an installer in Java that will accordingly require elevated privileges to access the Program Files directory. Based on information that I've found online, I've written an implementation as follows: public static void main(String args[]) { if (!checkPrivileges()) { // spawn a copy w/ elevated privileges Runtime runtime = Runtime.getRuntime(); try { Process p = runtime.exec( "runas /profile /user:Administrator \"java -cp . main.Main\""); } catch (IOException e) { ... } } else { //

Developing Apps with Administrator Rights in Delphi

隐身守侯 提交于 2019-12-19 02:27:13
问题 I'm using D2010 under Windows 7 to write an app that seems to require admin rights (I think because it uses COM to communicate with a third party .exe, which also requires admin rights). I've added the manifest resource as required, but when I try to debug the app from the IDE, it reports "Unable to create process. The requested operation requires elevation" ...and it won't run. If I run Delphi as administrator, then my app runs correctly, but this feels like a dangerous brute force approach,

How to use ServerManager to read IIS sites, not IIS express, from class library OR how do elevated processes handle class libraries?

孤街浪徒 提交于 2019-12-18 11:01:29
问题 I have some utility methods that uses Microsoft.Web.Administration.ServerManager that I've been having some issues with. Use the following dead simple code for illustration purposes. using(var mgr = new ServerManager()) { foreach(var site in mgr.Sites) { Console.WriteLine(site.Name); } } If I put that code directly in a console application and run it, it will get and list the IIS express websites. If I run that app from an elevated command prompt, it will list the IIS7 websites. A little

How to run another app as administrator on Windows XP

邮差的信 提交于 2019-12-18 06:16:13
问题 I used the application manifest file as described here to have a part of my application running with elevated privileges (which it needs). So when needed, the main program just invokes a small assembly using Process.Start which then handles the task for which admin rights are required. However, how can I do the same thing on Windows XP? It seems XP just ignores this manifest and runs the small assembly in the current user context. 回答1: The following code from here does just what I need:

Running a PowerShell script as administrator without typing in passwords

南楼画角 提交于 2019-12-18 05:23:14
问题 I wrote a script that will switch between having a computer connect via Wi-Fi or wired Internet simply by running a batch file. I wrote this because I don't like having to type in my username and password to switch between the two every time. NOTE: I HAVE to have UAC enabled so unfortunately just turning it off isn't an option. It looks at the status of the wireless adapter. If it is currently enabled, it will turn off the wireless adapter and enable the wired adapter. If the wireless is not