Hello all,
since Nettalk 11 requires the latest Visual C++ Redistributables installed on the target machine (because of the most recent OpenSSL), I added a check for these DLLs to make sure, that my server does not return "ERROR: -73 Unable to Listen on TCP Port".
It is probably recommended to add the VC++ Redistributables as an option to the SetupBuilder installation script. If this option is set under "Core Prerequisites", then the installer will look upfront for the existance of those VC++ Redistributables on the target machin. If not at present, the SB-installer will "fix that for you" <g> by simply installing the VC++ version 27702. It took we a while to get the script to accept my desire. But I won!
The SB-installer is now about 30 MB bigger than without those VC++ Redistributables. I tested it by removing the already installed pack from the compĆ¼ter and then called the installer. Indeed, right after its self-check the installer pops up a message, telling that VC++ Redistributables are missing, offering to install them upfront, before continuing.
If you want to test yourself, remove the pack by doing a right mouse-click on "Windows Start", select Settings -> Apps and scroll down to "Microsoft Visual C++ 2015-2019 Redistributable" and remove it. (Probably use a test-machine for this - don't blame me later if something gets screwed up!).
So, _IF_ the user has accepted to install that pack, your secure NT 11 should be good.
But what, if the user does _NOT_ accept that pack or the install goes well, but months later the user decides to simply copy the entire folder to another machine... which of course does not have any VC++ redistributables installed. I am pretty sure, it will take quite a long time to find that culprit. I would never ever think of missing that VC++ stuff!
Thats why I added some little check to my server administration program. At start up, it looks for a certain node in the Windows Registry. If not present or not being the version I need to rely on, then I display a message, urging to install that VC++ stuff and then quit.
The variables I use:
Bld ULONG
Installed ULONG
Major ULONG
Minor ULONG
Rbld ULONG
Version CSTRING(201)
The entries in the registry are using DWORD and SZ, so I choosed to use ULONG and CSTRING. It worked with LONG and STRING though.
During INIT of my program, I call a window procedure which is hidden.
Here I fill the variables mentioned above by reading the registry at
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86
like this:
Bld = GETREG(REG_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86','Bld')
Installed = GETREG(REG_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86','Installed')
Major = GETREG(REG_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86','Major')
Minor = GETREG(REG_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86','Minor')
Rbld = GETREG(REG_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86','Rbld')
Version = GETREG(REG_LOCAL_MACHINE, 'SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\X86','Version')
If nothing is installed at all, those numeric values are all 0 (zero).
IF Installed = 1 AND Bld >= 27702 ! Version 27702 gets installed by SB as of today
dbgView('All is fine!')
POST(EVENT:CloseWindow)
ELSE
! Either this or probably CHOOSE()
IF Installed = 0
?STRINGx{PROP:Text} = 'The VC++ Redistributable is not installed.'
ELSE
?STRINGx{PROP:Text} = 'The VC++ Redistributable is not up-to-date! Installed is ' & Version
END
0{PROP:Hide} = FALSE
END
If the user moves the server to a machine without VC++ Redistributables, he / she will get a notice either in the Admin-program now or will find a hint in some logfile.
With HyperActive then I provide a download-link directly to the Microsoft page
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloadsfor retrieving the VC++ stuff x86: vc_redist.x86.exe manually.
Wolfgang Orth