Jump to content

New menu program for application installs on xp cds


#rootworm

Recommended Posts

i wrote this app in c#, so you'll need .net 2.0 installed on your pc before running the menu. i install .net on all my comps so it's not an issue for me, if it's an issue for you, sorry ;)

i personally install .net with cmdlines.txt or svcpack.inf, exactly how you do it is up to you.

it's called Simple Application Installer and builds it's menu from an ini file in it's folder called sas.ini, which has pretty much the same structure as every other ini file. i created this project because i wanted a quick, simple to use menu system for my windows cds.

an example sas.ini is included with the download.

here are some of the features of SAS:

room for 32 apps. (window will expand to fit the extra row)

a [pre] and section for running an executable right as the menu loads or exits.

configurable window title.

apps can be run silently (this includes batch files) just remember that sometimes if you run a windowed app in silent mode the gui won't appear. (but the process will still run)

configurable timeout setting from none to whenever, default is 60 seconds. moving the mouse disables the timer.

apps on the list can be mandatory.

apps can have a list of prerequisites consisting of other apps in the list.

prerequisites are recursive. if app a requires b and b requires c, then app a also requires app c.

apps on the list can be checked by default or unchecked.

here's a pic of it in action:

sasfu0.png

it's currently version 1.3, and pretty much feature complete. the only thing missing right now is a staticly linked version, because i can't link a dependable exe.

it can be found at http://sas.awardspace.biz

i'm also providing the source code, it's messy and my first c# app ever, so no poking fun ;)

here's my SAS.ini that created the menu shown above:

[pre]
silent=yes
title=Lightning XP
cmd=%saspath%\sys\mplayer.exe&%saspath%\sys\musik.ogg

[1]
default=yes
Name=Nero 7.5.1.1 Micro
cmd=%saspath%\Nero7\Nero-7.5.1.1_micro.exe&/verysilent;regedit&/s "%saspath%\Nero7\nero7.reg"

[2]
silent=yes
default=yes
Name=DirectShow Filter Pack 2.6
cmd=%saspath%\DSFP\DSFP_2.6.exe

[13]
silent=yes
default=yes
Name=Zoom Player 5 preview 8
cmd=%saspath%\ZP\zp500p8wmv.exe&/S;%saspath%\ZP\zoom.bat

[4]
silent=yes
default=yes
name=NOD32 Antivirus 2.51.30
cmd=%saspath%\NOD32\setup.exe&/silentmode;%saspath%\NOD32\xxxxxxxxxx.exe&/verysilent /norestart;regedit&/s "%saspath%\NOD32\nod32.reg"

[5]
default=yes
silent=yes
name=Opera 9.02 + TIFF Plugin
cmd=%saspath%\Opera\Opera_9.02_Eng_Setup.exe&/S /v/qn;%saspath%\Opera\opera.bat

[6]
default=yes
silent=yes
name=Mozilla Thunderbird 1.5.0.7
cmd=%saspath%\TBird\Thunderbird Setup 1.5.0.7.exe&-ms;%saspath%\TBird\TBird.bat

[7]
default=yes
silent=yes
name=WinRAR 3.61
cmd=%saspath%\WinRAR\wrar361.exe&/s;%saspath%\WinRAR\winrar.bat

[8]
default=no
silent=yes
name=MagicISO 5.3 build 216
cmd=%saspath%\MagicISO\Setup_MagicISO.exe&/S;%saspath%\MagicISO\magiciso.bat

[9]
silent=yes
default=yes
name=Raxco PerfectDisk 8 build 30
cmd=%saspath%\PD8\PD8.exe;%saspath%\PD8\PD8.bat

[10]
default=no
silent=yes
name=Everest Ultimate Edition 3.01
cmd=%saspath%\Everest\everestultimate301.exe&/verysilent;%saspath%\Everest\everest.bat

[11]
default=no
silent=yes
name=010 Professional Hex Editor 2.02
cmd=%saspath%\010\010ed20.exe&/silent;%saspath%\010\010.bat

[12]
default=no
silent=yes
name=Slysoft AnyDVD 6.0.7.0
cmd=%saspath%\AnyDVD\SetupAnyDVD6070.exe&/S;%saspath%\AnyDVD\AnyDVD.bat

[3]
default=no
silent=yes
name=dBpowerAMP Converter/Ripper 11.5
cmd=%saspath%\dbpoweramp\db.bat

[14]
default=no
silent=yes
name=eMule 0.47c
cmd=%saspath%\eMule\eMule0.47c-Installer.exe&/S;%saspath%\eMule\eMule.bat

[post]
silent=yes
cmd=%saspath%\sys\restart.bat

Edited by #rootworm
Link to comment
Share on other sites

  • 2 weeks later...

Hi! This looks promising.

From SVCPACK, I install 31 apps from CD and 6 apps from HDD (copied by $OEM$).

Selection could be needed here.

The two CMD files I'm using (1 for CD and 1 for HDD) contain many DOS commands.

At this point, there are two issues:

1- I need to launch SAS twice, once to install CD apps (31) and another to install HDD apps (6).

As stated by you, I can't list more than 32 apps in a single INI. I have 37 apps.

How can this be done?

2- Using DOS commands in a batch file, I use predefined variables like %UserProfile%, %SystemDrtive%, etc...

I, also, create directories, delete files/folders, rename files/folders, copy, move, EGEDIT, REG ADD, etc...

