Jump to content


We use cookies to let you log in, for ads and for analytics. OK

Photo

dpinst exit code





  • Please log in to reply
5 replies to this topic

#1 spgsitsupport

spgsitsupport

    Advanced Member

  • Established Members
  • PipPipPip
  • 165 posts

Posted 13 April 2016 - 07:56 AM

DPInst Return Codes:

http://msdn.microsof...0(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





#2 GarthMJ

GarthMJ

    Advanced Member

  • Moderators
  • PipPipPip
  • 1,407 posts
  • Gender:Male
  • Location:Ottawa, Ontario, Canada

Posted 13 April 2016 - 12:38 PM

Did you try?

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


Garth Jones

Enhancing Your Business 

Blog

 


#3 spgsitsupport

spgsitsupport

    Advanced Member

  • Established Members
  • PipPipPip
  • 165 posts

Posted 13 April 2016 - 02:03 PM

I will give it a go, I was just hoping to need only the hex for VB wrapper



#4 GarthMJ

GarthMJ

    Advanced Member

  • Moderators
  • PipPipPip
  • 1,407 posts
  • Gender:Male
  • Location:Ottawa, Ontario, Canada

Posted 13 April 2016 - 03:22 PM

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.


Garth Jones

Enhancing Your Business 

Blog

 


#5 spgsitsupport

spgsitsupport

    Advanced Member

  • Established Members
  • PipPipPip
  • 165 posts

Posted 18 April 2016 - 08:59 PM

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



#6 Kingskawn

Kingskawn

    Advanced Member

  • Established Members
  • PipPipPip
  • 216 posts
  • Gender:Male
  • Location:Center of Europe

Posted 21 February 2017 - 02:11 PM

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users