Installer Script (For Metis Developers)

A place to download and discuss the latest WinMX software by Pri

Moderator: DrGirlfriendMD

User avatar
Pri
Site Admin
Site Admin
Posts: 5433
Joined: Fri Dec 14, 2007 8:59 am

Installer Script (For Metis Developers)

Tue Feb 03, 2009 9:03 am

Pri.Installer.xml
(5.75 KiB) Downloaded 503 times
What it Does:
It enables you (The script writer) to easily distribute popular scripts or very complicated scripts that require lots of folders or files without worrying about the Users who use your scripts not setting it up correctly. Basically it will automatically install any Folders and Files your script requires making the burden on the user for installing your script no more or less then any other script he/she may have.

Why was it Made?:
Angel and Rav who used to run The Movie Storage together used a lot of scripts that I produced as I was an Administrator there and as I was updating the scripts and they were moving the Room between machines and hosters it became apparent that installing all the folders and files necessary was a long task. So I wrote this installer for them to use. It worked fine and was used many times. Now that The Movie Storage has become decrepit I have decided to open source this script so that the entire community can benefit. It is a shame that this script didn't come a few years ago when Metis was in its hay-day but ya know better late then never at all.

How do you use it?:
Well this isn't a normal script, its not for end-users it is for script writers so if you want to use the installer you are free to change or modify it any way you see fit. Learn from the code that is there integrate it in to your own scripts or whatever you want to do. Included within the script is the basic outline of how it was used for installing some other scripts and at the bottom is an update.

I'm making v0.2 of the Installer available. The original version v0.1 did not contain install capability for pri.poll.script which is why in this v0.2 it includes an !update command to place that script in a previous installation. This can be used by you as an example of how you would update previous users to the newest version. However I highly recommend you to simply integrate install code in to your own scripts as if you and another developer take over any of the same triggers (like !install) it could become complicated for end-users.

Another application for this script is in fact End-Users as I described at the start of the thread it was used for reinstallation's of scripts we made but it can be used for quick reinstallation's by end-users if you know how to alter the code for scripts you use that require folders and files and other things.

Anyway enjoy.

And in Code Tags for anyone that wants it that way:

Code: Select all

<config>

//  Pri.Installer v0.2 (Made 16/04/2008) For Angel and Rav
//  This Script is DANGEROUS. Do not modify it in anyway unless you know 100% what you are doing.
//  If you do modify it you may have data loss. 
//  Pri is not responsible for any Data loss that ensues from using this Script. USE AT YOUR OWN RISK!

<command type="script">
<in>!install</in>
<out type="push" extdata="InstallResult"><operator type="readfile" nvalue="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" lvalue="l" rvalue="1"/></out>
<out type="push" extdata="InstallResultThree"><operator type="readfile" nvalue="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" lvalue="l" rvalue="3"/></out>
<out condition="==" lvalue="$InstallResult$" rvalue="1">/hidecmd /privnotice %RAWNAME% #c9#An Installation has already been made on this system. Installer will now Quit.</out>
<out condition="==" lvalue="$InstallResult$" rvalue="1">/hidecmd /privnotice %RAWNAME% #c9#$InstallResultThree$</out>
<out condition="==" lvalue="$InstallResult$" rvalue="2">/hidecmd /privnotice %RAWNAME% #c9#A past installation Failed due to an error. Please contact Pri</out>
<out type="break" condition="==" lvalue="$InstallResult$" rvalue="1"></out>
<out type="break" condition="==" lvalue="$InstallResult$" rvalue="2"></out>
<out condition="==" lvalue="$InstallResult$" rvalue="3">/hidecmd /privnotice %RAWNAME% #c9#A past installation began but did not complete. The install will now continue.</out>
<out condition="!=" lvalue="$InstallResult$" rvalue="3">/hidecmd /privnotice %RAWNAME% #c9#No past install was detected. A new installation will now begin. (v0.2)</out>

<out>/hidecmd /privnotice %RAWNAME% #c2#Installing #c57#Main Directory</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\install.log</out>
<out type="file" extdata="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" mode="t">3</out>
<out>/hidecmd /privnotice %RAWNAME% #c4#Installation of main directory completed. #c63#(#c57#C:\Pri.Tool.Dependencies#c63#)</out>

