No control over Windows Folder with admin, from 7 or XP

mynameiszanders

New member
Local time
4:55 PM
Messages
6
Location
Gloucestershire
This is my first post here, so I'm expecting to make a fool of myself, as I normally do.

I want to replace a file in the windows folder. "notepad.exe" to be precise. I hate having to use an external program everytime I want to edit *nix and source files (no line returns, no syntax highlighting, etc.), so use that program 7 calls for Notepad.

So my plan WAS to simply replace (Microsft's) "notepad.exe" with Notepad2 (from Flo's Freeware).

I used the Super User account using "net user Administrator /active:yes".
Unfortunately, I still don't have the permissions to do that! I guess I was getting my hopes up by guessing Administrator was going to be the same as Linux's root user. Obviously not.

No worries, I thought. I've still got XP on the other HDD, I'll just pop on that. Execpt, XP Explorer will not let me replace the files either! File is protected. Nothing I can do.

Apart from installing Ubuntu onto one of my memory sticks, loading that and forcing that damn file on top of the other one, can anyone tell me what is restricting me to as I please?
 

My Computer

Computer Manufacturer/Model Number
Eclipse Computers Custom Build
OS
Windows 7 Build 7000, Windows XP Home, Ubuntu 9.04
CPU
Intel Pentium 4, 3.06GHz, x64
Motherboard
GeForce 775i945GZ
Memory
1x 1024Mb, 1x 512Mb. DDR II 533
Graphics Card(s)
nVidia 7900 GT
Monitor(s) Displays
Samsung SyncMaster 910MP
Screen Resolution
1280x1024
Hard Drives
1x 160Gb (Maxtor)
2x 20Gb
Case
XBLADE Silver
Cooling
A really noisy one that wakes everyone up at night.
Keyboard
One I found in a recycling center, as long as it works...
Mouse
Same as keyboard
Internet Speed
8Mbs apparently, I'd say about 3.5Mbs
Hi, mynameiszanders, and welcome to the forums.

I personally use notepad++, but rather than trying to replace the original notepad I simply associated all the different files types I want edited in Notepad++ directly (.sh files, .c files, .h files, etc) so that they would automatically open in Notepad++. I actually took over the associations for .txt and .log as well, and now Notepad++ opens whenever I open any of these file types.

Does Notepad2 offer file association as well? Your best bet would be to do it that way, because I suspect the system is actively monitoring for file replacements as that is a known malware technique for hiding themselves from scrutiny....

One thing you could try is to temporarily disable Windows Defender and see if that allows you to replace is if you're set on replacing the program as opposed to the file associations....
 

My Computers

System One System Two

  • Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    The Beast Model A (homebrew)
    OS
    Windows 11 21H2 Current build
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spec
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Plat
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    SteelSeries Apex Pro Wired Gaming Keyboard
    Keyboard
    SteelSeries Apex Pro
    Mouse
    Logitech MX Master 3S | MX Master 3 for business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Antivirus
    Windows Defender + MB 3
    Browser
    Nightly (default) + Firefox (stable),Chrome, Edge
  • Computer type
    PC/Desktop
    System Manufacturer/Model Number
    Dell Latitude E5470
    OS
    ChromeOS Flex Dev Channel (current)
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics Card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Keyboard
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
File association is the method I am using at the moment. I works, at least.
The other reason, which I forgot the mention, is that the few times that I actually use Internet Explorer (to test website development) I view the source.

Thanks for the quick reply, it made me come down to earth! I know I don't need to replace the file when file association works just fine. I suppose I'm just stubborn when I get an idea in my head :P

At least we know the new Windows system is secure, even through another OS accessing the filesystem! Well done Microsoft... and I think that's the first time I've said that in a very long time!

Cheers, mniz.
 

My Computer

Computer Manufacturer/Model Number
Eclipse Computers Custom Build
OS
Windows 7 Build 7000, Windows XP Home, Ubuntu 9.04
CPU
Intel Pentium 4, 3.06GHz, x64
Motherboard
GeForce 775i945GZ
Memory
1x 1024Mb, 1x 512Mb. DDR II 533
Graphics Card(s)
nVidia 7900 GT
Monitor(s) Displays
Samsung SyncMaster 910MP
Screen Resolution
1280x1024
Hard Drives
1x 160Gb (Maxtor)
2x 20Gb
Case
XBLADE Silver
Cooling
A really noisy one that wakes everyone up at night.
Keyboard
One I found in a recycling center, as long as it works...
Mouse
Same as keyboard
Internet Speed
8Mbs apparently, I'd say about 3.5Mbs
This is my first post here, so I'm expecting to make a fool of myself, as I normally do.

I want to replace a file in the windows folder. "notepad.exe" to be precise. I hate having to use an external program everytime I want to edit *nix and source files (no line returns, no syntax highlighting, etc.), so use that program 7 calls for Notepad.

So my plan WAS to simply replace (Microsft's) "notepad.exe" with Notepad2 (from Flo's Freeware).

I used the Super User account using "net user Administrator /active:yes".
Unfortunately, I still don't have the permissions to do that! I guess I was getting my hopes up by guessing Administrator was going to be the same as Linux's root user. Obviously not.

No worries, I thought. I've still got XP on the other HDD, I'll just pop on that. Execpt, XP Explorer will not let me replace the files either! File is protected. Nothing I can do.

Apart from installing Ubuntu onto one of my memory sticks, loading that and forcing that damn file on top of the other one, can anyone tell me what is restricting me to as I please?

I believe that the system is secure for normal users, but as an administrator you can bypass some default security...

