Archive: Help for a weenie... really simple routine


Help for a weenie... really simple routine
  Folks, I am not a programmer - I have dabbled in the past, and even used Install Shield Pro to create a simple installation routine. I have developed MS Access Databases, but my eyes still glaze over when confronted with a daunting VB Script page. Some may think that because I'm basically a virgin in programming that I may have no business asking what I'm about to ask. If that is the case, just tell me to go home and I'll leave, no hard feelings - but I would really appreciate some guidance.

This installation routine I created with Install Shield, well, it worked fine under Win9x/NT, but now that XP is here and I'm not running XP or 2K, I find that some users are having problems installing. Someone I respect said to check out NSIS. I abhored the idea of delving back into the world of variables and such, but I thought, well if Joe says it's good, it's good.

I downloaded it, and looked it over. It looks like it is for folks who have far more scripting/programming experience than I have. I was about to delete it when I thought that perhaps someone would take pity on me and tell me how to create an NSI that I can then convert into an executable for an install routine. If I am helped, I know I can figure out the finer details, but I JUST don't know how to start. I tried the template page, by the way, but as you can imagine, this still requires more knowledge than I have and I know that what I want to do is so dern SIMPLE, it's embarassing. I feel kind of like the 90 pound weakling that goes into the biker bar and asks if anyone knows how to kick start a motorcycle.

With all of the peamble and diatribe out of the way, here goes...

All I need to do is put a shortcut on a desktop that points to a file in a specific folder location on a CD-ROM Drive - the drive letter will of course, change from system to system.

That is to say, the drive letter of the CD will be variable, so I need to say something to the effect of:

"no matter what (removable) drive letter it is, look for a file that will have a variable prefix, but the extension is always the same (e.g., *.TXT). That file will always be in a folder called "Black" on the drive you are running this install routine from. Then place a shortcut to that file on the desktop."

Once I can do that, I will be able to look through examples and stuff to find out how to insert a EULA accept/reject dialog and if I'm REALLY lucky will be able to check the users system to see if they have the application that runs that file in the folder. This is all secondary however. The install routine I created (a year ago?) in Install Shield does this, but something changed when XP and 2K came out. I am poor and don't have the newer systems available to me for trial and error stuff. Basically, I'm still in Win98SE and can't afford to do better right now.

You probably think I'm a weenie, and you're probably right - I just cant figure out how to get started since I don't have a command of programming flow/statements. Maybe I don't belong here, I dunno. If I can't do it here, then I have to muscle through Install Shield again (argh!).

Anyone willing to help me?


No need to be embarassed, we are here to help :D

Basic NSIS script has the Name of the installation, OutFile, and one Section. In more complex scripts you can write multiple sections and let the user choose which of them to install (for example, install CD support, IPX support...).

A section is like an install component.

So it will look like this:


Name "My installer"

>OutFile "install.exe"
>Section
MessageBox MB_OK "This is my first installer"
>SectionEnd
>
There are some more examples in your NSIS directory.

To compile a script you need just to right click it and choose Compile Script.

To find out from where the insatller was run (the CD-ROM letter...), use $EXEDIR. To create a shortcut use CreateShortCut. Both of these should be in the section. To extract files use the File command.

For more information use makensis.html (in your NSIS directory).

If you still don't understand feel free to ask again.

kichik, thanks so much for the offer to help if I have questions. I am going to spend some time with the examples, and see what I can come up with.

In the words of T2 - I'll be back.

Peace