Skip to main content

All Questions

114 votes
14 answers
259k views

How can I always run the command prompt as administrator?

As a developer, I often have the need to open a command prompt for various purposes. For example, I use iisreset to restart my local web server. I typically open the command window in one of two ways:...
Kevin's user avatar
  • 1,623
24 votes
5 answers
128k views

How to display/change the owner of a file on Windows 7

Is there a way to display the owner of folders and files from the command line in Windoews 7 command prompt? Can you change the owner of a folder or file to some "arbitrary" user which is not your ...
Kevin Fegan's user avatar
  • 4,887
22 votes
6 answers
205k views

Change Windows 7 file permissions from command prompt

How can I change Windows 7 file permissions using the command prompt? I want to change permissions in program files, but cacls is not working for me.
sam's user avatar
  • 1,027
13 votes
3 answers
44k views

Command line option to open program as administrator in Windows 7

If I want to open Notepad and edit the hosts file, I have to invoke the Start menu, find the Notepad shortcut, right click and run as administrator, then open the hosts file in Notepad in order to ...
Stan's user avatar
  • 7,225
9 votes
6 answers
28k views

Restoring 'TrustedInstaller' as owner for executable in Windows folder

After changing the ownership of executables in the Windows directory (explorer.exe, regedit.exe, etc.), I can't seem to change it back to TrustedInstaller using icacls.exe. Using the GUI method (...
BarCo's user avatar
  • 121
5 votes
6 answers
52k views

Is it possible to shutdown a remote computer running Windows 7 via Telnet?

I've successfully connected to my Windows 7 desktop over wifi via Telnet from an XP Home netbook. To login, I use the following command: telnet -l "win7desktop\win7user" win7desktop win7user in this ...
Ryan Shripat's user avatar
  • 1,009
5 votes
2 answers
87k views

giving permission to program to run with out confirmation in start command windows

I am using this start /b C:\wamp\wampmanager.exe command to start a program in my windows( Windows 7 Ultimate - 64 bit). But then the program want a permission to run Do you want to allow the ...
Saif's user avatar
  • 225
3 votes
1 answer
2k 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 ...
elady's user avatar
  • 323
3 votes
2 answers
200 views

In Windows 7 Pro, is it safe to set the "Current owner" to "Administrators ([Name]-PC\Administrators)" of the whole C drive ...?

In Windows 7 Professional, is it safe, within the Advanced Security Settings of the C drive, to set the "Current owner" to "Administrators ([Name]-PC\Administrators)" of the whole drive including "...
Elise Dana's user avatar
2 votes
2 answers
7k views

Bypassing User Account Control [duplicate]

I'm trying to start an exe from the command line shell> wampmanager When I do that, a User Account Control popup pops up and prompts me for permission. I press "yes" to run and it runs. But is it ...
George Newton's user avatar
2 votes
2 answers
9k views

Administrator getting "access denied" - unable to create directory

As far as I can tell, I am in the Administrators group on Windows 7 Service Pack 1. With CMD prompt pinned to my Start menu, I rightmouse and select Run as Admin and get this error on xcopy: C:\&...
John Adams's user avatar
2 votes
1 answer
4k views

Change registry permission of 3 keys does not work with regini

I'm preparing a batch script that should help me to remove 3 keys from the registry. Unfortunately nobody has permission to edit the keys, except for TrustedInstaller. To execute my reg file that ...
Martin Braun's user avatar
1 vote
2 answers
1k views

Creating a C++ executable locks the file for some time

I have an error which started showing up only a few days ago. I'm running Windows 7 Professional x64 bit. I have a .cpp file, and I use the command prompt to run the following command: g++ -std=c++...
Cerberus's user avatar
  • 233
0 votes
2 answers
687 views

matching dir /a:r and icacls

I am trying to see file permissions on command line. I came across a similar question but cannot understand icacls output. In the following example, c10.dat is a read-only file, as shown by dir /a:r ...
Miserable Variable's user avatar
0 votes
1 answer
2k views

Trouble deleting registry using CMD

I am trying to delete the following registry key via CMD but am getting "ACCESS DENIED" HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Pastel The above registry cannot be deleted manually as it ...
LEO's user avatar
  • 33

15 30 50 per page