How can this be done using SAS?

From LM-ROEX (on the first boot), I install 11 apps from CD.

But, here I get the nice ROEX windowed list.

And since these apps are essential (SAV CE, MSN Messenger, etc...), I don't need a selector.

Next, from CU-RO (before my PC restarts), I install 5 apps via a batch file.

Here, I need to launch SAS again (instead of the batch file).

How can this be done?

Some more points of interest:

1- The "Close" button needs to be active. (at least when testing!)

2- SAS Window (list) needs to be a little wider, colored, skinned! A progress bar and "Done" field are necessary, too.

3- The timer stops on a mouse move. This isn't needed at all, I think.

4- Does %sasdrive% usually resolve to where SAS.exe is?

5- What about setting a CDROM variable, because sometimes I launch a batch file from HDD to run something from CD.

6- Do I need to keep a certain structure for my CD to use SAS (like putting SAS in the root of CD, or so)?

Thanks alot.

Edited by mazin
Link to comment
Share on other sites

re: mazin

issue 1.) each section can have an unlimited number of commands to run. to install more than 32 apps you could combine some of them into a single section.

issue 2.) you can call the batch files from SAS or run DOS commands using cmd&/c CommandToRun

for right now, if you need to run SAS again, you'll have to have another folder with sas.exe and sas.ini, i hadn't thought of needing more than one ini before, so this will be changed.

1. the close button is disabled because SAS can contain "mandatory" selections to be installed.

2. meh ;)

3. if you don't like how the timer stops, set it to 1 and the user won't have the chance to stop it

4. %sasdrive% should only return the drive where sas.exe is running from, i.e. c: or d: or e:

if that's not what it's doing i need to take a look at it.

5. i could do a cdrom variable

6. no, SAS doesn't care where it's run from or where the executables that it runs reside

re: Takeshi

.net 2.0

okay, here are some things to be implemented in next version:

SAS.exe will accept one command-line parameter pointing to the ini to load.

add an environment variable cdrom that resolves to the drive with a windows cd in it. (this is kind of what %sasdrive% is for, but i concede there is a difference)

disable task manager while SAS is running or remove SAS from the process list.

what i'd really like to change:

that ugly "&" that separates commands from their arguments. i can't think of a way to parse a command string to retrieve the arguments correctly every time. if i do you can be sure it will be changed.

what i considered adding but won't:

an autostart option to [pre] which instantly begins installing all default apps. why not?

this is what ROEX is for, and if you want to do it at a time other than ROEX, a simple batch file or a compiled batch file are more suited to this purpose.

next version will probably be a little ways off, i'm busy with other things right now.

Link to comment
Share on other sites

it's currently version 1.3, and pretty much feature complete. the only thing missing right now is a staticly linked version, because i can't link a dependable exe.
It would've been easier to be dependency-free by not using .NET but rather the standard C runtimes that are included in every version of Windows. :whistle:

What you've written could've very easily been a simple, tiny, standalone executable.

Edited by LLXX
Link to comment
Share on other sites

It would've been easier to be dependency-free by not using .NET but rather the standard C runtimes that are included in every version of Windows. :whistle:

What you've written could've very easily been a simple, tiny, standalone executable.

That bashing the .NET framework in every post is getting real old ya know... :realmad: Don't like it? Don't use it! Yes, it could have been written in C, but it would likely require MUCH more code, take much more time to code, code would be nowhere as elegant, etc. The world is moving to .NET VERY fast, and adoption keeps getting faster by the day. You'll have to get used to it. Lots of the new stuff (Vista techs) is .NET ONLY. Try making a WPF app with MFC. WCF is going to be very big too (in the server world at least). So please stop with the pointless bashing. There are other installers out there, use whatever works for you. Or you can make one youself since you seem to like that language so much. (I do some C for embedded projects, but other than that, .NET only! It's just SO much better.)

#rootworm: Why use ini files? ini files are a relic from the Win 3.11 days... XML would have been a better pick IMO, or even a lightweight DB like SqLite, which works quite well with .NET and would let you store LOTS of stuff in a nice and simple way.

I was going to ask if you'd make the source available (under GPL or what not), but seemingly you have. Kudos to you! Not many folks do that... Haven't peeked at the source yet nor tried it though, as I use my own isntaller :lol: (C# and .Net 2.0 too)

Link to comment
Share on other sites

Not only .NET runtimes are needed but there are many others.

We have no choice and we can't control what others are doing. We can't afford searching the internet asking everyone to give up using .NET!

Easier, yet, we afford installing .NET!

For the INI file, please keep it as it's simple and easier to maintain.

XML files may not work if some of Windows components are removed. INI files should work in either situation.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

i'm discontinuing this project because i'm not happy with it being in .net...it already has a very obscure purpose, and requiring .net to be installed prior to using it is a pretty bad design flaw. the webpage that hosts it will remain since it's free. i do still use this app on my personal cds, but it doesn't meet my standards for public consumption.

that being said, updates will come if i use this again in the future and need things changed and i won't be updating the ugly documentation.

TBH i'm not even all that happy with the code.

p.s.

i used ini files because they are much easier to write by hand. it actually would have been way way easier for me to require XML files because .net has XML parsers built in, but for the sake of simple config files i wrote my own ini parser.

Link to comment
Share on other sites

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...