runas is a Windows command which allows a user to run a specific program under the credentials of another user.
Questions tagged [runas]
322 questions
0
votes
1 answer
RunAs username from variable
I am writing a script to run IE as a different user. At the beginning script displays Input, and I would like to use value from input as a username.
Option explicit
Dim Input, europe
Input = InputBox("Please type mailbox name")
europe = "EUROPE\"…

Morlas
- 121
- 1
- 8
0
votes
1 answer
cannot make sqlcmd work after runas
I followed a few examples here, but I still can not get my sqlcmd work after runas.
I can make it work with two steps:
Step one: Use runas to login into a new login and open a command prompt:
runas.exe /savecred /user:DOMAIN_NAME\login_name…

dave
- 296
- 1
- 12
- 26
0
votes
1 answer
connect compmgmnt.msc to remote host using c#
how can i use compmgmnt.msc to remote host using c#.
i found this...
execute this command in "cmd.exe" it is working and ask you for The password:
/user:administrator \"mmc.exe compmgmt.msc /computer:IZADI-PC\
but i need to know how can i use this…

MAYSAM GAMINI
- 49
- 1
- 3
- 11
0
votes
1 answer
Run administrative process in Windows7 (C#)
I need to (on user demand) run an admin process several times from my app.
I would like for users to enter admin credentials only once - so I would have to somehow store the credentials.
However I heard it's not possible to do this because of the…

Maciej
- 10,423
- 17
- 64
- 97
0
votes
1 answer
Batch File… running as administrator
I successfully created a batch file to flush my DNS…
I have added a pause, I noticed in the title bar of the console window… It's not running as administrator.
I've already tried a couple of variations of this… Just a little guidance would be most…

WidmarkRob
- 11
- 1
- 3
0
votes
0 answers
RunAsDate app for Windows Mobile 5?
There is a handy app called RunaAsDate for Windows O/S, but I couldn't find such an app for Windows Mobile 5. I need it to extend the trial version of an app called SprintDB Pro 4, because it seems that SprintDB is out of business and no longer…

Nathaniel_613
- 189
- 3
- 14
- 39
0
votes
2 answers
Run file as admin using vb.net
Possible Duplicate:
start batch file from within vb.net as admin
I have created an application. I need to start a program using vb.net as administrator.
I know you can use runas and I did this a couple of days ago but I really cant remember the…

user1244772
- 294
- 4
- 9
- 22
0
votes
1 answer
Defining connection string using windows authentication across domains to access SQL server
I have problems defining the connection string in a windows service application. The SQL server and windows service are on different domains, and thats the problem. However, i know this is possible, because when using runas.exe in the terminal with…

Zeezer
- 1,503
- 2
- 18
- 33
0
votes
3 answers
C#: Start process as the "real" administrator with hard coded privileges
I need to install different setups silently with administrator privileges.
I have to hard code the privileges because the users don´t know username and password to install the setups themselfes.
I have tried two different…

timmkrause
- 3,367
- 4
- 32
- 59
0
votes
3 answers
Auto Launch application after Installation in default user (not in SYSTEM user)
I have created a Simple Windows Application, and its Installer too (Setup project).
Since I want to AutoLaunch the Application after Installation, I added this script in Installer.cs
public override void Commit(System.Collections.IDictionary…

Sreekumar P
- 5,900
- 11
- 57
- 82
0
votes
1 answer
How can I write to a program after executing it in a .bat file?
I need to build a bat file to run the Runas command.
Here is my command
Runas /user:Administrator "psexec \\\\***.***.***.*** -accepteula -i -u **** -p **** \"C:\\Program Files\\****\\setup.bat\""
When this is ran I am prompt for the password in…

Patrick Lorio
- 5,520
- 11
- 45
- 74
-1
votes
1 answer
Delphi Shellexcute and windows run as option
My computer is a part of company domain,
I want to use the ShellApi's shellexcute function to run windows files with a given username and password (run as like), is it possible to include them in the function's parameters?

Raul
- 656
- 5
- 17
-1
votes
1 answer
Access denied when using runas on Windows Server 2022
This is something I encountered after upgrading our servers from 2016/2019 to 2022:
When I tried to open our Active Directory with another user, it would always deny the access even though the user has full admin rights.
I do not know what exactly…

SikorskyS60
- 160
- 14
-1
votes
1 answer
CMD Command doesn't execute
I'm trying to run this command in cmd from c# but for some reason it doesn't work. But when I change my Argument to "/C ipconfig" it work perfectly. I don't understand why. What am I doing wrong?
Here is my code:
Process process = new Process();
…

Red hood
- 29
- 1
- 1
- 7
-1
votes
1 answer
Unable to use the "runas" verb on programs requiring UAC
I have the following C code that should run the default Windows program changepk.exe with an UAC prompt
ShellExecute(NULL, "runas", "C:\\Windows\\System32\\changepk.exe", 0, 0, SW_SHOWNORMAL);
(Side note that the output of the ShellExecute is…

Vilius Povilaika
- 111
- 7