Skip to content

dpinst exit code

Featured Replies

DPInst Return Codes:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff544790(v=vs.85).aspx

 

So I have Synaptics Dell Trackpad that I want to install with dpinst (no, I do not want to do PNP)

 

So the success return code is 40000101

 

Of course I can use converted value of 1073742081 in TS

 

But I would prefer to use VB wrapper to return 0 if the actual code was 40000101

on error resume next
Set sho = CreateObject("WScript.Shell")
strCurrentDir = Left(Wscript.ScriptFullName, (InstrRev(Wscript.ScriptFullName, "\") -1))
strcmd = strcurrentDir & "\dpinst.exe /s /sw /se /sa"
intret=sho.run(strcmd,0,vbtrue)
 
if intret = "0x40000101" then
  wscript.quit(0)
 else
  wscript.quit(intret)
end if

The above works fine for installation, but it still gives in log

 

Process completed with exit code 1073742081 InstallSoftware 13/04/2016 08:23:28 552 (0x0228)
Command line returned 1073742081 InstallSoftware 13/04/2016 08:23:28 552 (0x0228)
Process completed with exit code 1073742081 TSManager 13/04/2016 08:23:28 2436 (0x0984)

not the expected 0

 

Where did I go wrong?

 

Seb

If I remember right, and I'm not saying I do, but quote marks might mean it is a string and not a number. Therefore it will not convert the exit code to hex.

  • Author

I had it originally without " " but VB complained

 

If I do

 

if intret = "0x40000101" or intret = 1073742081 then

 

then it works OK, not ideal, but works

  • 10 months later...

The error code is depending how much updates you install I see? There's a calculator here http://www.msierrors.com/tag/dpinst/

 

I've got 0x80000000 (no drivers to install) and then 0x40000405 (4 drivers installed). This code is given at the end of the logfile in %windir%\dpinst.log. Is it possible to give a list of error codes? like

 

if intret = "0x40000101" or intret = 1073742081 or "0x40000405" or "0x80000000" then

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.