Possible Duplicate:
How do I replace Notepad in Windows 7?

I'm trying to replace notepad.exe with notepad2.exe, but I'm getting UAC permission issues when I try to open a file with the replacement notepad2.exe. I have to open notepad2.exe as admin.

How can I perform a windows 7 equivalent of the linux chmod 777 on the file?

link|improve this question

78% accept rate
3  
this is not a duplicate of superuser.com/questions/792/…. this question is about chmod 777 equivalent. the other is about replacing notepad. – lesmana Apr 20 '11 at 22:45
A duplicate of which question? – richard Jan 23 at 16:15
feedback

closed as exact duplicate by Joey, Sathya, random Jul 14 '10 at 0:39

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

3 Answers

up vote 5 down vote accepted

Using cacls you can do this same type thing, example.

cacls myfile.txt /g everyone:f
link|improve this answer
Note that explicit deny entries can override this. – Joey Jul 13 '10 at 13:40
2  
Good point, replacing the /g with /p will take care of this. – David Remy Jul 13 '10 at 13:45
That worked! Thanks! – Ross Rogers Jul 13 '10 at 16:17
feedback

Roughly:

icacls notepad.exe /grant Everyone:F

Note that this isn't exactly the same as deny ACL entries override allow entries, so if there are any deny ones you may need to remove them.

Generally, I honestly have to question the motives of what you are attempting to do. There should never be a reason to replace core operating system files with other ones.

You can easily associate text files with Notepad2 without replacing notepad.exe which should be the preferred way of dealing with this.

link|improve this answer
1  
+1, great point about changing associations – jrista Jul 13 '10 at 21:27
feedback

You can change the permissions from the command line via this information, although I personally find that the GUI permission controls are pretty easy to understand.

You can use it as follows:

CACLS files /e /p {USERNAME}:{PERMISSION}

Where:

  • /p : Set new permission
  • /e : Edit permission and kept old permission as it is i.e. edit ACL instead of replacing it.
  • {USERNAME} : Name of user
  • {PERMISSION} : Permission can be: R - Read W - Write C - Change (write) F - Full control
link|improve this answer
CACLS is deprecated. Microsoft recommends using ICACLS instead. – ctype.h Jan 16 at 23:21
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.