jaws75 Posted August 25, 2007 Share Posted August 25, 2007 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 Link to comment Share on other sites More sharing options...
zeko Posted August 25, 2007 Share Posted August 25, 2007 (edited) 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, 2007 by zeko Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted August 25, 2007 Share Posted August 25, 2007 (edited) 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, 2007 by MAVERICKS CHOICE Link to comment Share on other sites More sharing options...
sp00f Posted August 25, 2007 Share Posted August 25, 2007 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. Link to comment Share on other sites More sharing options...
zeko Posted August 25, 2007 Share Posted August 25, 2007 ok, i see it can be done with vista, too. now,, can wim image be mounted on xp partition? which tool to use? Link to comment Share on other sites More sharing options...
sp00f Posted August 25, 2007 Share Posted August 25, 2007 Windows AIK (Windows Automated Installation Kit) Link to comment Share on other sites More sharing options...
zeko Posted August 25, 2007 Share Posted August 25, 2007 Windows AIK (Windows Automated Installation Kit)hey,sp00f, thanks for the reply, but that win aik thing is huge to dl. anything else? Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted August 25, 2007 Share Posted August 25, 2007 (edited) @ 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, 2007 by MAVERICKS CHOICE Link to comment Share on other sites More sharing options...
jaws75 Posted August 25, 2007 Author Share Posted August 25, 2007 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. Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted August 25, 2007 Share Posted August 25, 2007 Glad you got it sorted, thats what we are all here for hopefully... Link to comment Share on other sites More sharing options...
John L. Galt Posted August 26, 2007 Share Posted August 26, 2007 (edited) 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, 2007 by John L. Galt Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted August 26, 2007 Share Posted August 26, 2007 @JohnLNever tried it, but go ahead can't hurt if you use a VM & test..why not see if works or breaks... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now