Jump to content

Silent Install Program


Verran

Recommended Posts

WARNING: This is long-winded and probably a waste of a lot of people's reading time. If you don't like coding on at least some level, you'll probably just be very confused. Consider yourself warned. :lol:

 

OK, so I've mentioned this a few times in passing but I've never cared enough to prep it for public presentation. I wrote this thing for myself over the years and fairly recently converted it to it's semi-user-friendly state that it's in today. Like I said, I wrote it for me and it works for me, so ... yay! Beyond that, if someone else can get something out of it then I'm very happy and if not it won't break my heart.

 

It started as a small batch script to install some of my "must have" applications silently. I format like it's a bodily function, so even though it took some work to build, it's saved me TONS of time. So the thing grew and grew and then I started wanting to tailor it for different installs. For example, if I was using it for a build for a friend, then I'd want to skip all the OC programs. Well needless to say, that got tiring trying to edit it every time I ran it. So the conversion began...

 

So I converted it to C# and along with that conversion came a lot of new possibilities. It now has a pretty user interface and it adds and drops programs automatically based on what files it finds in its root. So in other words, I don't have to touch the C# code one bit to add a new app to the mix. So what happens is there's the base directory, and then an "Applications" directory. Within that, you can put folders for any sub-set you can imagine. Some examples of mine are Burning, Extras, Main, Music, Overclocking, etc. Each folder found here becomes a sub-menu in the GUI, and each folder under THOSE becomes an entry for a silently-installed application. For each application, there's a specific file layout. There's an "app" folder where I put the installer for the program. Then there's an "install" and a "cleanup" file. These are separated by OS, so you could have a "vistainstall.bat" and a "vistacleanup.bat" as well as an "xpinstall.bat" and a "xpcleanup.bat" all in the same directory. (The program auto-detects and defaults to the OS you're using, but you can manually switch it too if it guesses wrong for some reason.)

 

So basically, it's a C# program that dynamically builds a large batch file from tons of smaller batch files and gives a GUI selection screen for simplicity and prettiness. Once it's built, it will execute it by default, but there is an option to have it not execute automatically if you would so choose (debugging purposes for me).

 

To install it, extract the zip file anywhere. The resulting "Install" directory needs to be put in the root of any drive (so C:\Install or D:\Install or E:\Install, etc.). If you do that right, the program will find the installers all by itself when you run it. Then just execute the PROGRAM.EXE file to start it up. (You'll need to install .NET Framework if you haven't already.)

 

So there you have it. The trick is writing your own .bat files, but once you learn the format, it's very easy and you can mostly copy/paste from existing ones. They're just DOS commands, after all. :) I've included a few for starters and as examples, so take a look. Load the code in SharpDevelop if you like and take a look at my nasty code :P I tried to put lots of comments in to explain what was happening. Give it a try. If anyone's curious, I can explain more. There are many more .bat files that I've written, but I only included a few to give a feel of how things work (and to save on file size).

 

Download Link to my program: http://file2upload.net/download/30215/Install.zip.html (Filesize: 26.4MB)

 

Legal Stuff: I've included some installers for the purpose of examples, and I don't know the legality of that. It's all free software, but still, I don't know what the rules are so I'm going to list the links to their download sites to give credit where credit is due. I DID NOT WRITE ANY OF THE INSTALLERS IN THIS PACKAGE, and I am in no way taking credit for them.

DVD Shrink

vLite

Firefox

Foxit

Audacity

CPU-Z

GPU-Z

SuperPi

SharpDevelop

Share this post


Link to post
Share on other sites

Pictures are worth a thousand words, so here ya go...

 

This is what it looks like for me with all of my programs loaded into it:

autoinstallev8.jpg

 

This is what the downloaded "demo" will look like with just the few installers and scripts I included:

autoinstalllimitedyv5.jpg

 

A few notes:

The italicized programs are my way of acknowledging that they're not fully silent. It's done with a comment line in the installer batch file. They may be completely not silent or just one silly click needed. It depends, but even if they're not silent it's still nice because I can use the scripts to clean up all the shortcuts the installer lays out. Plus, the program knows the difference so it installs all the silent programs you select first, then the non-silent. That way you don't have to come back in the middle and click something. You can start it, walk away, and when you come back you'll only have the non-silent ones left. All the silent ones will be done.

 

