MXPie.info Forum Home » MXPie Patch and WinMX Help » MXPie and WinMX Tutorials » Pie Patch Installer. What does it do, how does it do it.
The time now is Fri May 18, 2012 4:17 pm

Reply to topic
Author

Pie Patch Installer. What does it do, how does it do it.

(¯`·.¸Unique¸.·´¯)




Joined: 01 Aug 2006
Posts: 20
Location: Norway
Posted: Thu Aug 03, 2006 1:41 am
Reply with quote
Pie Patch Installer. What does it do, how does it do it.

*** Some kind of white paper of PIE Patch installer - v.1 ***

The installer itself is built with NSIS which is an open source script installer for applications. The Nsis can be extended with plugins to extend it's features to do spesific tasks.

Subhuman Bob is the "brain" behind the making of the current installer, while I have mostly done the additional work with appearance and language support, whilst SamBrasil provided graphics. Several others have also been contributing by directly suggested changes in the source code. Sabre is maintaining and providing the hosts file that is included in the installer. The language is translated to 14 different languages by approximately 25 different users.

The main purpose of the installer is to add and maintain the necessary entries to the end users computer's hosts file so that WinMX can connect to a peer cache server for further connection to the WPN (WinMX Peer Network).

The optional purpose is to try detect if any older/other patches is in use and disable those from operation. Using different patches at the same time will in most cases cause conflict and give users a negative experience.


1 **** Initial start up ****
- Installer is started. First thing it does is to check what language computer is running. If it sees a match it will suggest moving on with the matching language. If no match, English is selected by default.
- Installer will set the installation directory (which is ../Default Program Files directory/PIE Patch/ ) The uninstaller will be saved here at the end of installation.
- Installer will determine what OS the user is currently running. Reason is that different Operating Systems have different locations for the hosts file. Only Windows versions are detected, and the installer cannot run on other systems.
- If a Windows version cannot be determined installer will abort installation.
- It will determine if a hosts file is at the location, and abort if it can't find a hosts file to edit.
- User will now have the option to choose whether to check for conflicting patches or not. The installer will run a bit faster when the check is disabled, however this only applies to slower computers (more than 5-6 years old) and will probably be not more than 2-10 seconds at the most.

2 **** Removal of older versions of PIE patch ****
- Checks for and cleans all older entries in registry regarding PIE Patch (from version 2.1 and up)
- Checks for an deletes any older uninstaller made by previous PIE Patch versions (including old backups no longer needed)
- Checks for and deletes any older folders made by previous PIE Patch versions (also from version 2.1 and up)

3 **** Optional check for, and rename conflicting patch ****
- If the recommended setting is chosen installer will now try to find a location where WinMX is installed. It will try find it in different places, like registry settings, shortcuts and known locations (like the default C:/Program Files/WinMX/)
- It will determine that the location is valid and check if the folder contains different types of dll-files. These types (names) are olepro.dll, ws2_32.dll and oledlg.dll
- To ensure that "good" files are not affected (patch for secondary disconnect, RCMS, BendMX etc) the installer will do a deep search within the file found and determine if it's a connection patch or not. If it cannot be determined, the installer will leave it untouched.
- If the installer finds that the file found is a part of other connection patches it will try to rename it.
- If the file is currently in use by WinMX, the file cannot be renamed, so Installer sets a reboot flag. The computer will now receive a message to rename file next time computer is restarted. The installer will notify user if this action is being done (on finish page of installer)
- If WinMX is not running, the installer will simply rename the file to ws2_32.km1 (or ws2_32.km2, .km3, .km4 etc if there are several files found in folder).

4 **** Writing entries to hosts file ****
- Copies the hosts file to a temp folder.
- Adds # MXpie patch Revision: [version number] to first line of temp hosts file
- Removes old entries associated with previous Pie patch (if any found) from temp hosts file
- Merges the new entries to the temp hosts file and just above those, a line looking like # From here down, all lines with .winmx.com, were added by the MXpie Patch [version number]
- Checks and makes a note of the file attributes on the original hosts file (read only, system etc)
- Sets the attributtes on hosts file to normal
- Makes a backup of the hosts file in same directory called backup_of_hosts
- Deletes original hosts file
- Moves the new made hosts file from temp folder to replace the original and reverts the file to the original attributtes.
- Executes ipconfig /flushdns to clear cached entries in DNS service (if computer is NT based; NT4, 2000, XP, 2003, Vista). For the record, this command will only work if DNS client service is not disabled.

5 **** Writing version information and uninstall properties ****
- Writes entries in registry needed for uninstall information. (Basically, the information you see in Add/Remove Programs)
- Creates the uninstaller and saves it in ../Default Program Files directory/PIE Patch/
- Removes all other temporary files created during installation from temporary files folder.

6 **** Finish ****
- Normally the final page shows with the option to visit the official MXPie home page.
- In some occasions the final page tells the user to reboot computer for installation to finish (if WinMX was running and a conflicting patch was found)


Last edited by (¯`·.¸Unique¸.·´¯) on Sat Aug 26, 2006 4:11 pm; edited 1 time in total

Find all posts by (¯`·.¸Unique¸.·´¯)

Reply to topic Page 1 of 1

MXPie.info Forum Home » MXPie Patch and WinMX Help » MXPie and WinMX Tutorials » Pie Patch Installer. What does it do, how does it do it.
All times are GMT
Related Topics
Sticky: How to manually install PIE Patch hosts file
File Error>5 "Access to C:\_INC...
Any file with too many possible downloads always time out...
problemi download file winmix
haveing troubles with host file