Skip to main content

All Questions

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 ...
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 (...
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:...
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.
0 votes
2 answers
8k views

Windows 7 Command Line Add Group "Users" To File

I need to change permissions on a file/folder through the command line. I can do this manually by: Right-click on any file/folder Properties Security (tab) Edit... Add... Enter the object names to ...
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 ...
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 ...
0 votes
0 answers
1k views

How to set 'Authenticated Users' permissions on a given file via scripting on Win 7 +

I have this script file which is currently doing setting the 'Authenticated Users' permissions for an executable to 'ReadAndExecute' - it works fine on Windows 10, but it needs to work on Windows 7 - ...
0 votes
1 answer
2k views

Files can still be modified even after setting ''Read-only'' permission by ICACLS. Why is it not working?

I am the administrator in my PC and there are some other users on it. I set a folder (Gabi) as "Read only" for a specific user (Alice), using ICACLS via the Command Prompt (I am using ...
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++...
0 votes
1 answer
785 views

Syncing time on two networked machines

I'm trying to sync the clocks on a Windows 7 (A) and a Windows 8.1 (B) computer on their own, private network by using the command (cmd on computerA): net time \\computerB /set /y As I expect, this ...
-2 votes
1 answer
52 views

Windows 7 professional.32 bit

I am trying to change directory on my command line in my C drive. I am trying to access python25 folder at C:/Python25/ but every time I write cd> C:/Python25/ and press enter, cmd returns Access is ...
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 ...
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 ...
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 ...

15 30 50 per page