Page 1 of 1

package to copy a DLL

Published: November 13, 2017 - 2:39 PM
by ryoken95
Hello,

I think I've missed something, but when I try to create a package to copy a DLL, I get the following error message:

NameError: name 'makepath is not defined'.


Can you help me fix my error? Here is my code:

def install():
print('installing vjf-msvcr71_64bit')
source_filename = 'msvcr71.dll'
dest_filename = makepath(windows,'syswow64',source_filename)
filecopyto(source_filename,dest_filename)
run(r'"regsvr32.exe /s msvcr71.dll"')

Thank you in advance for your help.

Re: Package to copy a DLL

Published: November 13, 2017 - 3:20 PM
by htouvet

Code: Select all

from setuphelpers import *

def install():
    print('installing vjf-msvcr71_64bit')
    source_filename = 'msvcr71.dll'
    dest_filename = makepath(system32(),source_filename)
    filecopyto(source_filename,dest_filename)
    run(r'regsvr32.exe /s "%s"' % dest_filename)
But the msvcr71 DLL is not registered with regsvr32; it is not a COM object or an OCX object

Re: Package to copy a DLL

Published: November 13, 2017 - 3:51 PM
by ryoken95
Thanks for the correction, :)

but the DLL does register correctly with this command: `regsvr32.exe /s msvcr71.dll`.

I just tested it again and it works.