administrator

Run Java file as Administrator with full privileges

我们两清 提交于 2019-11-26 19:46:55
I have made a Java Application and I tested it in my pc and my coined pc, so far so good... But this application is for another friend of mine that have a disco, when I "installed" my application on his pc (Windows Vista 32 bits) it didn't work, then i go searching and searching and I find out that the problem as the privileges... I installed a virtual machine of vista 32 bits and xp 32 bits to do some tests and I'm not able to run my application with full administrator privileges. Is there any way to create a batch file or something that would allow me to run my application with all

Admin rights for a single method

只谈情不闲聊 提交于 2019-11-26 19:21:44
Is it possible to require administrator rights for one single method? Something like this: [RequireAdminRightsForThisMethod()] private void TheMethod(){ // Do something } Dirk Vollmar You can add a PrincipalPermission attribute to your method to demand administrative privileges for its execution: [PrincipalPermission(SecurityAction.Demand, Role = @"BUILTIN\Administrators")] public void MyMethod() { } This is described in more detail in the following article: Security Principles and Local Admin Rights in C# .Net If you are looking for a way to elevate an already existing process I doubt that

Launching an administrative interactive process when a standard user is logged on

北城以北 提交于 2019-11-26 17:49:43
问题 I have a system service which creates a helper interactive process as administrator so that it can access some desktop-related resources, including the BlockInput() function and NVIDIA's NVAPI functions, which cannot be run from a service. When the logged on user was a member of Administrators, the following worked: Set privilege levels, including SE_TCB_NAME Get active session ID with WTSGetActiveConsoleSessionId() Get logged on user from session ID with WTSQueryUserToken()

C#.NET: Acquire administrator rights?

久未见 提交于 2019-11-26 16:03:06
问题 Is it possible in a C#.NET application to request administrative rights on a Windows 7 PC? I want to be able to deploy the application via Click Once and have users use it to perform administrative tasks (in this case it is writing registry entries for the main application). 回答1: http://victorhurdugaci.com/using-uac-with-c-part-1 http://victorhurdugaci.com/using-uac-with-c-part-2 http://victorhurdugaci.com/using-uac-with-c-part-3 *self promotion Extra characters because it must be 30 回答2:

Using python to open cmd and automatically enter a password

守給你的承諾、 提交于 2019-11-26 14:52:43
问题 I've managed to get the cmd being opened by python. However, using runas administrator comes with a password check before cmd.exe is executed. I'm using this to open cmd... import subprocess subprocess.call(["runas", "/user:Administrator", "cmd.exe"]) I'm looking for a way to automatically enter the password into the runas.exe prompt which opens when i run the code. Say if i were to create var = "test" and add it after import subprocess how would i make it so that this variable is passed to

Why does ping work without administrator privileges?

梦想与她 提交于 2019-11-26 14:44:35
问题 as you may know one is unable to create RAW sockets using Windows Sockets without having administrative priviliges. The problem is, that I need to send ICMP messages, thus I need RAW sockets. The Problem: My program needs to run without administrative privileges. That lead me to the question, how does the ping tool send ICMP messages w/o administrative privileges? 回答1: Although ICMP uses RAW sockets (which require admin rights on Win2K and later), Microsoft circumvents its own security rules

How do I set a Windows scheduled task to run in the background? [closed]

你离开我真会死。 提交于 2019-11-26 12:34:42
问题 Does anyone know how to set a scheduled task to run in background using Windows Task Scheduler? There doesn\'t seem to be any option to do this. 回答1: As noted by Mattias Nordqvist in the comments below, you can also select the radio button option "Run whether user is logged on or not" . When saving the task, you will be prompted once for the user password. bambams noted that this wouldn't grant System permissions to the process, and also seems to hide the command window. It's not an obvious

How do you request administrator permissions using NSIS?

纵然是瞬间 提交于 2019-11-26 11:14:55
问题 I am quite new with NSIS. I am trying to request administrator permissions in order to run the installer, as it messes around a bit with registries. My problem with \"RequestExecutionLevel\" and \"MULTIUSER_EXECUTIONLEVEL\" is that they both absolutely block any non-Admin user from opening the installer, even when selecting \"Run as Administrator\" in the context menu. I have tried using the RunAs DLL, but I have not found a single thread as to what to put in the $command variable passed to \

Run Java file as Administrator with full privileges

一曲冷凌霜 提交于 2019-11-26 08:59:32
问题 I have made a Java Application and I tested it in my pc and my coined pc, so far so good... But this application is for another friend of mine that have a disco, when I \"installed\" my application on his pc (Windows Vista 32 bits) it didn\'t work, then i go searching and searching and I find out that the problem as the privileges... I installed a virtual machine of vista 32 bits and xp 32 bits to do some tests and I\'m not able to run my application with full administrator privileges. Is

How to run vbs as administrator from vbs?

流过昼夜 提交于 2019-11-26 06:39:50
问题 Can anyone help me with running vbs from itself but with administrator rights? I need rename computer with Windows 8 via VBScript, but it\'s possible only if I run my script through administrator command line (CMD → Run as Administrator → runScript.vbs). If I start script with classic CMD the computer isn\'t renamed. My idea is I start script with user rights, without parameters and if there is no parameter, the script re-runs itself with admin rights and with parameter as identificator \"I\