Results 1 to 21 of 21

Thread: Distribution to Windows 11

  1. #1

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Distribution to Windows 11

    I have a program that I want to install on my wife's Windows 11 computer (does not have Visual Studio/6 on it). The program consists of a database, some jpg images and icons, References to DAO (probably not used any more but still exists in the list), ADO, MS Word, Scripting Runtime and MS Speech.
    Using The Package and Deployment feature, it asks me to include Jet 2.x: Jet 2.x along with include ODBC Direct and ODBC with Jet Workspaces. Which of these, if any, do I need to Include?
    I see a list of files to include (already checked):
    My Database
    My Executable
    COMDLG32.OCX
    DAO350.DLL
    expsrv.dll
    UNCHECKED: MDAC_TYP.exe
    msado60.lib
    MSFLGRD.OCX
    MS JET35.DLL
    MSJINT35.DLL
    MSJTER35.DLL
    MSRD2X35.DLL
    MSREPL35.DLL
    MSVCRT.DLL
    MSWORD.OLB
    RICHED32.DLL
    richtx32.ocx
    sapi.dll
    scrrun.dll
    SETUP.EXE
    SETUP1.EXE
    schwapi.dll
    ST6UNST.EXE
    VB5DB.DLL
    VB6 Runtime and OLE Automation
    VB6STKIT.DLL
    vbajet32.dll
    VBFLGRID13.OCX
    ...and a few jpg files were listed

    I do have an MSFlexGrid as well as a VBFlexGrid, and a Richtextbox (along with several other controls on 4 different forms).

    I want to make a single CAB file and then run the SetUp on my wife's computer. Before I attempt (and probably screw up her system), I kinda want to know about that Jet stuff above, as well as from that list above what I should include or not include. (Like also, why was MDAC unchecked...need it on modern computers?)
    Sam I am (as well as Confused at times).

  2. #2
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Distribution to Windows 11

    Sam,

    A list of any/all references checked off in the IDE_Menu/Project/References and the IDE_Menu/Project/Components would probably be more helpful.

    I can tell you that (under ...References), you don't have to worry about the msvbvm60.dll, vb6.olb, nor stdole2.tlb, as those come pre-installed with all the later versions of Windows.

    --------------

    Just looking at your list, much of that is also handled by Windows, and shouldn't be messed with in your installer. One example is that DAO350.DLL, as that should already be there. Regarding the rest of it, again, it'd be better to look at your project's "References" and "Components".

    ---------------

    And personally, dependent on what "Components" you've actually got, and considering that this is a one-time installation, I'd consider just copying them over and just manually registering them. Then, you could just copy over the executable and you should be all set. If you manually copy over components (i.e., OCX files), they're best placed in the C:\Windows\SysWow64 folder, then register them with RegSvr32.

    Another alternative is to pull together a manifest for your project, and put the SxS stuff in it for these OCX files. If that is done, you can just keep them with the executable (same folder), and then you don't have to "install" anything (nor put anything in her registry).
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  3. #3

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    I'll probably end up doing your manual registering of the components (are they all OCX's or could some be DLLs?), but I am interested more in your last option. I have never understood manifesting...what it is, how to do it, etc. S&S stuff? Could you explain...maybe PM me rather than here if more appropriate? And if I do that, then I could 'distribute/copy' just the directory with the executable (and that other stuff) in it, to any machine? If that latter is correct, would make my life a whole lot easier as I like to share certain programs with others as well (who don't have VB installed).

    Sorry for being so naive, but never really got into distributing stuff without installing VB on other computers.

    Sam

    PS Elroy, i could PM you my email address if that would be better to communicate this.
    Sam I am (as well as Confused at times).

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Distribution to Windows 11

    Just leaving DAO and Jet 3.5 behind can eliminate a great portion of that list. Some of it is dicey even ignoring that. A lot of the rest is already part of Windows and has not been deployable for decades.

    MSVCRT.DLL is problematic to deploy. It always has been even for the C programs it is designed for.

    With a little house cleaning you'll only have to worry about those OCXs. Jet 4.0 can open old 3.5 MDBs and use them just fine.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Distribution to Windows 11

    As Raymond Chen said:

    The code name for unpackaged app manifests was “fusion”, so if you read the documentation, you will frequently see them referred to as “fusion manifests”.
    The activeCodePage manifest element can be used for more than just setting UTF-8 as the active code page

    Of course Morts tend to mislabel these as side-by-side manifests. They aren't. That is something else entirely though related since they were also part of the fusion project.

    By rights the activation context information doesn't even belong in an application manifest, and instead in separate assembly manifests for each library. But it works, so now people blindly copy that behavior without knowing why or even that there is a choice.

  6. #6
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: Distribution to Windows 11

    To understand why the Package and Deployment Wizard includes so many files, you need to understand how it works. It goes through your project files, determines what external files you have referenced, and lists them automatically. Your first task should be to determine what references are really needed by going through the Project Components and Project References. During the process of building your project, you may have temporarily added references that you no longer use.

    Unlike Google, Microsoft generally updates support files backwards compatible. As long as there is a higher version on the target system, there is no need to include it in the setup.lst. That makes the support files somewhat bloated, but at least they should work. Generally there is no harm in including them in the list, because the wizard will not replace a newer version. The possible exception to that is database support files. Do not include them unless you absolutely have to. You can always not include something and then try it. If the support file is missing the executable will generally warn you. In my experience, the most commonly missing file is COMDLG32.OCX. In most cases, once you have installed one VB program on the target system, you can just copy the next executable and create the link.

    Hope this helps.

    J.A. Coutts

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Distribution to Windows 11

    It isn't that simple.

    For example there is a [Do Not Redistribute] section in VB6DEP.INI and you are responsible for updating this. Service Packs don't take care of that because they don't know what version of Windows your package will target, and in any case those stopped at SP6.

    There are also many *.DEP files used by the PDW. Few 3rd party libraries even bothered to include one, leaving the PDW to make guesses if there isn't a default set of values in VB6DEP.INI for a library.

  8. #8
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Distribution to Windows 11

    Hi Sam, I believe I've got your email somewhere, but sure, PM it to me.

    Also, I don't mind doing it all here either.

    I've been out of pocket today, and probably will be for most of the evening.

    I'll take a look at trying to work out a simple explanation of the SxS stuff. It's not all that difficult once you know what to put in the manifest, and I've got all of it for most (if not all) the standard OCX files.

    And yeah, unless you've done something really fancy, it'll just be for the OCX files you're using.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  9. #9
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Distribution to Windows 11

    And I just stared at your list a bit more. In addition to your executable, I believe all you'll need to copy over is:

    COMDLG32.OCX
    MSFLGRD.OCX
    richtx32.ocx (but there's a good chance that one is already there)
    VBFLGRID13.OCX

    I'm not positive, but I think there's a good chance of copying those over (into C:\Windows\SysWOW64) and then registering them with RegSvr32. And then you can put your executable anywhere you want and it'll probably run just fine.

    Again, tomorrow, I'll work on putting together a manifest for you, so you can just set those four OCX files in the same folder as your executable, with no need to register anything. That's basically what SxS (in a manifest) does for you.

    ----------

    That's pretty much the definition of "portable". If you do all the SxS/manifest stuff, you could even just run it off a thumb drive, plugged into any computer you wanted.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  10. #10

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    ELROY---
    I removed the CommonDialog as I could not see where I had ever used it (probably on an earlier build to save something somewhere). I removed all but two forms (only really need 2 for the bulk of the project---I kept the others in the directory to go back and improve them later.

    So, Yeah, I agree the RTB, MSFlex and VBFlex OCS's should be all I need (Those are the only three "non-standard" (if I can use that term) in my toolbox).

    As far as references, I have eliminated all but MS ADO 60, MS Speech Lib (allows me to listen to the Bible) (other than those usually checked in a new project). And the program runs and builds fine (so I know I have all the references I need).

    Yes, I will PM you my email as I am interested in this 'Manifest' thing....no rush at all. Got plenty to do (retired, by busier than when I was employed).

    Sam
    Sam I am (as well as Confused at times).

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Distribution to Windows 11

    Don't try to deploy any "ADO 60."

    Your best bet? Change your reference to ADO 2.5, the universal ADO typelib. Everything it references will be in any version of Windows 2000 onward. No later set of ADO interfaces are needed except for certain features in SQL Server or Oracle, most of which people seldom use anyway.

    Worse yet, ADO 6.0 was problematic. It doesn't exist past Windows 7 SP 1 and was replaced by ADO 6.1 in supported versions of Windows.

    Don't try to deploy sapi.dll, there is more to it than just that DLL and in any case it is already part of Windows and has been for a long while.


    If you try deploying those things Windows will defend itself and restore the proper versions. Your program may crash when its first run triggers the repair process.

    No, you don't just slop stuff into SysWOW64 and register it there. Lots of these libraries belong in very different locations. For redistributable libraries there should be an associated *.DEP file. That will tell you where the file should go.

  12. #12

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    Just changed to ADO 2.5.
    I obviously need the Speech Library in my program...what you are saying is to uncheck sapi.dll, correct?
    In my distribute directory I do not see any .DEP files.
    Sam I am (as well as Confused at times).

  13. #13

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    I also must add my database file, yes?

    The image below shows the location of the three dependent OCX's on my development computer...should I register them in those same places on the target?

    Name:  deploy.JPG
Views: 383
Size:  49.8 KB
    Sam I am (as well as Confused at times).

  14. #14
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Distribution to Windows 11

    The Package & Deploy Wizard will put those OCX files in the correct place, and register them. (Or you can manually copy-and-register them.)

    I'm curious why you think you need to distribute any JPG files. Typically, I just set those in an Image control (or PictureBox, or maybe Icon) Then they're in the FRX file of that form, and get compiled into the EXE when compiled. As such, you no longer need the JPG files (but I do tend to keep them with my source code). I suppose there are cases where you might re-read them during your program's execution though.

    Regarding your data files (or database), yeah, you'll want to include it as well. Where it will reside is a decision you'll need to make, possibly in the user's Documents folder.

    Beyond that, yeah, I think that'll be it.

    -----------------

    Regarding making a manifest, I'll work on getting that together for the MsFlxGrd.OCX and RichTx32.OCX a bit later. But I'm not sure what the VbFlxGrd13.OCX is. If you can work out how to get me a copy of that, I'll work out the manifest for that as well.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  15. #15

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    No idea why those jpgs were listed....nothing special about them...they are not even IN the two remaining forms of my project (I removed about 4 other forms which probably had them in them).

    So, just playing around today, i created a new CAB file without sapi, but with the other OCX's (richtextbox, VBFlexGrid and MSFlexGrid). Included my TWO databases (I know, should have just one, but I created one for a completely separate part of the program a couple years ago and just haven't 'combined' them.)

    So, dumb question, I know: If I run the Setup.exe (under my 'deploy' directory) on the target, all SHOULD work, right? But, mention of stuff earlier....Do I need to run the setup, OR simply copy and register the OCX's, copy the databases into a directory i will create, along with the Executable file, and that would be all I need???? (as far as DB location, as it is just a computer I have access to, it will work in the same directory as the Executable (like where I have it on my dev machine).

    The vbFlexGrid13.ocx is a recent (not most recent however...I think the latest is 1.6) version of Krool's FlexGrid. Once you email me, I can attempt to attach that ocx (if Gmail will allow) and send to you.
    Sam I am (as well as Confused at times).

  16. #16
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Distribution to Windows 11

    Quote Originally Posted by SamOscarBrown View Post
    If I run the Setup.exe (under my 'deploy' directory) on the target, all SHOULD work, right? But, mention of stuff earlier....Do I need to run the setup, OR simply copy and register the OCX's, copy the databases into a directory i will create, along with the Executable file, and that would be all I need????
    Ok, it's an either/or, not both. That Package-and-Deploy Wizard is just soooo old, that I don't really trust it. It does all kinds of things that just aren't needed (like try to install the VB6 runtimes, which have been pre-packaged with Windows since XP).

    If it were me, and this was truly just a one-time installation, I'd just copy the OCX's over into C:\Windows\SysWOW64, and then use RegSvr32 to register them. Then, I'd just copy the EXE over to some place appropriate, and also copy whatever data file, also putting it some place appropriate. Your EXE will need to know how to find the data file though.

    I'm thinking that, by registering those three OCXs, and then copying everything else, you're probably good to go.

    -------------------

    I'm also working on putting together a manifest for you as well (but still don't know how to produce the manifest info for VbFlxGrd13.OCX as I don't know what that is). I'll put a manifest together for MSFLGRD.OCX though, along with instructions on how you'd use it.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  17. #17
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Distribution to Windows 11

    Ok, here's how to manifest the MSFlxGrd.ocx for Side-by-Side (SxS) use.

    Sam, I'm not sure how much (if anything) you know about this stuff, so I'm going to just keep it all extremely simple. I apologize in advance if you already know some of this.

    ----------

    A manifest file is created separately with something like Notepad (or NP++). The contents of these manifest files is somewhat complex. However, for this SxS stuff, there are tools that do it for you. But, I won't go into that. I'll just give you what you need for the manifest file. Here it is (for preparing MSFlxGrd.ocx for SxS use):

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>  
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    
    <assemblyIdentity type="win32" name="dependencies" version="1.0.0.0" />
    
    <file name="msflxgrd.ocx">
        <comClass description="Microsoft FlexGrid Control, version 6.0 (SP6)" clsid="{6262D3A0-531B-11CF-91F6-C2863C385E30}" threadingModel="Apartment" progid="MSFlexGridLib.MSFlexGrid" tlbid="{5E9E78A0-531B-11CF-91F6-C2863C385E30}" />
        <comClass description="MSFlexGrid General Property Page Object"       clsid="{6319EEA0-531B-11CF-91F6-C2863C385E30}" />
        <comClass description="MSFlexGrid Style Property Page Object"         clsid="{275DBBA0-805A-11CF-91F7-C2863C385E30}" />
    </file>
    
    </assembly>
    For just MSFlxGrd.ocx, you'd save that info into a file that was named the same as your project name, and had an extension of .manifest. So, if your project is named Project1, the file would be named: Project1.manifest

    ----------

    Next, we've got to include this .manifest file into our project. It goes into an area called "Resources". ALL (or almost all) EXEs have a "Resources" section, but VB6 programmers often don't mess with it. To get things into this Resources section, we must load the VB 6 Resource Editor add-in, in the IDE. To do this, you have to get your Add-In Manager fired up (from the IDE's menu bar), calling up a window that looks something like the following:

    Name:  addinm.png
Views: 400
Size:  9.0 KB

    I tend to not keep this Resource Editor loaded, electing to just load it when I need it. That's why I've only checked the first checkbox. If you "Load on Startup", it'll always be loaded in the IDE.

    -----------

    Once the Resource Editor is loaded, you'll get a new button on your IDE's toolbar:

    Name:  Toolbar.jpg
Views: 395
Size:  11.0 KB

    If you click this new button, you'll have access to your project's resources. When developing (in the IDE), these resources will be saved in a file named YourProjectName.RES. Once compiled, they're all wrapped into the YourProjectName.EXE file.

    Once you click the Resource Editor button, you'll see something like the following:

    Name:  res.png
Views: 390
Size:  5.1 KB

    This just shows that there's (initially) not anything in your resources section (but actually compiling often puts a couple of things in there, but that's another story).

    You can drag-and-drop onto this Resources Window, and that's how I typically do it. We need to drag-and-drop our .manifest file into this Resource Window. Once we've done that, it should look like the following:

    Name:  res2.png
Views: 395
Size:  6.0 KB

    Ok, this next part is very important. Every (recent) executable (including VB6 executables), when they're initially started will look for a manifest in their resources. However, that resource (of the manifest) must have a Type = #24 and an Id = 1. I also typically set the Language to Neutral, but that doesn't really matter.

    To do this, we can double-click that 101 in the Resource Editor. That will open up a little Properties window for that resource. Once it's open you must change it's Type and Id (and Language if you like) to look like the following:

    Name:  TypeID.png
Views: 392
Size:  3.8 KB

    (continuing on another post so I can post more pictures)
    Last edited by Elroy; Jun 5th, 2023 at 03:39 PM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  18. #18
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,853

    Re: Distribution to Windows 11

    Once that's done, click "OK", and your Resource Editor window should look like the following:

    Name:  res3.png
Views: 384
Size:  8.3 KB

    You can now save your .RES file (for this project). Just use the little "Disk" icon on the Resource Editor's window. This resource file is actually saved separately from the rest of your project (but in the same source-code folder). Once it's saved, you can close this Resource Editor window and go back to the normal VB6 IDE.

    To test, you can compile your project and then try to execute it. Once this is all done, this executable will expect to find this MSFlxGrd.ocx in the same folder as the executable (i.e., side-by-side), and there's no need to register it.

    If you do all of this, and don't have this MSFlxGrd.ocx in the folder with the executable, you'll get the following error:

    Name:  Error.png
Views: 391
Size:  5.8 KB

    To correct that, I just went to my C:\Windows\SysWOW64 folder, grabbed a copy of this OCX file, and pasted it into the folder with the executable (which, for me, was also the folder with all the source code). Then, it all runs fine.

    That's about it. Once you've done this a couple of times, it's really not that bad at all. I've attached a Project1 with it all done, but it doesn't include the MSFlxGrd.ocx nor the Project1.exe, as those are both binary files (not allowed on these forums).

    So, to test it, you'll need to compile it, and also grab a copy of your MSFlxGrd.ocx, and throw it into the folder where you compile it. Then you can test.

    -------------

    Ok, a bit more information. When you're running in the IDE, you're not actually using your manifest (unless you actually manifest your VB6.EXE, which is an entirely different topic). You will only use the SxS stuff when you execute the compiled (EXE) program.

    -------------

    And just to return to how you actually "get" the information for an OCX to put into your manifest file, I typically use the MT.EXE tool, which is distributed by Microsoft, and is probably already on your computer. If I have access to the OCX files you're using, I'm willing to produce this information for you.

    Also, here's a link where I extensively talk about all this stuff.

    ------------

    One final note. To truly be portable, I actually pack the actual OCX files into the Resources section of my EXE file, and then unpack them when I need them, but that's also sort of another topic.

    ------------

    Best of luck with it.
    Attached Files Attached Files
    Last edited by Elroy; Jun 5th, 2023 at 03:38 PM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  19. #19

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    Well...seems like a great tutorial...but I got stuck early on. I already had my Resource Editor installed, so I opened it. I attempted to drag and drop my Bible2023.exe.Manifest file (created with Notepad), but it would not 'drop' (that big old circle- thing). According to your linked tutorial, I could 'open' it with the Open Icon, but that didn't work either...it only looks for .RES files. I did type in the filename "Bible2023.exe.Manifest" but that did not bring it in either.

    I sent my email via PM...if you'll reply I will send the OCX for the vbFlexGrid.

    Sam
    Sam I am (as well as Confused at times).

  20. #20

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    Never Mind, i finally was able to OPEN the manifest file using the custom icon, and saved it as Bible2023.RES in the same directory as my executable and the MSFlexGrid.OCX.

    I'll continue later today. Maybe without the manifest files of the RTB and the vbFlexGrid, I'll create my own sample like you did and test that one.

    Sam
    Sam I am (as well as Confused at times).

  21. #21

    Thread Starter
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Distribution to Windows 11

    I'm baaacckkk!
    Okay, so, to Elroy....
    I was able to create a sample program with that Manifest for the MSFlexGrid.
    You mentioned you would create a manifiest for the vbFlexGrid, yet you don't have it. I would like to send it to you via email so you can do that. I have downloaded our old friend LaVolpe's Manifest Creator II, however I have not a clue how to use it. For my Bible Project (to be distributed/copied to my wife's computer, I would need a manifest for not only the MSFlexGrid, but also the vbFlexGrid and the RichTextBox. Is it possible you can PM me with your email and I will send you the ocx for the vbFlexGrid?

    Sam
    Sam I am (as well as Confused at times).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width