Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



el_coco

Member
  • Content count

    7
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About el_coco

  • Birthday 11/08/1992

Profile Information

  • OS
    Windows 10 x64
  • Country
  1. Hello all! I know Win9x it's really abandonware nowdays, but I was bored and I wanted to be able to run a custom "shutdown" executable when I clicked the shutdown menu in the Start menu. Somewhere I've read this was possible with another patch, but I can't find it. So, since this task was not that hard to achieve, I've developed a small patcher that replaces some code in shell32.dll. The new code (stub) will load another dll -a custom one- which executes a .exe when the user clicks Shutdown in the Start menu. This dll gets unloaded right after that. It's important to note that not only Explorer.exe uses these dialogs, so any application which calls #60 or #54 of shell32.dll will trigger the patch as well! The custom EXE that will be executed is defined in a .ini file (shellpatch.ini) located in C:\windows\system. There are 2 entries (both are paths to exes), one is for the "Shutdown" menu, and the other one is for "Logoff". Instructions: You'll need some kind of executable that mimics the shutdown dialog. For example, the one found in the "Tools9x.exe" installer. I've attached an example "shellpatch.ini" file that points to that shutdown executable. Open sh_patcher.exe and click "patch". (Only one time!) Copy the "shellpatch.ini" file to C:\windows\system\ Reboot If you have another executable you would like to run, edit the shellpatch.ini file and change the paths accordingly. If you need to revert the changes: Open sh_patcher.exe and click "revert". Reboot Sources and some information: I've attached the sources of the patcher, the custom dll and the stub. This patch works by executing a simple stub (which loads the custom dll and calls a function of it) located in SHELL32.dll. There are two exported functions (#60 and #54) inside SHELL32.dll which displays the Shutdown or Logoff dialog. Both of them calls the same function inside shell32, changing only an argument (0 for Shutdown, 1 for Logoff). This patch modifies the code of this function, since it's possible to distinguish which kind of dialog the user needs. Also, that function is longer than both of the exports, so it allows some room to put the stub. The patcher loads shell32.dll and obtains its exports and imports. Once it finds the #60 and #54, it looks inside those exports to see where its located the function which both of them calls. After that, it loads the stub.bin file, and replaces some constants with the virtual addresses of the imports of LoadLibrary, GetProcAddress and FreeLibrary. Lastly, it modifies the contents of that function with the new stub. The stub calls LoadLibraryA, GetProcAddress and FreeLibrary. If the custom dll is found, it calls the default function. In that function, an ini file is readed and based on which kind of dialog the user needs, one or another executable is executed. To compile the code: sh_patcher: Uses Visual Basic 6. Open the project file, and compile (or run) it. sh.dll: Uses Visual C++ 6. Open the .dsp project file, select Release and hit Compile sh.dll. Place the resultant file in C:\windows\system. No reboot is needed. stub.asm: Uses FASM (1.68). Open the file, and hit Compile. Copy the result file in the same folder as sh_patcher and run it. It's not needed to revert to the original shell32.dll to apply the patch again. Please try this and tell me if it works or if it has any kind of problem. Tested with Shell32.dll versions: 4.72.3812.600: OK 4.72.3612.1700: OK Thanks! shellpatch.zip
  2. Hello! Well, I know Win9x it's really old, but I'll like to add this small contribution to everyone. I liked the Tihiys Add/Remove programs replacement, but I'll like to run that one every time I go in the control panel and click Add/Remove programs. I've talked with Tihiy and he doesn't have the sources for that project anymore, so I'll have to re create it from scratch. However, a nice feature that I'll like to add is a small hook for the "Windows Components" option, which would modify the original window and embedd into the "Add/Remove replacement". Here I'll share an .exe that does that. (Note: This is not yet the full Add/Remove replacement, just the "Windows Components" wrapper, but this is going to be embedded in the final replacement) Please note that this project would also hook the execution of "Add/Remove Programs" while its running (either from control panel or command line), and redirect that to run "C:\Windows\System\Programs.exe" (the original program from Tihiy). However this is not necessary for the final version (since we can replace the .cpl file for Add/Remove progams and add a small proxy code there). Please comment if you like this and if you woul'd like to see the full Add/Remove programs replacement (which should look like the XP one). Also comment if this crashes or if it doesn't work as expected! AddRemoveHook_binaries.rar PS: Should be multi lingual!
  3. Coll Fix! However, in my translation (Spanish) it was at the same address as you provided. Howver, the hex array was in another position and doing calculations would give me a wrong offset. Thanks!
  4. Office 2003 + Win98

    Hello! I've tryied what the OP says to modify the installation, but after deleting those entries, when I open the MSI in 98 it says "Error opening this installation package. " and tells me to check with the administrator if this package is valid. The original .MSI also says the same... But it works nice in Win7. Maybe do I need an upgrade to MSIInstaller?
  5. KernelEx App Compatibility Database

    The latest version of Winamp has an error with KEX4. Installed with a few details, but finally installed. After installation, it runs a setup program for Winamp, which it hangs at the end. And it's consuming all CPU. I guess if you modify some registry to disallow the run of the configurator, it may run, but i dont know. Sorry for my bad english!
  6. 98 SE SP 3.32

    Nice, very good!. I have 98 SE in spanish, and some things converts to english. Will be nice if you add Spanish as another language, or in each file add spanish resources and another languages! sorry for my poor english! bye
  7. Windows Strata Theme

    Do you have installed UberSkin? Well, if you have installed, you must copy the directory "Windows Strata" to yout windows path\Resources (C:\Windows\Resources) Nice theme!, im currently using it! Bye!
×