Home All Groups Group Topic Archive Search About

Application setup (deployment) wizard bug

Author
6 Jul 2005 12:32 AM
Dan Ritchie
I am using VB5's application settup wizard to create a deployment for my
application.  However, I have noticed that the program does not create a
program group or removal tool for the application.  Instead, it drops a
single icon onto the start menu.
Since the setup program is written in VB and ships as source, I am looking
at it.  It seams there is a flag that determins if the OS is windows 95 or
NT, but it seams to be mistaken that I am running under windows 95 instead of
Windows XP.  Has anyone seen a fix for this?

Author
6 Jul 2005 2:43 PM
MikeD
"Dan Ritchie" <DanRitc***@discussions.microsoft.com> wrote in message
news:66731F5E-6603-4666-84BD-96562534193B@microsoft.com...
>I am using VB5's application settup wizard to create a deployment for my
> application.  However, I have noticed that the program does not create a
> program group or removal tool for the application.  Instead, it drops a
> single icon onto the start menu.
> Since the setup program is written in VB and ships as source, I am looking
> at it.  It seams there is a flag that determins if the OS is windows 95 or
> NT, but it seams to be mistaken that I am running under windows 95 instead
> of
> Windows XP.  Has anyone seen a fix for this?


Something you need to remember is that VB5 shipped way before Windows XP.
It's SetupWizard was never (AFAIK) updated to work under Win2000, let alone
WinXP.  You will very likely encounter other problems.  Your best bet is to
probably use something else. I don't know for certain if InnoSetup supports
VB5 or not, but if so, that would be a decent choice.

In looking at the Setup1 source code, it has 2 functions (well, 3 really,
but the 3rd simply checks if SP2 for WinNT4 is installed) to check for Win95
or WinNT.  It doesn't even check specifically for Win98 (as VB5 even came
out before that).  These functions are IsWindows95 and IsWindowsNT.  Both of
these call the same function, GetWinPlatform, exported by VB5STKIT.DLL.
Under WinXP, GetWinPlatform returns 1 (I tested this just now under XP),
meaning the *platform* is NT, which is what it should return. IOW, these
checks are only checking against the platform, not a specific version of
Windows.

Also, there's only 2 places I could find where it performs these platform
checks.  It checks for NT in the CopyFile function of Setup1.bas because
under NT, long file names are converted to short names. Likewise, when run
under WinXP or even Win2000 (because both those versions of Windows are an
NT platform), it would also convert long file names to short names.  It
checks for Win95 (actually, checks to see if NOT Win95) in the CopySection
function to determine if RICHED32.DLL can be installed. There's also a
TreatAsWin95 function.  This returns True if the OS is either Win95 or NT4
with the Desktop Shell Enhancement.  For the most part, it doesn't appear as
if many distinctions between Win95 and WinNT are made.

Both VB5's SetupWizard and VB6's Package and Deployment Wizard do not create
a program group unless there are 2 or more shortcuts.  Neither of them
create a shortcut for uninstalling.  They both, however, add an entry to
Control Panel's Add/Remove Programs for uninstalling. Neither of these are
bugs. They are both by design (which you can modify if you want by editing
the source code, recompiling Setup1.exe, and using your modified version
instead).


--
Mike
Microsoft MVP Visual Basic
Author
6 Jul 2005 4:20 PM
Jan Hyde
"Dan Ritchie" <DanRitc***@discussions.microsoft.com>'s wild
thoughts were released on Tue, 5 Jul 2005 17:32:01 -0700
bearing the following fruit:

>I am using VB5's application settup wizard to create a deployment for my
>application.  However, I have noticed that the program does not create a
>program group or removal tool for the application.  Instead, it drops a
>single icon onto the start menu.
>Since the setup program is written in VB and ships as source, I am looking
>at it.  It seams there is a flag that determins if the OS is windows 95 or
>NT, but it seams to be mistaken that I am running under windows 95 instead of
>Windows XP.  Has anyone seen a fix for this?

It's been a long time since I used the actual wizard, I
always edit the setup.lst

Look at the setup.lst, IRRC you can create a program group
thus;

[IconGroups]
Group0=My Program Group
PrivateGroup0=False
Parent0=$(Programs)

[My Program Group]
Icon1="$(AppPath)\SomeProg.exe"
Title1=SomeProg
StartIn1=$(AppPath)
Icon2="$(AppPath)\AnotherProg.exe"
Title2=Another Prog Title
StartIn2=$(AppPath)

etc



Jan Hyde (VB MVP)

--
The past does not repeat itself, but it rhymes.

Mark Twain

[Abolish the TV Licence - http://www.tvlicensing.biz/]