1

I am having WDF driver installing using WiX installer via custom action using API DriverPackageInstall. but its failing with error "0x80030005" STG_E_ACCESSDENIED. I am running as admin (assuming no priviledge issues) created test "c" console application that is able to install driver successfully.

<InstallExecuteSequence>
     <Custom Action='UninstallDriver'
             After='InstallInitialize'>
                    REMOVE~="ALL" OR REINSTALL</Custom>
 </InstallExecuteSequence>      
  <CustomAction Id='UninstallDriver'
                BinaryKey='install_lib'
                DllEntry='InstallDriver'
                Execute='deferred'
                Impersonate="no"
                Return='check'/>

Not able to figure why is it failing enabled full logs and checked.

MSI (s) (E8:50) [11:56:09:296]: Invoking remote custom action. DLL: C:\Windows\Installer\XXXXXX.tmp, Entrypoint: InstallMyDriver
CustomAction InstallMY.XXXXX_9XX_XXXX_XXXX_XXXXXXXX returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 11:56:10: InstallFinalize. Return value 3.
MSI (s) (E8:38) [11:56:10:144]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (E8:38) [11:56:10:144]: User policy value 'DisableRollback' is 0
MSI (s) (E8:38) [11:56:10:144]: Machine policy value 'DisableRollback' is 0

Checked INF file is present at expected input location.

Any help appreciated.

user3664223
  • 305
  • 3
  • 19

1 Answers1

1

Similar Answer: WiX silent install unable to launch built in .EXE: WiX v3


Driver element: Why do you not use WiX's built-in difx:Driver element / construct? I am wondering if you have a system context / impersonation problem? By using the built-in driver element you get more "auto-magic" in the sense that you can avoid certain common problems that occur when you do things "manually".

Blast From The Past: Here is a previous answer which tersely describes this element. I have unfortunately not been able to test it properly myself: How do I use WiX to deploy an INF-based USB driver Plus all the start menu shortcuts and desktop icons

Testing: I would definitely give this element a try, just comment out your existing custom actions and give it a try.

<Component>
   <File ... /> 
   <difx:Driver ... />
</Component>

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thanks for quick response, it works fine with difx:Driver construct. – user3664223 Oct 16 '18 at 04:58
  • 1
    Great news. Please be sure to test deployment via SCCM or deployment systems if you can (to test for impersonation issues - the installation of your MSI without a logged on context and other strange issues). I also want to alert you to [**how driver installation seems to be changing**](https://stackoverflow.com/a/51845307/129130). Microsoft seems to want to eliminate driver installation as part of regular setups (or at least put the main driver distribution online via Windows Update). That is all I know basically. – Stein Åsmul Oct 16 '18 at 05:02
  • apologies for incomplete message, I think there are some issues with difx:Driver tag so we are suggested to use DriverPackageInstall. – user3664223 Oct 16 '18 at 05:09
  • I am not able to figure out what is causing error "0x80030005" STG_E_ACCESSDENIED, even after running as ADMIN – user3664223 Oct 16 '18 at 05:41
  • Is that an OLE2-related error? Hard to say much about it without some sort of log. I have never had success with it, but there is a switch to enable debugging information logging and to flush each log line for `msiexec.exe` (the latter should not be necessary, but maybe try it): `msiexec.exe /i Test.msi /L*vx! Test.log`. What are you doing in this driver? You don't mess with any user-specific files do you? – Stein Åsmul Oct 16 '18 at 06:44
  • 1
    As you understand I don't really know much about writing drivers. I was referring to user-context access in HKCU or user profile. I suppose you could do some `procmon.exe` on that console application you wrote that does the test install, just to see what is actually going on. – Stein Åsmul Oct 16 '18 at 07:15
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/181929/discussion-between-stein-asmul-and-user3664223). – Stein Åsmul Oct 16 '18 at 07:26