Page 1 of 2

Free Software - PureInstall

Posted: Mon Aug 18, 2003 12:19 am
by Paul
For those who would like to package their application quickly without spending any money and still have it look professional, I have posted a FREE application packager for everyone to use...

http://www.reelmediaproductions.com/pureinstall

Of course it's written in PureBasic :)

View the QuickTour to learn how to use it!

Thank's

Posted: Mon Aug 18, 2003 12:49 am
by DominiqueB
Thank's a lot Paul.
Install worked great on XP pro.

Dominique.

Posted: Mon Aug 18, 2003 1:05 am
by Karbon
As always Paul, excellent work! Thank you!

Re: Free Software - PureInstall

Posted: Mon Aug 18, 2003 3:03 am
by PB
Looks great Paul -- but I have some suggestions. :)

(1) Can it default to C:\Program Files\MyApp instead of C:\MyApp?

(2) Maybe an option to accept an agreement before installation?

(3) Maybe prompt before uninstalling, in case user selects it by accident?

(4) Maybe an option to install MyApp.exe to the Windows Startup folder,
for apps that are meant to be run at startup?

(5) Delete all Registry entries created by PureInstall after uninstalling the
application (HKEY_LOCAL_MACHINE\SOFTWARE\PureInstall\MyApp).

Other than that -- good job, as I needed a small installer. :D

UPDATE:

Major bug: Crashes on Win98 SE (two such PCs tested). Crash occurs
when I click "Next" to start the actual install.

Small bug: The uninstall.bat file leaves the app's folder behind, instead of
deleting it. Well, I assume it should delete it. :wink:

Also, on systems with large fonts enabled, the 'Welcome to the MyApp
Installer Program' message at startup can wrap over two lines, with the
second line being cropped. This mainly happens if your app has a name
of around 10-20 characters, and again, this was tested on a PC with large
fonts enabled.

I gave a friend a test version to test the installation of one of my apps,
and he's running Windows NT, and he has this to say: "When I run the
installer, it kind of seems to freeze (or pause on a gray screen) for 4
seconds & [the CPU usage gopes to 100% during that time]... and then
it goes into the first welcome screen."

Over to you. 8)

Posted: Mon Aug 18, 2003 3:55 am
by Inner
Excellent :) thanks paul

Re: Free Software - PureInstall

Posted: Mon Aug 18, 2003 6:01 pm
by GPI
PB wrote:Looks great Paul -- but I have some suggestions. :)

(1) Can it default to C:\Program Files\MyApp instead of C:\MyApp?
Not a good idea. On my german windows this must:
c:\programme

Also the start-menu is in a diffrent directory
C:\WINDOWS\Startmenü\Programme

There are Windows-Functions for this (look in the IncludePack1 of japbe, the system.pbi)

Re: Free Software - PureInstall

Posted: Mon Aug 18, 2003 8:55 pm
by plouf
GPI wrote:
PB wrote:Looks great Paul -- but I have some suggestions. :)

(1) Can it default to C:\Program Files\MyApp instead of C:\MyApp?
Not a good idea. On my german windows this must:
c:\programme

Also the start-menu is in a diffrent directory
C:\WINDOWS\Startmenü\Programme

There are Windows-Functions for this (look in the IncludePack1 of japbe, the system.pbi)
there keys in registry telling you the path
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Startup
for the startup forlder in example (thats way most installers find the correct path )
and i agree that registry and folder should be removed at uninstallation

BTW nice cool tool

Re: Free Software - PureInstall

Posted: Mon Aug 18, 2003 9:05 pm
by GPI
>there keys in registry telling you the path
>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion
>\Explorer\Shell Folders\Startup
>for the startup forlder in example (thats way most installers find the correct
>path )

Thats the wrongest way, you can do this.
and i agree that registry and folder should be removed at uninstallation

little snap out of my system.pbi from the IncludePack1

Code: Select all

