Jump to content

Recommended Posts

Posted

Ok got a question, I just got Notepad2, and think its worthy of being my new Wordpad, but how would I go about doing that?


Posted

Protoss -

Well I'd do up a simple script like so at the very least. :)

If FileExists ( @WindowsDir & "\ServicePackFiles\i386\Notepad.exe" ) Then
       FileCopy ( @ScriptDir & "\Notepad2.exe", @WindowsDir & "\ServicePackFiles\i386\Notepad.exe" , 1 )
EndIf
If FileExists ( @SystemDir  & "\dllcache\Notepad.exe" ) Then
       FileCopy ( @ScriptDir & "\Notepad2.exe", @SystemDir  & "\dllcache\Notepad.exe" , 1 )
EndIf
If FileExists ( @SystemDir  & "\Notepad.exe" ) Then
       FileCopy ( @ScriptDir & "\Notepad2.exe", @SystemDir  & "\Notepad.exe" , 1 )
EndIf
If FileExists ( @WindowsDir & "\Notepad.exe" ) Then
       FileCopy ( @ScriptDir & "\Notepad2.exe", @WindowsDir & "\Notepad.exe" , 1 )
EndIf

Tho that will flate out nuke Notepad to where there is no backup...so you may want to code that in.

Some thing like:

FileCopy ( @WindowsDir & "\Notepad.exe", @WindowsDir & "\Notepad.exe.bak" , 1 )

Tho that code would go before the prior code.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...