uac

Execute several elevated commands in shell (or similar)

随声附和 提交于 2019-12-11 20:56:49
问题 I have a requirement to execute several commands with elevated rights, something like: call program that modifies a .config file of a service (needs admin rights) net stop myservice (needs admin rights) net start myservice (needs admin rights) All of this dynamic, e. g. the first line could contain proxy settings, including user name and password, or any other modification to the settings file. (Settings file is in program folder, program to modify the settings file is externally provided.

How change attributes to UAC?

我与影子孤独终老i 提交于 2019-12-11 14:17:18
问题 I need change of properties of windows User Account Control. (Program Name, File Origin, Verified Publisher) Is This Possible? 回答1: You have to digitally sign your application. Before digitally signing: After digitally signing: Yes, it means you'll have to buy a digital signing certificate. 来源: https://stackoverflow.com/questions/20059210/how-change-attributes-to-uac

Change the program name of exe on UAC

寵の児 提交于 2019-12-11 13:49:48
问题 I have an exe which when tried to run as administrator shows the program name as TestSampleConsoleSign.exe. Its a simple console application with hello world in it. namespace TestSampleConsoleSign { class Program { static void Main(string[] args) { Console.WriteLine("Hello World"); Console.ReadLine(); } } } I have also changed the AssemblyTitle field in AssemblyInfo.cs to HelloWorld. But when UAC is enabled the program name still shows as TestSampleConsoleSign.exe instead of HelloWorld. I

Security Exception while use FileSystemObject in C#

拈花ヽ惹草 提交于 2019-12-11 13:39:17
问题 I want to write a fast disk usage detect program, and found that FileSystemObject is the fastest way to do this. And FileSystemObject is in COM -> Microsoft Scripting Runtime . All the code is simple, and I parsed here. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DiskUsage { class Program { const string FolderPath = @"C:\Windows\System32"; static void Main(string[] args) { var startTime = DateTime.Now; Scripting

Install msi with msiexec and c#

偶尔善良 提交于 2019-12-11 13:04:34
问题 What is the best way to install a .msi in a c# application in silent mode. I want to install a .msi file using msiexec, but I don't know how to do this. The problem is for using msiexec with /qn, you have to run it in a cmd.exe process start "as a administrator" and I don't know how to accomplish something similar with a c# application (for more details, a wpf project in VS 2010). The best I come to is : Process p = new Process(); p.StartInfo.FileName = "runas.exe"; p.StartInfo.Arguments = "

How do I request UAC administrative privileges with a JavaFX desktop application bundle?

拥有回忆 提交于 2019-12-11 12:26:26
问题 I need to elevate the permissions of a JavaFX desktop application. Not the .jnlp or the web version. This program will be deployed to desktops so <fx:deploy ... > <fx:application ... /><fx:resources> ... </fx:resources> <fx:preferences ... /> <fx:info ... /><fx:permissions elevated = "true"/> <!--THIS DOESN'T WORK!!!--> </fx:deploy> won't work. I can get the program to run fine in my IDE, and when I deploy and set the properties of the application shortcut to run the program as administrator

Windows 7 - Eclipse now needs me to run as administrator

让人想犯罪 __ 提交于 2019-12-11 12:11:54
问题 I installed Eclipse (Kepler) on this W7 64-bit machine and initially I could run it "normally" by just clicking the desktop icon or whatever. Then I replaced the whole "workspace" directory with one from another machine (because I'm changing systems). Now if I run Eclipse not "as administrator" it opens and will even run apps... but nothing can be saved, including changes to files and updates to the .metadata of any kind. I changed all the "ownership" and "permissions" which could possibly be

UAC and remote control

不羁岁月 提交于 2019-12-11 07:45:36
问题 If you've developed a remote control application as I've done, you must know that screen capture doesn't capture the UAC dialog when that dialog is pop up, and as a result the control can't be continued. Anybody know a solution to this? 回答1: From what I understand, I believe what you're asking about is possible. In addition to remote control software, test automation software and accessibility apps for those with disabilities also need a way to interact with protected UI and the secure

add manifest to compiled exe file from jar

可紊 提交于 2019-12-11 05:28:37
问题 I've a runnable MyApp.jar which I compiled to MyApp.exe by using launch4j and because this app need administrator permissions I try to add manifest file to it by following this article : http://msdn.microsoft.com/en-us/library/bb756929.aspx When I perform mt.exe –manifest manifest.xml –outputresource:MyApp.exe;#1 the process completed without errors but MyApp.exe file reduces its size from 6mb to 32kb only and when I try to run it I got the following error: Error: Invalid or corrupt jarfile.

Why does Windows UAC icon appear for my program on some PCs but not others?

六月ゝ 毕业季﹏ 提交于 2019-12-11 03:04:28
问题 I have recently noticed that an application we have developed has the windows UAC icon next to it on some of our customers' PCs but not ours. Is there any reason why this might happen? The reason I noticed this is that the customer claims that the software has suddenly stopped working, and when inspecting their PC I noticed that the UAC 'shield' is on our application's icon - I've never seen this before and it certainly isn't there when I install it on my PC, so I'm wondering if any changes