The grayed out entries are programs that have scripts, but not for this OS. So they work in Vista, but not XP, or vice versa.

 

The user name at the top is auto-detected and used to clean up the user's start menu and desktop, as well as the "All Users" folders.

 

The "Windows" entries at the bottom don't install anything, they just move/delete files. The "Cleanup" one, for example, deletes all the junk on the desktop, in the start menu, and in the quick launch bar after a Windows install. It cleans up all the Accessibility links, the XP Tour icons, etc. that I don't want to manually delete every time. The "Wallpapers" entry copies all my wallpaper files from the install directory to the windows directory where they can be picked up to be displayed as options in the wallpaper selection menu.

 

Again, if you have any questions, I welcome them. If someone else can get some use out of this thing, that'd make me happy. :)

Share this post


Link to post
Share on other sites

Cool :)

 

Deciphered: This is a program that uses a collection of batch files (to make one giant batch file) to automatically install various other program that the end user wants. It's the job of the end user to write the batch files for his or her programs, based on examples given (standard format, easy to copy and paste), compile / build the overall program and run it.

Share this post


Link to post
Share on other sites

Guest ajmatson

Very nice program Verran. This would be great for us reviewers for reinstalling every time we change hardware :)

Share this post


Link to post
Share on other sites

+1

 

Is it C# .NET & open-source? :P

Yeah, it's C#.net. I wrote it all in Sharp Develop 2.2. As far as open-source? Um, sure? :) Consider it yours to play with. Download it, check it out, make changes to your heart's content. If you d/l it and sell it and become a millionaire, a small percentage is all I ask :P

 

Like I said, if you see potential but you're confused a bit, let me know. If there's a feature you think would help, I'd love to hear it. That's a great idea for the reviewers and I'd be more than happy to help some of you guys get it deployed to make your lives easier. I think I'm going to upload another version soon without any installers but with all of my scripts so you can get a better idea of what's in them and how it works.

Share this post


Link to post
Share on other sites

Yeah, it's C#.net. I wrote it all in Sharp Develop 2.2. As far as open-source? Um, sure? :) Consider it yours to play with. Download it, check it out, make changes to your heart's content. If you d/l it and sell it and become a millionaire, a small percentage is all I ask :P

 

Like I said, if you see potential but you're confused a bit, let me know. If there's a feature you think would help, I'd love to hear it. That's a great idea for the reviewers and I'd be more than happy to help some of you guys get it deployed to make your lives easier. I think I'm going to upload another version soon without any installers but with all of my scripts so you can get a better idea of what's in them and how it works.

 

I'll check out the code for sure! Don't worry, I'll give you a couple bucks every year :lol:

 

Do you know if it's going to show properly in Visual Studio 2008? Anyways, it could be really interesting for us reviewers since installing every benchmark takes so long and it's not like you can leave the computer for the many hours it takes to get going

Edited by Zertz

Share this post


Link to post
Share on other sites

Do you know if it's going to show properly in Visual Studio 2008? Anyways, it could be really interesting for us reviewers since installing every benchmark takes so long and it's not like you can leave the computer for the many hours it takes to get going

I think I actually started writing it in VS2003 on a PC in a training class, but then when the class was over all I had was SharpDevelop, which I ended up liking more anyways. I would think that it should load in VS2008 just fine, but if not, I seriously recommend SharpDevelop. I think you'll be pleasantly surprised with it.

 

Seriously, I would love to help some reviewers use this if it saves you guys time. Ask questions whenever you have them and I'll do my best to explain this thing. :)

Share this post


Link to post
Share on other sites

I think I actually started writing it in VS2003 on a PC in a training class, but then when the class was over all I had was SharpDevelop, which I ended up liking more anyways. I would think that it should load in VS2008 just fine, but if not, I seriously recommend SharpDevelop. I think you'll be pleasantly surprised with it.

 

Seriously, I would love to help some reviewers use this if it saves you guys time. Ask questions whenever you have them and I'll do my best to explain this thing. :)

 

I may check out #Develop, but I'm used to VS and that's the one I always use at home/school so I'll probably stick to it for now

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...