#GetPath_Desktop=0
#GetPath_Fonts = $14
#GetPath_Programs = $2
#GetPath_SendTo = $9
#GetPath_StartMenu = $B
#GetPath_StartUp = $7
#GetPath_Templates = $15
#GetPath_MyDocuments = $5
Procedure.s GetPath(Type); - Return the path of some system-directorys
  *itemid.Long = #NULL
  If SHGetSpecialFolderLocation_ (0, Type, @*itemid) = #NOERROR
    location$ = Space (#MAX_PATH+1)
    If SHGetPathFromIDList_ (*itemid, @location$)
      If Right(location$,1)<>"\" : location$+"\" : EndIf
      ProcedureReturn location$
    EndIf
  EndIf
EndProcedure
So you should do this, and it is secure for all Windows-Systems (also future ones).

The deinstall-programm should be in the software-panel, where all installed software is counted.

And under win98se, i had created a testfile, and the testfile can't install... (no crashes, but i get a errormessages).

Could it be, that the installer don't check if a file can packed, and when it can't pack it not store complete?

GPI

Posted: Mon Aug 18, 2003 9:28 pm
by plouf
So you agree that there is a way to get correct path of system path's :wink:

BTW what do you mean by "wrongest way" ? i have check this key on 98 2k, XP
and it is always there and correct :?:

Posted: Mon Aug 18, 2003 9:45 pm
by Paul
Hi Guys,

GPI: you are very close with your code snippet but you missed the constant that is actually needed to return the "Program Files" path :)
PureInstall already uses SHGetSpecialFolderLocation to retrieve the information needed to add items to the StartMenu.

plouf: Actually MS docs say you can use either to retrieve then "Program Files" path, but the Registry or the API call will work.

If you visit the PureInstall support forum, you will understand why the occasional install package will fail... and I'm waiting for Fred on this one ;)


Just a note, if you select "Help/Check for Online Updates" from the menubar, you will see if you are using the most up to date version of PureInstall.

Re: Free Software - PureInstall

Posted: Tue Aug 19, 2003 3:04 am
by PB
> > Can it default to C:\Program Files\MyApp instead of C:\MyApp?
>
> Not a good idea. On my german windows this must:
> c:\programme

Well, I meant default to the current system's default application folder,
which is C:\Program Files for English versions of Windows. :wink:

Re: Free Software - PureInstall

Posted: Tue Aug 19, 2003 3:16 am
by PB
Just tried v1.4 of PureInstall and when I ran the Uninstall.exe of a test app,
it reported: "Installer data has become corrupt... Program aborting!".
The folder I packaged consisted of just an exe and txt file, with no sub
folders.

Also, on Win98 SE it defaulted to an install path of "\MyApp\" (without any
drive letter), but it didn't crash like it did with v1.2 before.

Posted: Tue Aug 19, 2003 5:35 am
by Paul
Hi PB,

The Uninstaller is meant to be run from the StartMenu (that is why there is a link created for it). Anyway, I have now adjusted it so you can run it by directly clicking on the uninstall program.

As for the other problems, I will be happy when Microsoft drops support for 98 after Christmas, meaning everyone else is off the hook for having to try and support is also :)
Things that seem to work fine on newer OS's exhibit very strange behaviour on older OS's or just won't work right at all.

Anyway, I have posted an update and now I must talk to Fred about a few thing as I may have found some more PB bugs while tinkering with various options ;(

Posted: Tue Aug 19, 2003 6:52 am
by PB
I downloaded v1.5 but now when I choose Uninstall from the Start Menu
it leaves the app folder and Uninstall.exe there -- even though it said
that the app was uninstalled successfully. :?

> Things that seem to work fine on newer OS's exhibit very strange
> behaviour on older OS's or just won't work right at all.

True, but surely you can add extra code to work around that? :D

Posted: Tue Aug 19, 2003 8:17 am
by Rings
Paul wrote:As for the other problems, I will be happy when Microsoft drops support for 98 after Christmas, meaning everyone else is off the hook for having to try and support is also :)
Things that seem to work fine on newer OS's exhibit very strange behaviour on older OS's or just won't work right at all.
(
Could be my words ,

drop Win89! ;)