EzDevInfo.com

runas interview questions

Top runas frequently asked interview questions

is there a "run as" in Windows 7?

I have issue with user without local admin who want to install font on their PC call me everyday. The thing is there is no run as, like in windows XP.I don't want to logoff user session and go into local admin account to install font, their would losing productivity and losing my time to do it.


Source: (StackOverflow)

How to open Command Prompt in a specific folder as Administrator?

I made a shortcut to cmd.exe and specified the folder that I want to start in. I then went to Advanced and ticked Run as administrator.

When I double-click on the shortcut, it always starts in C:\Windows\System32.

What I am missing? How can I get the command line to start in the folder specified?

shortcut properties

the prompt, in System32


Source: (StackOverflow)

Advertisements

"Run as" for a .bat file

I'd like to run a .bat file as a different user to troubleshoot a rights problem which I suspect.

For normal .exe files, you can Shift-right-click to get "Run as...". However, for a .bat file, this does not work (Shift-right-click gives no menu entry "Run as..."). Why is that so, and how can I "Run as" a .bat file? Is it possible at all?

System is Windows XP SP2 Home Edition.


Source: (StackOverflow)

Run task manager as another user (admin)

Is it possible to run the Windows Task Manager as another user, i.e. as an admin? Our users run with limited privileges, so it would be helpful if I could task manager as an administrator to kill a process if needed.


Source: (StackOverflow)

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 c:\windows\system32\ path.

I've tried specifying that shortcut's properties to set the "start in" path I need, but to no avail. It seems any time I run cmd.exe "As Administrator," it completely disregards the shortcut's paths and sticks to c:\windows\system32\

Any suggestions on how to get Windows 7 to respect the shortcut's "start in" path?


Source: (StackOverflow)

Use runas with a domain account on a non-domain machine in Windows 2k/XP/Vista/7

My Windows 7 computer is on LAN in an intranet with a Windows domain, but it is not a member of that domain. However, I need to run some applications under domain accounts while I'm logged on locally as a local admin.

I know you can use the runas utility to start processes under accounts different from the one under which you have logged on. The thing is that Windows needs to know or authenticate the account under which a process is starting.

When I do something like:

runas /user:DOMAIN\USERNAME cmd.exe

(and put in a correct password afterwards) I get this kind of error:

RUNAS ERROR: Unable to run - cmd.exe
1326: Logon failure: unknown user name or bad password.

Does anybody know how to cope with this?


Source: (StackOverflow)

Run as a different user on a shortcut

How do I run as a different user on a shortcut in Windows 7?

On Windows XP, I had the ability to mark a shortcut as being run by a different user, so that every time I ran it it would prompt me for a username/password. This let me have two shortcuts for things like SQL Server Management Studio, one for my normal account and one for my domain administrator account which has access to production servers.

I can get to the 'Run as different user' option with Shift + right-click, but I can't see an option anywhere that would let me mark the shortcut as doing this every time.


Source: (StackOverflow)

Runas Windows Explorer in Windows 7

I'm having a strange issue with Windows Explorer on Windows 7 Professional.

When I try to open it up under different user credentials, I get the following error message:

Windows Cannot access the specified device,path...

The results are the same whether I try it from the context menu or by using runas /user:DOMAIN\User explorer.exe

However, if I open up a Command Prompt (using runas.exe) the behavior is a bit different:

  • Typing in just explorer or explorer.exe results in the same error.
  • Typing in explorer C: or explorer /E,... doesn't run anything. I'm dropped right back to the prompt. The Explorer process doesn't start.

Has anyone seen this behavior before? If so, how can I go about changing it?


Source: (StackOverflow)

How do I add a password to a batch file to automatically authenticate?

I'm trying to run xcopy commands in a batch file as an administrator. Is this the correct command and how can I pass the password into it?

runas /noprofile /user:Domain Name\user account

Source: (StackOverflow)

Automatically run an application as another user

How can you run an application as another user in Windows 7? The only catch is that I don't want to have to hold down the shift key, right click on the application and choose Run as different user. I need it to automatically login using the login credentials I specify.


Source: (StackOverflow)

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 parameter to the custom action (.exe file) and make it run under the currently logged on user?


Source: (StackOverflow)

How to prompt a user for run-as credentials when double-clicking an icon?

I am running a kiosk type system where the user has almost zero permissions.

I want to place an icon on their desktop that would run a specific program as their Active Directory credentials. I am familiar with SysInternals ShellRunAs, but it would require a right-click which means retraining users.

Could I accomplish this by having them double-click on the icon that they normally would and they would get a prompt for username/password and then execute the program as that?


Source: (StackOverflow)

Why is the "Run as Administrator" checkbox disabled?

I have a .bat file that cannot allow me to set it to run as admin as required by going to the Properties box and check for Privilege checkbox.

But mine is disabled as below snapshot.

What can I do to get it enabled?

enter image description here


Source: (StackOverflow)

How can I run something as Administrator via Cygwin's SSH?

I'm trying to connect to a remote Windows 7 box that needs a setup change or two. I've got access to an Administrator account via Cygwin's SSH server, but Cygwin won't let me run Administrator-privilege utilities ("The requested operation requires elevation (Run as administrator.)")

The standard solution for this is, to the best of my knowledge, RunAs.exe, but trying to run it via SSH results in it quitting instantly with no diagnostic (even when run as "runas /?"). Starting "cmd" from ssh gives me a standard DOS prompt, but from the DOS prompt, "runas" just echoes the commandline back at me no matter what I do, again, even when run as "runas /?".

Cygwin won't let me connect as Administrator@computername.

Any suggestions?


Source: (StackOverflow)

Starting Internet Explorer as a different user

My machine is a 'server workstation' running Windows Server 2003 connected to a domain. I have created a local user called StandardUser.

I'm trying to run Internet Explorer 8 as this user by right-clicking on iexplore.exe in Windows Explorer but nothing happens. No processes containing the user's name appear in Task Manager (and it is set to show processes from all users). I've also checked that the Secondary Logon service is running although I'm not sure if there are any others required.

At the command line I've tried:

runas.exe /u:StandardUser "C:\Program Files\Internet Explorer\iexplore.exe"

and get

Attempting to start C:\Program Files\Internet Explorer\iexplore.exe as user "COMPUTERNAME\StandardUser" ...

but then the command prompt just returns and still nothing.

Any ideas?

Update: Yes I am being asked for a password. Also I am running as local administrator on the machine because I'm a developer and need to run as local admin for Visual Studio, plus that's the way my company set the machine up.


Source: (StackOverflow)