Setup doesn't create program group (Wfw 3.11) 
Author Message
 Setup doesn't create program group (Wfw 3.11)

I used to do some programming in Access 2.0, also with the ADT kit.
Creating a set of diskettes for distribution was a piece of cake.
Now I'm involved in a project using Visual Basic 4.0.
A  couple of consultants wrote a program for us and finally everything
seems to work just fine except for the installation procedure.
The program icon is just placed in the active group in program
manager. A special group isn't created. Whatever we try, the result is
the same.
The consultants cannot reproduce this on their systems.
Does anybody know how to solve this?

(Using windows NT, it works just fine)

Many thanks in advance,

Geert Wapstra



Wed, 10 Nov 1999 03:00:00 GMT  
 Setup doesn't create program group (Wfw 3.11)


14:08:38 GMT):

Quote:
>A  couple of consultants wrote a program for us and finally everything
>seems to work just fine except for the installation procedure.

It's so sad people write good programs and bad installers...

Quote:
>The program icon is just placed in the active group in program
>manager. A special group isn't created. Whatever we try, the result is
>the same.

You seemingly try the false! ;-)

Quote:
>The consultants cannot reproduce this on their systems.

Funny people you work with! Well, they seem to all be using
Win95 or WinNT and not checking whether their applications
work with Win3... that's a shame! (Tell them!)

Quote:
>Does anybody know how to solve this?

Yes, me.

Bye!

....no, just kidding:

Quickly stated I guess your so-called consultants use
separate subs to create a program group and to put icons in
there (for questions of general purpose).

OK, let's get to the code-part of the solution:

Say you use Label1 on Form1 for a DDE-connection to ProgMan.
Then the "Create Group"-command looks like

-----------
Sub CreateProgManGroup (groupname$, GroupPath$)
[.....]
Form1.Label1.LinkExecute "[CreateGroup(" + groupname$ +
Chr$(44) + GroupPath$ + ")]"

' Now if you use the Replace-/AddItem-method in a different
' sub STORE IT in a variable visible to the CreateItems-sub!
' (Global if you want to be sure).
' (Or pass the groupname with each call to your
' CreateItem-sub) right after this:

GroupNameForIcon$ = groupname$

[...]
End Sub
-----------

Now let's get over to the items:

-----------
Sub CreateProgManItem (CmdLine$, IconTitle$)
[.....]

' Get Windows Version to see whether we can use ReplaceItem
' (not provided before Win3.1):

WinVer& = GetVersion() And &HFFFF&

If Val(Format$(WinVer& Mod 256) + "." + Format$(WinVer& \
256)) >= 3.1 Then

  '  Call "ReplaceItem" before "AddItem" for WinVer >= 3.1
  '  to avoid multiple icons for the same file for a next
  '  installation

  Form1.Label1.LinkExecute "[ReplaceItem(" + IconTitle$ +
")]"

End If

' Now let's add the icon:

Form1.Label1.LinkExecute "[AddItem(" + CmdLine$ + Chr$(44) +
IconTitle$ + Chr$(44) + ",,)]"

' Now comes the part where I guess your problem is:
' Showgroup to ensure that ProgMan does not have
' a maximized group (would get problems with a later
' "RestoreProgman" that's surely part of your setup)

Form1.Label1.LinkExecute "[ShowGroup(" + GroupNameForIcon$ +
", 1)]"

[.....]
End Sub
-----------

See that we used the stored GroupNameForItem$ in the last
call. If this parameter is not correct (or empty as I guess
it probably is in your case) then the effect you described
shows up.

"Restore Progman" would be called when exiting the setup and
might look like this:

-----------
Sub RestoreProgMan ()
    On Error GoTo ErrorOccured
    AppActivate "Program Manager"
    SendKeys "%{ }{Enter}", True
ErrorOccured:
    Exit Sub
End Sub
-----------

That's all.

You should go and find some other consultants! ;-)

Best wishes, sorry I can't write dutch although livin 3
miles from it (Aken)... but I guessed it helped anyway.

Mathias Schiffer, Germany
-----------------------------------------------
VB-FAQ: http://home.sol.no/jansh/vb/default.htm
NG-tips: http://www.rat.de/metty/vbnews



Wed, 10 Nov 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can't get VB Setup Wizard to create Start/Program group

2. Help: Data Widget 3.11 : ValidateList event doesn't fire with SSDBCombo

3. Looking for a API to creating icons in a Windows 3.11 group

4. Visual Basic 4.0 and MsAccess 2.0 for WFW 3.11

5. PRB: Connect to SQL on NT 3.5 from WFW 3.11 via TCP/IP sockets

6. Reboot from VB4 on WfW 3.11

7. PRB: Connect to SQL on NT 3.5 from WFW 3.11 via TCP/IP sockets

8. Visual Basic 4.0 and MsAccess 2.0 for WFW 3.11

9. WFW 3.11 API Call

10. VB4 Professional on WFW 3.11

11. Long Filenames with WfW 3.11

12. 16 bit VB 4.0 install with WFW 3.11

 

 
Powered by phpBB® Forum Software