Questions tagged [runas]

runas is a Windows command which allows a user to run a specific program under the credentials of another user.

322 questions
98
votes
5 answers

How do I 'run as' 'Network Service'?

I am trying to run a process as another account. I have the command: runas "/user:WIN-CLR8YU96CL5\network service" "abwsx1.exe" but then this asks for the password. However there is no password set for the network service. Is what I am trying to do…
Exitos
  • 29,230
  • 38
  • 123
  • 178
84
votes
8 answers

Running PowerShell as another user, and launching a script

I won't get into all the details of why I need this, but users must be able to launch PowerShell as a service account and when PowerShell loads it needs to run a script. I already can launch PowerShell with the stored credentials (stored as a secure…
Little King
  • 1,030
  • 1
  • 8
  • 14
67
votes
8 answers

What precisely does 'Run as administrator' do?

On Windows 7, I have a command-line program that fails due to file write permission errors, and popping up annoying UAC dialogs every time I run command-line programs that are from an 'unknown publisher'. However, if I start my console by right…
Jonathan Hartley
  • 15,462
  • 9
  • 79
  • 80
40
votes
1 answer

How to complete the RUNAS command in one line

This Stack Overflow question suggests a command which looks as if it should work, but it doesn't (that answer is deleted now, though): Single line command for Run as a different user on Window 7 that contains a password also The command would…
Accendi
  • 627
  • 1
  • 7
  • 15
32
votes
7 answers

How to set "Run this program as an administrator" programmatically

I'm having a problem with good ol' bdeadmin.exe in Vista. First, let's get the predictable responses out of the way: "You should not require your application to be elevated." This one does. C'est la vie. "You need to embed a manifest file." It is…
Patrick
  • 1,766
  • 1
  • 15
  • 27
31
votes
1 answer

Run process as administrator from a non-admin application

From an application that is not being run as administrator, I have the following code: ProcessStartInfo proc = new ProcessStartInfo(); proc.WindowStyle = ProcessWindowStyle.Normal; proc.FileName = myExePath; proc.CreateNoWindow =…
jkh
  • 3,618
  • 8
  • 38
  • 66
28
votes
7 answers

How to build RUNAS /NETONLY functionality into a (C#/.NET/WinForms) program?

Our workstations are not members of the domain our SQL Server is on. (They're not actually on a domain at all - don't ask). When we use SSMS or anything to connect to the SQL Server, we use RUNAS /NETONLY with DOMAIN\user. Then we type in the…
Cade Roux
  • 88,164
  • 40
  • 182
  • 265
28
votes
6 answers

Visual Studio Run as administrator shortcut

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".
Lorenzo
  • 29,081
  • 49
  • 125
  • 222
26
votes
2 answers

SQL Server Management Studio 2008 Runas user on different domain over VPN

I am currently trying to run SQL Server Management Studio 2008 as a user who is on a different domain. I noticed in other threads that running the following command from a batch script will do this however it doesn't seem to work for me. runas…
maple_shaft
  • 10,435
  • 6
  • 46
  • 74
25
votes
4 answers

Run Java file as Administrator with full privileges

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,…
João Silva
  • 531
  • 4
  • 21
  • 40
20
votes
3 answers

How do I make a console app always run as an administrator?

I have a console application that was developed to be called by a erp software. They call my app inside the erp and when they do it, i always get errors related to the insufficient permission to do it. I have checked the "run this program as an…
Marco
  • 235
  • 1
  • 2
  • 8
20
votes
12 answers

Batch Script to Run as Administrator

I'm writing a client/server checking program but it needs to run as Administrator. I want this to run silently on my network and users, and I don't want the "Run as" Administrator" prompt. Is there any beginning code that I can place into the batch…
Frustrated Python Coder
  • 1,503
  • 3
  • 15
  • 15
19
votes
2 answers

How can I make the installer Run as admin

My application has an installer built in installshield. But for proper working of installation process in vista Win 7 etc. the installer should be run as administrator. (Even though the user has admin previlege he should select the 'Run as…
JijeshKV
  • 670
  • 2
  • 7
  • 26
19
votes
3 answers

Runas Error: Unable to Acquire Password

I'm trying to start visual studio 2010 from command prompt using 'RUNAS' so that I can run it as a different user. I ran the following command: runas /profile /user:myPCName/SomeUserName "C:\Program Files (x86)\Microsoft Visual Studio…
John Fischer
  • 1,115
  • 3
  • 13
  • 24
14
votes
1 answer

How do you request administrator permissions using NSIS?

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…
Amit Dvir
  • 337
  • 1
  • 3
  • 9
1
2 3
21 22