DIFx not always working
Posted: Mon Feb 07, 2011 8:41 am
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!
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!