Author Topic: modify the resources within a windows file  (Read 2559 times)

altosax

  • Moderator
  • Sr. Member
  • *****
  • Posts: 328
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
modify the resources within a windows file
« on: June 29, 2002, 04:46:25 PM »
hi all,
i'm playing a little with resources within windows dll's.
i've modified my file shdoclc.dll to create a link to google cache directly in the page that windows shows when a web page is unavailable.

if you are able to do this yourself, here are the steps.

1.
download resource hacker from http://www.users.on.net/johnson/resourcehacker/

2.
copy and paste the file windows/system/shdoclc.dll elsewhere to modify the copy, not the original. open the copy with rh, and go to 23/http_404/your_language_id

3.
add this function into the script:


function GoogleCache(){
   DocURL = document.location.href;
      
   protocolIndex=DocURL.indexOf("://",4);
   
   serverIndex=DocURL.indexOf("/",protocolIndex + 3);

   BeginURL=DocURL.indexOf("#",1) + 1;
   if (protocolIndex - BeginURL > 7)
      urlresult=""
   
   urlresult=DocURL.substring(BeginURL,serverIndex);

   displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);

   forbiddenChars = new RegExp("[<>**FIX**"]", "g");   // Global search/replace
   urlresult = urlresult.replace(forbiddenChars, "");
   displayresult = displayresult.replace(forbiddenChars, "");

   document.write('<A target=_top HREF="http://www.google.com/search?q=cache:' + urlresult + '">' + displayresult + "</a>");

}


4.
add this html code at the end of the listed item:


      <li id="list5">Search the requested page in the Google cache:<br> <script> GoogleCache(); </script>. </li>


5.
compile the script and save the file. reboot in dos, rename the original file and copy your modified file in place of the original. then reboot again.

if someone send me the file, i can do it for him. i can't post my modified file because all dialogs it contains are in italian language.

note: if you do this, don't tell it to bill ;)

regards,
altosax.



Edited by - altosax on 29 Jun 2002  17:47:56