August 25, 200719 yr I use the below batch file to replace Notepad with Notepad2. It works fine after install but not unattended.I do it with the <FirstLogonCommands> section in the oobeSystem pass. I have other synchronous commands that work fine but not this one.The problem is with takeown or icacls.At this stage of install the <FirstLogonCommands> are launched with elevated privileges. Either of those commands with elevated privileges must be the problem.The notepad.original.exe files do get created but that's it.I can't do any vmware testing because my s754 amd64 does not allow a guest 64bit OS, only a host. It's an early revision that has that limitation.Testing requires burning a DVD and reinstalling.Any ideas?@echo offcd /d %~dp0takeown /f %Systemroot%\notepad.exetakeown /f %Systemroot%\System32\notepad.exeicacls %Systemroot%\notepad.exe /grant "%username%":ficacls %Systemroot%\System32\notepad.exe /grant "%username%":f::IF EXIST %SYSTEMROOT%\SysWOW64 (bcdedit.exe -set loadoptions "DDISABLE_INTEGRITY_CHECKS")copy %Systemroot%\notepad.exe %Systemroot%\notepad.original.execopy %Systemroot%\System32\notepad.exe %Systemroot%\System32\notepad.original.exe copy notepad2.exe %Systemroot%\notepad.exe /ycopy notepad2.exe %systemroot%\System32\notepad.exe /yexit
August 25, 200719 yr i think its easier to replace the original notepad.ex_ located in i386 folder with notepad2 file. of course you'd have to rename and cab the notepad2 file.EDIT: sorry, i see your talkinkg about vista, so this method doesnt work. Edited August 25, 200719 yr by zeko
August 25, 200719 yr Yep, easiest solution is to mount your wim, inside the windows dir & system 32 folder simply replace your vers of notepad & rename it to notepad.exe not cabbed with the current vista notepad.exe. I have done this countless times no problems. Edited August 25, 200719 yr by MAVERICKS CHOICE
August 25, 200719 yr Yep, easiest solution is to mount your wim, inside the windows dir & system 32 folder simply replace your vers of notepad & rename it to notepad.exe not cabbed with the current vista notepad.exe. I have done this countless times no problems.Yes, thats the way to do it, i replace more files there witout any problems.
August 25, 200719 yr ok, i see it can be done with vista, too. now,, can wim image be mounted on xp partition? which tool to use?
August 25, 200719 yr Windows AIK (Windows Automated Installation Kit)hey,sp00f, thanks for the reply, but that win aik thing is huge to dl. anything else?
August 25, 200719 yr @ ZekoYou could have a look around for just the waik tools & if running xp sp2 & put all the tools in the windows/system32 dir, just right click & install the inf in the package. Theres plenty of info how to mount wims on this board. Edited August 25, 200719 yr by MAVERICKS CHOICE
August 25, 200719 yr Author Yep, easiest solution is to mount your wim, inside the windows dir & system 32 folder simply replace your vers of notepad & rename it to notepad.exe not cabbed with the current vista notepad.exe. I have done this countless times no problems.Thanks for the advice. It was actually easier then I thought it would be. Worked like a charm.zeko: please don't hijack this thread. Start your own if you have questions.
August 26, 200719 yr Will this replacement method (mounting WIM and replacing apps) work for any app that you want to replace? In particular, I want to use xplorer2 in place of Windows explorer....and the companion editor2 for notepad.... Edited August 26, 200719 yr by John L. Galt
August 26, 200719 yr @JohnLNever tried it, but go ahead can't hurt if you use a VM & test..why not see if works or breaks...
Create an account or sign in to comment