administrator

Run batch file as administrator on Jenkins?

流过昼夜 提交于 2019-12-03 17:17:52
问题 We're using Jenkins on Win8 x64 to build (msbuild), package (cspack), run (csrun) and test (nunit) an azure cloud services project. The Azure cloud service emulators need to run as administrator plus we need to bind to ports 80/443 (so can't use "lite" emulators). We're doing the above via a simple .bat file that Jenkins runs. Typically no user logs into the machine, it boots up and Jenkin's runs as a service that keeps monitoring our GIT repo and emails on failures. An admin manually logs

Forced the application to have the administrator privileges

心不动则不痛 提交于 2019-12-03 15:24:08
I need to give my application administrator rights, knowing that it will be run from a user session and not admin account. I've looked on other sites, but can't find anything that helps. I tried editing the manifest among other things and there have inserted the line: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> This gave me an error when trying to publish using ClickOnce, but not when I debug. Can you help me? first of all - indeed, it's not allowed by design, to install and ClickOnce app as admin: http://msdn.microsoft.com/en-us/library/142dbbz4(v=vs.90).aspx

Visual Studio Run as administrator shortcut

邮差的信 提交于 2019-12-03 09:41:56
how do I create a shortcut that runs Visual Studio with Administrator rights? Actually I have to navigate to the Visual Studio start menu folder, click on the icon with the right mous button and choose "Run as Administrator". Right-click on the shortcut, select Properties. On the Shortcut tab, click the Advanced button (bottom right). Check the Run As Administrator box. What I was looking for was a way of running Visual Studio Solution files (.sln) as Administrator . I just found a pretty good way of doing this... Place this content inside a file named RunAsAdministrator.reg : Windows Registry

Checking for Administrator user login in non-English installations of windows

会有一股神秘感。 提交于 2019-12-03 07:45:17
I have some small questions...I have a program that stores a list of users in a database and compares on program startup if the user is in the list or is an administrator before letting them use it. At the moment, the way I'm using to check if the user is an administrator is simply by comparing the username to a string constant called 'ADMINISTRATOR'. Will this work on a non-Engish system? I.E. does Windows use a language specific version of 'administrator'? Or maybe is there an enumerated version of the Admin user that I can use to check with instead of my 'ADMINISTRATOR' string? (you know,

Run batch file as administrator on Jenkins?

谁说我不能喝 提交于 2019-12-03 07:22:30
We're using Jenkins on Win8 x64 to build (msbuild), package (cspack), run (csrun) and test (nunit) an azure cloud services project. The Azure cloud service emulators need to run as administrator plus we need to bind to ports 80/443 (so can't use "lite" emulators). We're doing the above via a simple .bat file that Jenkins runs. Typically no user logs into the machine, it boots up and Jenkin's runs as a service that keeps monitoring our GIT repo and emails on failures. An admin manually logs into the machine just for maintenance (eg. apply patches or reboot machine etc) How do we configure

What does '__COMPAT_LAYER' actually do?

萝らか妹 提交于 2019-12-03 04:23:05
问题 Recently, i was trying to give my application administrator rights without system asking for "Do you want to give administrator rights?" and i found a way which is working perfectly. Solution I Found I created a bat file named nonadmin.bat and wrote the below code in it cmd min C set __COMPAT_LAYER=RunAsInvoker && start %1 and if we drag any exe on it, it gives them administrator rights (before it was not letting me access environment variables without it but after draging the file on bat it

Delphi Administrator rights D7 W7 [duplicate]

一个人想着一个人 提交于 2019-12-02 22:32:03
问题 This question already has answers here : Closed 8 years ago . This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 8 years ago . Possible Duplicate: Delphi: Prompt for UAC elevation when needed My application written in Delphi 7 for Windows 7 requires administrator privileges for some functionality. How can I elevate it to Administrator from source code? I check the user rights with this code: function IsUserAdmin : boolean; const CAdminSia :

What does '__COMPAT_LAYER' actually do?

▼魔方 西西 提交于 2019-12-02 17:37:35
Recently, i was trying to give my application administrator rights without system asking for "Do you want to give administrator rights?" and i found a way which is working perfectly. Solution I Found I created a bat file named nonadmin.bat and wrote the below code in it cmd min C set __COMPAT_LAYER=RunAsInvoker && start %1 and if we drag any exe on it, it gives them administrator rights (before it was not letting me access environment variables without it but after draging the file on bat it did work). Question Now my question is:- What actually '__COMPAT_LAYER' means and what does it do? How

Run a Powershell command as an Administrator - Commands themself won't load

假装没事ソ 提交于 2019-12-02 05:00:53
问题 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Diagnostics; namespace WindowsFormsApplication { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { var newProcessInfo = new System.Diagnostics.ProcessStartInfo(); newProcessInfo

Run a program as user identity but with elevated privileges

随声附和 提交于 2019-12-01 15:54:54
Scenario: An administrator will install the application. The application has some kernel level operations so, it has to run with privileged mode. But the user does not have administrator credentials to run the application in elevated mode. So, what are the best possibility to solve the above scenario. Solution one (tried): While installing the application through administrator, we would create an admin where we know his user name and password. So, when the user tries to perform any operation, we will run the application as elevated mode using the functions processstartinfo() and process.start(