0
votes
1answer
50 views

How to call a program to be run with admin privileges but under the same user (Windows Command Prompt)

I need to invoke a program with admin privileges from command prompt. it should prompt to the user an alert such as: I found many answers like: runas.exe /user:administrator %~dp0\MY_PROGRAM.BAT ...
0
votes
0answers
91 views

Runas weird functionality with command line

I have a .bat file I use to launch some programs. Some of them require elevated privileges (i.a. a devcon-based does-device-exist check), but some don't. So, I run the .bat as administrator, and use ...
2
votes
0answers
61 views

Windows command line runas with the builtin administrator disabled by default [duplicate]

On my laptop running Windows 8.1, I want to invoke a mklink command as admin, How could I run runas in an ordinary command line session? I tried Runas /user:administrator "mklink /d c:\doc ...
0
votes
0answers
41 views

Runas program as administrator [duplicate]

There is context menu entry on cmd, "Run as Administrator", that opens UAC window and launches cmd as Administrator. How can I open a program as Administrator in command line? I've read about runas ...
2
votes
3answers
4k views

runas - 1326: Logon failure: unknown user name or bad password

I tried to execute notepad from cmd using the following command- runas /noprofile /user:<username>@<ip> notepad Then I got this output where I was asked to enter my password Enter the ...
0
votes
2answers
2k views

Possible to continue runas /u:domain\admin cmd with followup commands in the new CMD window?

Possible to continue runas /u:domain\admin cmd with followup commands in the new CMD window? I tried this: (didn't work) Runas different user to launch CMD and run command What I want is to run msra ...
4
votes
2answers
8k views

Run as administrator from command line on Windows 8

I am trying to run Notepad as admin so I can edit my hosts file from the command line. I have tried runas /user:(myusername)\administrator "notepad c:\windows\system32\drivers\etc\hosts" I then input ...
5
votes
2answers
1k views

How to make a cmd 'runnable as administrator' under windows 7?

I have written as small .cmd file to be executed as an administrator. I am trying to set its options as 'Run as Administrator' but the check box is not accessible. Why? How to solve this issue? I ...
1
vote
1answer
2k views

windows runas command with elevated privileges, user in admin group

I have a windows 7 user who belongs to admin group. I want to execute sc command that requires admin privileges. I DON'T want to open an elevated cmd, want to be able to simply Win+R->Enter command, ...
3
votes
2answers
864 views

Command Prompt: Run as other user?

If I use the command runas and run a program as a different user on the domain will this actually return information regarding their computer or will it give me my comptuers information? for example ...
0
votes
1answer
3k views

Running 2 explorer.exe instances with the “RunAs” Command

I've created 2 batch files. The first called admin.bat with the lines: @echo off cls runas /env /user:ADOMAIN\Administrator "\\path\dir\explorer.bat" and the other called explorer.bat with the ...
4
votes
3answers
27k views

Command line argument for running as another user on Windows?

Under windows .msi installer, if you specify a custom action to be run at an application's installation time, it will get run under the "SYSTEM" user. Can I trick it by passing a command line ...
15
votes
6answers
37k views

Windows 7 Administrator Command Prompt “Start in” Path

So, I know you can create a shortcut to an administrator-level command prompt (as described in this question), but what I'm seeing is that whenever I use such a shortcut, it always drops me into ...