DIFx not always working

Got a problem you cannot solve? Try here.
Post Reply
bobkoytc
Posts: 6
Joined: Mon Feb 07, 2011 8:15 am

DIFx not always working

Post by bobkoytc »

After making a small change to code that should have been irrelevant to what I was doing, two calls to DIFx stopped working.
A snapshot of my code is...
1 [DEFINE WEB MEDIA X-Kryptor CONFIDENTIAL Driver Install]
2 Get Component X-Kryptor CONFIDENTIAL Driver Install Selection State into Variable SELECTED
3 if Variable SELECTED Equals TRUE
4 end
5 Comment: TO-DO: Insert any additional install commands here
6 [compiler if Variable BUILDMODE Equals PATCH]
7 Apply Patch (get result into variable SUCCESS)
8 [compiler else]
9 if Variable ADVERTISE Equals TRUE
10 Apply Advertised (get result into variable SUCCESS)
11 else
12 Apply Install (get result into variable SUCCESS)
13 if Variable SUCCESS not Equals ERROR
14 if Variable SUCCESS not Equals CANCEL
15 Comment: Run the external Protocol Driver Installer and start the service
16 Run Program $PROGRAMFILES$\Bemac\SffdmuxInstall.exe /Install /Hide (WAIT)
17 Run Program $PROGRAMFILES$\Bemac\ServiceXkc.exe -i (WAIT)
18
19 Get System Setting Windows XP into CHECKSYSTEM
20 if Variable CHECKSYSTEM Equals TRUE
21 Comment: XP
22 DIFx Install x86 driver in folder $TARGETDIR$\sffd_pxp.inf
23 DIFx Install x86 driver in folder $TARGETDIR$\sffdcbaxp.inf
24 else
25 if Variable ARCH Equals X86
26 Comment: 32-bit Windows 7
27 DIFx Install x86 driver in folder $TARGETDIR$\sffd_pxp.inf
28 DIFx Install x86 driver in folder $TARGETDIR$\sffdcba.inf
29 else
30 DIFx Install x86 driver in folder $TARGETDIR$\sffd_p.inf
31 DIFx Install x86 driver in folder $TARGETDIR$\sffdcba.inf
32 end
33 end
34 end
35 end
36 end
37 [compiler end]

I'm trying to make code that will install different drivers dependent on wtether the OS is XP or Win7 32-bit or 64-bit
(Currently I'm only testing on XP, haven't got as far as Win7.)
Likes 22 and 23 get exectuted as expected and the drivers installed OK.
Lines 27/28 and 30/31 don't get executed.

This was all working fine but I noticed that on lines 30 and 31 it should be set to x64 not x86, so I changed these two lines.
When I do this, lines 22 and 23 get execuated as before, but the drivers DON'T get installed.
Change 30 and 31 back to x86 and it works again.

Now 30 and 31 shouldn't make any difference as they aren't being executed, but it's affecting something.
Anyone any ideas?

A further obsevrvation, I pruned my code down to just the XP bits as follows...
1 [compiler if Variable BUILDMODE Equals PATCH]
2 Apply Patch (get result into variable SUCCESS)
3 [compiler else]
4 if Variable ADVERTISE Equals TRUE
5 Apply Advertised (get result into variable SUCCESS)
6 else
7 Apply Install (get result into variable SUCCESS)
8 if Variable SUCCESS not Equals ERROR
9 if Variable SUCCESS not Equals CANCEL
10 Comment: Run the external Protocol Driver Installer and start the service
11 Run Program $PROGRAMFILES$\Bemac\SffdmuxInstall.exe /Install /Hide (WAIT)
12 Run Program $PROGRAMFILES$\Bemac\ServiceXkc.exe -i (WAIT)
13
14 Get System Setting Windows XP into CHECKSYSTEM
15 Comment: XP
16 DIFx Install x86 driver in folder $TARGETDIR$\sffd_pxp.inf
17 DIFx Install x86 driver in folder $TARGETDIR$\sffdcbaxp.inf
18 end
19 end
20 end
21 [compiler end]

This now runs fine and installs the drivers, unless I run in debug mode.
In debug, even without any breakpoints in, I can see it executing lines 16 and 17, it pauses on each as if it's doing something, but it doesn't install the drivers.
If I hit the Run button in the IDE instead of Debug, then it installs the drivers.
I'm puzzled!
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: DIFx not always working

Post by giaviv »

Dear bobkoytc,

To be honest, your post confused me a little :) Essentially you are reporting that drivers that install correctly without debugging do not when debugging?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
bobkoytc
Posts: 6
Joined: Mon Feb 07, 2011 8:15 am

Re: DIFx not always working

Post by bobkoytc »

Hi Aviv,

In effect, yes, what I'm saying is that if the second snippet of code is executed in debug, the drivers do not get installed, but if run normally they do.

I discovered this by accident after pruning down my code to try and solve the original problem I had.

The original problem (first code snippet) was that under normal running, the drivers got installed by the two DIFx calls that are executed when running under XP, but then stopped being installed when I changed some DIFx calls further down from x86 to x64.
These later calls don't even get executed when running under XP, but seem to be affecting the operation of the DIFx calls that do, further up.

Hope that explains things. Basically I have a problem and in investigating that I discovered a second problem.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: DIFx not always working

Post by giaviv »

Dear bobkoytc,

I understand. I can point to anything wrong with your code. Could it be that your actual drivers have been changed? Or that you are attempting to install the drivers twice? It sounds like there is an issue with the actual drivers rather than the MSIcode.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
bobkoytc
Posts: 6
Joined: Mon Feb 07, 2011 8:15 am

Re: DIFx not always working

Post by bobkoytc »

Hi,

No the drivers have not changed.
I run the installer in debug and it does not install the drivers.
I run it again 10 seconds later, nothing has changed, but this time I click the 'Run' button, and the drivers get installed.
Simple as that.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: DIFx not always working

Post by giaviv »

Dear bobkoytc,

My only guess is that this is a desired behavior. Namely, the debug executable of the install DIFx Driver Install command does not actually perform the installation in debug (somewhat like the File Bag command). Why does this behavior bother you?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
bobkoytc
Posts: 6
Joined: Mon Feb 07, 2011 8:15 am

Re: DIFx not always working

Post by bobkoytc »

Hi Aviv,

To be honest it doesn't bother me. We have gone off at a tangent somewhat.
This refers to the second part of my original post under "a further observation".

What I'm really interested in is the first part of my original post, above the "a further observation" bit.

Do you have any views on the main problem I'm having?

Tnx
Bob Coates
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: DIFx not always working

Post by giaviv »

Dear Bob,

Changing line 30 and 31 definitely should not affect line 23. That means that there's probably something wrong with your system (something that occurred before you changed lines 23). Maybe you are trying to install the drivers a second time (they are already installs) and that's the reason for the failure? Please test this on a clean machine and let me know.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
bobkoytc
Posts: 6
Joined: Mon Feb 07, 2011 8:15 am

Re: DIFx not always working

Post by bobkoytc »

Hi Aviv,

I always test using a clean install. My test machine has just XP installed (with all the MS updates) and then a disk image was made.
I restore that image to the hard drive each time I test, to ensure that the target machine is definitely clean and doesn't contain anything the installer may have put on.

I agree the problem is very weird, that's why I'm looking for help :-)

Bob Coates
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: DIFx not always working

Post by giaviv »

Dear Bob,

As of now, what is your status? Are you able to install the drivers at all?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply