noisecrime
17th January 2005 18:06 UTC
InstallUpgradeDriver - Unknown error values
Hi,
I'm using Kuba Ober's InstallUpgradeDriver script from the NSIS archive to install a driver.
I've had a report of an error (5) returned from 'UpdateDriverForPlugAndPlayDevices' but have no idea what this means.
Unfortunately the author only added 1 error mask
; the masked value of ERROR_NO_SUCH_DEVINST is 523
!define ERROR_NO_SUCH_DEVINST -536870389
but there are others
ERROR_FILE_NOT_FOUND
ERROR_IN_WOW64
ERROR_INVALID_FLAGS
NO_ERROR
However i cannot find the error code for any of these, i think i need the Windows DDK, which i don't have and can't get.
Anyone here know the error codes for the 4 listed above (including NO_ERROR as that is an error) so i can add them to the code.
thanks
DrO
17th January 2005 19:31 UTC
assuming it's a standard windows error returned then i found...
5 Access is denied. ERROR_ACCESS_DENIED
-daz
fuct
15th January 2013 20:16 UTC
Resolution
I know this is an old thread, but here are some the following error values returned by, UpdateDriverForPlugAndPlayDevices. These error messages are a MUST for any device driver programmer!! i'll be adding the documentation to the NSIS's Wiki site shortly.
Code formatted for NSIS
!define NO_ERROR 0
!define ERROR_FILE_NOT_FOUND 2
!define ERROR_IN_WOW64 -536870347 ; 0xE0000235
!define ERROR_INVALID_FLAGS 1004 ; 0x3EC
!define ERROR_NO_SUCH_DEVINST -536870389 ; 0xE000020B
Another thing that should be noted about, UpdateDriverForPlugAndPlayDevices is the "
DWORD InstallFlags" parameter. Below are the values for that as well. Depending on your project the FORCE flag may be appropriate.
!define INSTALLFLAG_FORCE 0x1
!define INSTALLFLAG_READONLY 0x2
!define INSTALLFLAG_NONINTERACTIVE 0x4
A common one we will all run into now is, ERROR_IN_WOW64. Here's Microsoft's documentation on the subject:
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
As an FYI,
ERROR_NO_SUCH_DEVINST is defined by the following:
ERROR_NO_SUCH_DEVINST = (APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20B)
APPLICATION_ERROR_MASK = 0x20000000
ERROR_SEVERITY_ERROR = 0xC0000000