So, if you want to replace the notepad.exe file, you will probably first need to take ownership of the file with the following commands:

Open CMD with administrator rights and type:

takeown /f c:\windows\notepad.exe
takeown /f c:\windows\system32\notepad.exe

icacls c:\windows\notepad.exe /grant your_user_name:F
icacls c:\windows\system32\notepad.exe /grant your_user_name:F

The above should let you do whatever you want with notepad.exe .
 

My Computer

Computer Manufacturer/Model Number
ENIAC
OS
Windows 7 RC 7100 32bit/64bit
CPU
Intel Core2Duo E4500 2.20 GHz
Motherboard
ASUS P5LD2-X/1333
Memory
2x1GB Kinsgston DDR2 800MHz
Graphics Card(s)
Nvidia 8500GT
Sound Card
Onboard High Definition Audio Device
Monitor(s) Displays
Sony Bravia 42"
Case
LINKW 2222
Cooling
Standard Intel
Keyboard
Some cheap one
Mouse
Microsoft Intellimouse something
Internet Speed
24MBps ADSL
I believe that the system is secure for normal users, but as an administrator you can bypass some default security...

So, if you want to replace the notepad.exe file, you will probably first need to take ownership of the file with the following commands:

Open CMD with administrator rights and type:

takeown /f c:\windows\notepad.exe
takeown /f c:\windows\system32\notepad.exe

icacls c:\windows\notepad.exe /grant your_user_name:F
icacls c:\windows\system32\notepad.exe /grant your_user_name:F

The above should let you do whatever you want with notepad.exe .

Easier is adding this to the registry:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"

It'll put a take ownership in the rightclickmenu
 

My Computer

Computer Manufacturer/Model Number
me and myself
OS
vista x64/ win 7 x64
CPU
phenom 9950 BE
Motherboard
ASUS M2A-VM HDMI
Memory
8 gb
Graphics Card(s)
nvidia gts 250
Sound Card
realtek HD onboard
Monitor(s) Displays
dual hd 19" tft
Screen Resolution
1440x900
Hard Drives
2 x 500 gb WDC
1 x 500 gb Seagate
1 x 1000 gb Seagate
1 80 gb raptor
1 usb 160 gb
Cooling
standard issue
Keyboard
logitech g11
Mouse
usb wireless MS laser 6000
Internet Speed
18 mb (according to my provider :)
I believe that the system is secure for normal users, but as an administrator you can bypass some default security...

So, if you want to replace the notepad.exe file, you will probably first need to take ownership of the file with the following commands:

Open CMD with administrator rights and type:

takeown /f c:\windows\notepad.exe
takeown /f c:\windows\system32\notepad.exe

icacls c:\windows\notepad.exe /grant your_user_name:F
icacls c:\windows\system32\notepad.exe /grant your_user_name:F

The above should let you do whatever you want with notepad.exe .

Worked a treat! Thankyou very much limneos!

That is great, except I have to apologise to everyone who helped because, just now to check it works, I found out that Internet Explorer 8 has its own source viewer, like Firefox, and no longer uses notepad!

I feel like such a fool :P Although, at least this means I live up to my own expectations :P

Thanks to petrossa, to a method which is no longer needed, but will be used, just because I'm curious ;) I still haven't dived into the registry editor in 7, and this has given me a cover up excuse to ruin the system's stability by my inquisitive prying!
 

My Computer

Computer Manufacturer/Model Number
Eclipse Computers Custom Build
OS
Windows 7 Build 7000, Windows XP Home, Ubuntu 9.04
CPU
Intel Pentium 4, 3.06GHz, x64
Motherboard
GeForce 775i945GZ
Memory
1x 1024Mb, 1x 512Mb. DDR II 533
Graphics Card(s)
nVidia 7900 GT
Monitor(s) Displays
Samsung SyncMaster 910MP
Screen Resolution
1280x1024
Hard Drives
1x 160Gb (Maxtor)
2x 20Gb
Case
XBLADE Silver
Cooling
A really noisy one that wakes everyone up at night.
Keyboard
One I found in a recycling center, as long as it works...
Mouse
Same as keyboard
Internet Speed
8Mbs apparently, I'd say about 3.5Mbs
Thanks to petrossa, to a method which is no longer needed, but will be used, just because I'm curious ;) I still haven't dived into the registry editor in 7, and this has given me a cover up excuse to ruin the system's stability by my inquisitive prying!

no need to open regedit, just copy paste the text and save it in notepad as a .reg file. Clicking it will add it to your registry. Reboot and you have your menuentry.

Works fine, it gives you Take Ownership to a file or a folder without problems.
 

My Computer

Computer Manufacturer/Model Number
me and myself
OS
vista x64/ win 7 x64
CPU
phenom 9950 BE
Motherboard
ASUS M2A-VM HDMI
Memory
8 gb
Graphics Card(s)
nvidia gts 250
Sound Card
realtek HD onboard
Monitor(s) Displays
dual hd 19" tft
Screen Resolution
1440x900
Hard Drives
2 x 500 gb WDC
1 x 500 gb Seagate
1 x 1000 gb Seagate
1 80 gb raptor
1 usb 160 gb
Cooling
standard issue
Keyboard
logitech g11
Mouse
usb wireless MS laser 6000
Internet Speed
18 mb (according to my provider :)
I personally use notepad++, but rather than trying to replace the original notepad I simply associated all the different files types I want edited in Notepad++
Interesting thread this, with some detailed answers. Good stuff.:geek:
I just wanna say I use the freebie notepad++ with the same file association method as you johngalt.
 

My Computer

OS
Dual boot XP Pro and Seven/7127
Back
Top