spgsitsupport Posted April 13, 2016 Report post Posted April 13, 2016 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 Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted April 13, 2016 Report post Posted April 13, 2016 Did you try? if intret = "0x40000101" or intret = 1073742081 then Quote Share this post Link to post Share on other sites More sharing options...
spgsitsupport Posted April 13, 2016 Report post Posted April 13, 2016 I will give it a go, I was just hoping to need only the hex for VB wrapper Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted April 13, 2016 Report post Posted April 13, 2016 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. Quote Share this post Link to post Share on other sites More sharing options...
spgsitsupport Posted April 18, 2016 Report post Posted April 18, 2016 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 Quote Share this post Link to post Share on other sites More sharing options...
Kingskawn Posted February 21, 2017 Report post Posted February 21, 2017 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 Quote Share this post Link to post Share on other sites More sharing options...