Archive: Why? a bug?


Why? a bug?
I use a micro like this:
!insertmacro UpgradeDLL "dao360.dll" "$PROGRAMFILES\Common Files\Microsoft Shared\DAO\dao360.dll"

the micro like this:
!macro UpgradeDLL DLL_NAME DLL_LOCATION
...
GetDLLVersion ${DLL_LOCATION} $3 $4
.......
!endmacro

when I compile,error comes:
GetDLLVersion expects 3 parameters, got 5.
Usage: GetDLLVersion filename $(user_var: high output) $(user_var: low output)
Error in macro UpgradeDLL on macroline 8

error cause because the filepath string "...dao360.dll" has two space.
but if I don't call GetDLLVersion in micro, everything is OK!
or if I remove the two space in DLL_LOCATION , everything is OK,too!

how I can run:
!insertmacro UpgradeDLL "dao360.dll" "$PROGRAMFILES\Common Files\Microsoft Shared\DAO\dao360.dll"
with no error?
pls! I need your help!
:hang:


try this

GetDLLVersion "${DLL_LOCATION}" $3 $4


yes,It works but....
I try and it works.
but the Script Cause compile error in :
File /oname=${DLL_LOCATION} ${DLL_NAME}
Usage: File ([/a] [/r] filespec [...]|/oname=outfile one_file_only)
Error in macro UpgradeDLL on macroline 16

So I change it to:
File /oname="${DLL_LOCATION}" ${DLL_NAME}
it still the same error.

So why this comes?and How I can do? those error always in micro.
help me,pls!


This should do it:

File "/oname=${DLL_LOCATION}" ${DLL_NAME}

When a parameter may contain spaces, the quotes have to be placed around the whole parameter, not just the filename.


thx all!
I'm using it to handle my VB app installation. I works well except the .tlb file register. if this problem is OK, this setup tool will be perfect!


That's normal, you don't have to register type libraries.


This is my personal version of the UpgradeDLL macro... I made it at the same time as Kypec. However, it does not need any additional plugins like his version.
Hope you like it.