News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Install program

Started by Magnum, February 12, 2011, 02:43:36 AM

Previous topic - Next topic

Magnum

I am interested in learning how to install programs.

Something simple, like copy a program to a directory, inform the user, etc.

If my program doesn't use the registry, do I need to register it?

Have a great day,
                         Andy

donkey

From the start menu select Run, in the dialog type iExpress, its a useful little install maker with a number of great options. You can also build scripts (inf files) to modify the registry, for versioning and a number of other functions.

Using iExpress technology
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jj2007

Quote from: donkey on February 12, 2011, 02:49:00 AM
From the start menu select Run, in the dialog type iExpress, ...

Very useful hint, thanks Edgar. It reports somewhat hilarious compression ratios ("85%" when the effective size is 120k from 60k sources...) but works just fine and allows a single prompt install.

oex

Quote from: jj2007 on February 12, 2011, 04:09:23 AM
It reports somewhat hilarious compression ratios ("85%" when the effective size is 120k from 60k sources...) but works just fine and allows a single prompt install.

A simple Gateometric formular.... :lol

120 + 60=180 / 60 = 3 => 60 / 3 = 20
120 / 60 = 2 => 20 * 2 = 40 + 2 = 42 + 60 = 102 = 85%
We are all of us insane, just to varying degrees and intelligently balanced through networking

http://www.hereford.tv

Magnum

Thanks for the info gentlemen.

At my stage of development, my programs aren't complex.

The executable and a batch file to make a directory and install and uninstall may suffice.

I have some programs now that don't install in C:\Program Files.





Have a great day,
                         Andy

Vortex

Quote from: Magnum on February 12, 2011, 04:56:02 AM
I have some programs now that don't install in C:\Program Files.

Hi Magnum,

Why not to create a portable application? The user should be able to select the installation directory.

Magnum

I will look up how to create a portable app.

I use a portable version of Firefox on my thumbdrive for when I go to the Senior Center.

Have a great day,
                         Andy

donkey

Quote from: Vortex on February 12, 2011, 09:36:01 AM
Quote from: Magnum on February 12, 2011, 04:56:02 AM
I have some programs now that don't install in C:\Program Files.

Hi Magnum,

Why not to create a portable application? The user should be able to select the installation directory.

Not sure but I think that installing in C:\Program Files now requires an elevation manifest since any writes to that folder actually go to a shadow folder. However, and I can't verify this, if the name of the application is setup.exe the system will assume an elevation manifest and prompt the user for admin privileges. I seem to remember reading that somewhere but I can't find the reference anymore.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Antariy

Quote from: jj2007 on February 12, 2011, 04:09:23 AM
It reports somewhat hilarious compression ratios ("85%" when the effective size is 120k from 60k sources...) but works just fine and allows a single prompt install.

It uses makecab archiver - this is reason. LZX-21 compression pretty good, and may beat WinRAR and many other archives with some kinds of data.

makecab can be called from a command line - read its "help".

Though, makecab cannot compress directories, and may compress many files only if they are in a file with a "directives".

This is simple example of using makecab with maximal standard LZX:21 compression:


makecab /D CompressionType=LZX /D CompressionMemory=21 SomeFile.Ext


Yuri

Quote from: donkey on February 12, 2011, 08:51:32 PM
However, and I can't verify this, if the name of the application is setup.exe the system will assume an elevation manifest and prompt the user for admin privileges. I seem to remember reading that somewhere but I can't find the reference anymore.

Maybe it's here: Inside Windows Vista User Account Control
Quote
The vast majority of installation programs require administrative rights, so the image loader, which initiates the launch of an executable, includes installer detection code to identify likely legacy installers. Some of the heuristics it uses are as simple as detecting if the image has the words setup, install, or update in its file name or internal version information; more sophisticated ones involve scanning for byte sequences in the executable that are common to third-party installation wrapper utilities.

Magnum

I started looking to see if makecab can be used as a file compressor instead of
relying on outside compressors.

Found some info here.

http://msdn.microsoft.com/en-us/library/ms916839
Have a great day,
                         Andy

Antariy

#11
Quote from: Magnum on February 13, 2011, 10:33:43 AM
I started looking to see if makecab can be used as a file compressor instead of
relying on outside compressors.

Found some info here.

http://msdn.microsoft.com/en-us/library/ms916839

Interesting article. Though, advise to use zip compression looking strange - MS uses LZX-21 to compress their things (like files in installations of WinNT v <6).

Needed to set CompressionType and CompressionMemory differently from the example - to have a lot better compression:


;*** Sample Source Code MakeCAB Directive file example
;
.OPTION EXPLICIT ; Generate errors
.Set CabinetNameTemplate=Sample.cab   
.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single
  directory
.Set CompressionType=LZX; <---
.Set CompressionMemory=21 ; <---
  files
.Set UniqueFiles="OFF"
.Set Cabinet=on
.Set DiskDirectory1=SAMPLE.CAB
manifest.xml
WebPart1.dwp
SampleWebPartLibrary.dll
Image1.gif
help.htm
.Set DestinationDir=de-DE
de-DE\WebPart1.dwp
de-DE\image1.gif
de-DE\help.htm


Magnum

There are links from here to get all the cabinet utilities.

They have one that makes, view, etc. cabinet files.

Just follow the "yellow brick road."

http://support.microsoft.com/kb/310618
Have a great day,
                         Andy

Magnum

The compression is comparable to Winzip as you can see if you run the bat file.

Now to see if the utility can be redistributed.

The utility was first used when floppies were common.

Have a great day,
                         Andy

Antariy