<out>/hidecmd /privnotice %RAWNAME% #c2#Installing #c57#Pri.Autlogin v0.2</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\Autologin</out>
<out>/hidecmd /privnotice %RAWNAME% #c4#Installation of "Pri.Autologin" completed #c63#(#c57#C:\Pri.Tool.Dependencies\Autologin#c63#)</out>

<out>/hidecmd /privnotice %RAWNAME% #c2#Installing #c57#Pri.Entry.Logger v0.5</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\Entry.Logs\full.entry.log</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\Entry.Logs\User.Entry.Database</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\Entry.Logs\User.Last.Enter.Database</out>
<out>/hidecmd /privnotice %RAWNAME% #c4#Installation of "Pri.Entry.Logger" completed #c63#(#c57#C:\Pri.Tool.Dependencies\Entry.Logs#c63#)</out>

<out>/hidecmd /privnotice %RAWNAME% #c2#Installing #c57#Request.Script v0.5</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\Requests</out>
<out>/hidecmd /privnotice %RAWNAME% #c4#Installation of "Request.Script" completed #c63#(#c57#C:\Pri.Tool.Dependencies\Requests#c63#)</out>

<out>/hidecmd /privnotice %RAWNAME% #c2#Installing #c57#Pri.poll.script v0.5</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\Poll.Stuff</out>
<out>/hidecmd /privnotice %RAWNAME% #c4#Installation of "Pri.poll.script" completed #c63#(#c57#C:\Pri.Tool.Dependencies\Poll.Stuff#c63#)</out>

<out>/hidecmd /privnotice %RAWNAME% #c9#All Installations Completed successfully. Enjoy!</out>
<out type="file" extdata="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" mode="t">1\n</out>
<out type="file" extdata="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" mode="a">Installation completed successfully on %DATE%\n</out>
<out type="file" extdata="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" mode="a">The version of the installer used was v0.2</out>
</command>

<command type="script">
<in>!update</in>
<out type="push" extdata="InstallResult"><operator type="readfile" nvalue="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" lvalue="l" rvalue="1"/></out>
<out condition="==" lvalue="$InstallResult$" rvalue="1">/hidecmd /privnotice %RAWNAME% #c9#A Successful previous Installation was Detected...</out>
<out type="break" condition="!=" lvalue="$InstallResult$" rvalue="1"></out>
<out type="push" extdata="InstallResult"><operator type="readfile" nvalue="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" lvalue="l" rvalue="3"/></out>
<out condition="?" lvalue="$InstallResult$" rvalue="v0.1">/hidecmd /privnotice %RAWNAME% #c9#This Update is Compatible and will now begin</out>
<out condition="!?" lvalue="$InstallResult$" rvalue="v0.1">/hidecmd /privnotice %RAWNAME% #c9#This update is not Compatible with your previous Installation</out>
<out condition="!?" lvalue="$InstallResult$" rvalue="v0.1">/hidecmd /privnotice %RAWNAME% #c9#Pri.Installer will now quit</out>
<out type="break" condition="!?" lvalue="$InstallResult$" rvalue="v0.1"></out>

<out>/hidecmd /privnotice %RAWNAME% #c2#Installing #c57#Pri.poll.script v0.5</out>
<out type="exec" extdata="1">cmd.exe /c MD C:\Pri.Tool.Dependencies\Poll.Stuff</out>
<out>/hidecmd /privnotice %RAWNAME% #c4#Installation of "Pri.poll.script" completed #c63#(#c57#C:\Pri.Tool.Dependencies\Poll.Stuff#c63#)</out>

<out type="file" extdata="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" mode="t">1\n</out>
<out type="file" extdata="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" mode="a">Installation completed successfully on %DATE%\n</out>
<out type="file" extdata="C:\Pri.Tool.Dependencies\install.log\installation.logfile.ini" mode="a">The version of the installer used was v0.2</out>
</command>


</config>

Return to “Scripts & WinMX Related Software”

Who is online

Users browsing this forum: No registered users and 7 guests