PDA

View Full Version : Why are both service files included?



NewsArchive
06-21-2012, 12:26 AM
I have this code - If its a 32 bit system, %64_BIT_OS% equals 0, else
1.

But, both support files are included, meaning that the 32 bit version
is overwritten by the 64 bit version.

I really do not understand why.

Best regards

Edvard Korsbęk

Set Variable %64_BIT_OS% to FUNCTION:Get System Info(WOW64 Status)
#set compiler variable [64_BIT_OS] = "%64_BIT_OS%"
If %64_BIT_OS% Equals "0" Then
#include support file "J:\easyflex\Salg\sqlncli\native client
10\32\sqlncli.msi"
Else
#include support file "J:\easyflex\Salg\sqlncli\native client
10\64\sqlncli.msi"
End

NewsArchive
06-21-2012, 12:28 AM
Attachment from the generated report

Edvard Korsbaek

NewsArchive
06-21-2012, 12:29 AM
Edvard,

> I have this code - If its a 32 bit system, %64_BIT_OS% equals 0,
> else 1.
>
> But, both support files are included, meaning that the 32 bit version
> is overwritten by the 64 bit version.
>
> I really do not understand why.

Well, both files are embedded because you include BOTH .msi files at COMPILE
time and you execute the 32-bit component on 32-bit machines and the 64-bit
component on 64-bit machines at RUNTIME.

Does this help?

BTW, the following line does not make sense:

#set compiler variable [64_BIT_OS] = "%64_BIT_OS%"

A compiler variable ([64_BIT_OS]) is resolved at compile time and a runtime
variable (%64_BIT_OS%) is resolved at installer runtime. In other words,
when you compile the setup.exe then you do not have any value for
"%64_BIT_OS% ;-)

Friedrich

NewsArchive
06-21-2012, 12:30 AM
Thanks!

So, just rename one of them, and call the right.


And, you are totally right, the last code is meaningless, and a bit
stupid.

Best regards

Edvard

NewsArchive
06-21-2012, 12:30 AM
Hi Edvard,

>
> So, just rename one of them, and call the right.
>

Yes, just rename the 32-bit sqlncli.msi to "sqlncli32.msi" and the 64-bit
sqlncli.msi to "sqlncli64.msi".

And if the two "sqlncli.msi" files are (too) large and cause a startup delay
(before the first installer dialog is displayed, the Support Files are
extracted to the temporary Windows folder) you can use the "Install File"
method as demonstrated in "rt_sqlcompact35.sbi".

Friedrich

NewsArchive
06-21-2012, 12:30 AM
BTW, rename the 32-bit sqlncli.msi to "sqlncli32.msi" and the 64-bit
sqlncli.msi to "sqlncli64.msi".

And I would suggest to use another method to package a component. Do not
"embed" the components as support files but do a temporary "install" to the
temporary Windows folder and then execute it.

As an example and starting point, see the "rt_sqlcompact35.sbi"

http://www.lindersoft.com/projects/rt_sqlcompact35_includescript.zip

Friedrich