Jump to content



spgsitsupport

dpinst exit code



Recommended Posts

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

Share this post


Link to post
Share on other sites


GarthMJ    116

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.

Share this post


Link to post
Share on other sites
Kingskawn    2

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×