How to link a msvcr120.dll in an inverse recursive way after a Windows .exe binary deployment

ShadoLight ettienne.gilbert at gmail.com
Tue Sep 6 06:53:27 UTC 2022


On Tuesday, 6 September 2022 at 04:59:49 UTC, Mike Parker wrote:
> On Tuesday, 6 September 2022 at 04:36:55 UTC, ShadoLight wrote:
>
>>
>> True. In that case just distribute the DLL (taken from the DMD 
>> bin folder) alongside the HelloWorld EXE so that both reside 
>> in the same folder on the target computer.
>
> The proper way to do this is to ship the correct version of the 
> Visual C++ redistributable installer and run it as part of the 
> application install process:
>
> https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

Sure. But the OP seems to indicate that he doesn't have 
administrative privileges on the machines they wish to distribute 
and test his HelloWorld example.

I don't know if you can run an installer without administrative 
privileges - at least not if you want to write to Program Files / 
Program Files (x86), modify the Registry, environment variables, 
etc.  I'm not even sure if you can create a folder on Windows 10 
without administrative rights without resorting to some tricks. 
I've never required that - and would think that the IT department 
(that handles installs and updates on their organization's 
computers) should have an admin account on all of them.

My take was that he can simply copy the EXE and associated DLLs 
to an existing folder on the target machine if he just want to 
test it running on a non-developer machine.

Making an installer is another mini-project by itself .. not sure 
if he wants to be burdened with such a step simply to resolve his 
DMD issue.

But your redistributable installer link is indeed the proper way.


More information about the Digitalmars-d-learn mailing list