Post Go back to editing

I need assistance in setting up a silent install script to install Scopy on Windows, with the drivers.

Thread Summary

The user is attempting to create a silent installation script for Scopy on Windows, including the necessary drivers. The final answer suggests using the Scopy portable zip file for the application and running dpinst.exe with /se /q parameters for a silent driver installation. However, the user encounters issues with unsigned drivers and hardware not being present during the installation, which prevents the drivers from installing silently. The user is advised to ensure the hardware is connected and to check if the drivers are signed.
AI Generated Content

I need assistance in setting up a silent install script to install Scopy on Windows, with the drivers.

I have tried several ideas including using the save file option to install and save the info to an inf file and pointing to it during the install. If I told it to install drivers, then it prompts the user with a gui to install drivers.

If I told it not to install drivers, and I try to silently install the drivers after Scopy installs, then it doesn't install the drivers. 

I also create a log file during the install but there is no useful information in there to point to what is not working correctly.

I thank you for any assistance I can get to create this install.

Parents Reply
  • Oh, no, that isn't helping at all, I already had looked at those files during my troubleshooting process. I need the developers to chime in and give me some assistance because I am running these with an Admin install tool that elevates the privileges and the installs are not acting right to give us a fully unattended install. Manual install is fine. If the developers see what I have posted above, they may be able to tell me if I need to change an option or do something differently. Thanks anyway.

Children
  • I am the main developer of Scopy. We have not developed the installer tool ourselves, but rather dpinst is a driver install tool from Microsoft.

    You can compare the output of dpinst.exe /c  (user install)

    and the output of dpinst.exe /se /q /c (unattended install) -

    On my machine the output is the same.for both.

    We can look into the logs but it sounds like your issue is not driver specific but rather install tool specific, and we cannot really advise on dpinst behavior.

  • Ah, well, that makes sense, I have run the dpinst.exe installs many times before from other driver suppliers without issue but didn't use those switches. Only used /s before, which also does not help in this instance. What does the /c do? Is there a log for dpinst when it runs? When I save the Scopy install to the Scopy.inf and choose to add the drivers through there, I get the same results where it want to ask the user to click next when it tries to install the drivers after installing Scopy. And I can send that install to a log file bit it didn't reveal anything about why it asks for user intervention. It is like it is not passing along the run silent switches.

    Is there someone I should talk to that supplied that driver install for this product?

    Thank you for your response and assistance.

  • c:\Program Files\Analog Devices\PlutoSDR-M2K>dpinst.exe /h
    
    C:\Program Files\Analog Devices\PlutoSDR-M2K\dpinst.exe: installs and uninstalls driver packages.
    By default, the tool searches the current directory and tries to install all driver packages found.
    
    Usage: C:\Program Files\Analog Devices\PlutoSDR-M2K\dpinst.exe [/U INF-file][/S | /Q][/LM][/P][/F][/SH][/SA][/A][/PATH Path][/EL][/L LanguageID][/C][/D][/LogTitle Title][/SW][/? | /h | /help]
    
    /U INF-file Uninstall a driver package (INF-file).
    /S | /Q Silent (Quiet) mode. Suppresses the Device Installation Wizard and any dialogs popped-up by the operating system.
    /LM Legacy mode. Accepts unsigned driver packages and packages with missing files. These packages won't install on the latest version of Windows.
    /P Prompt if the driver package to be installed is not better than the current one.
    /F Force install if the driver package is not better than the current one.
    /SH Scans hardware for matching devices and only copies and installs those drivers for which a device is present. Only valid for Plug and Play drivers.
    /SA Suppress the Add/Remove Programs entry normally created for each driver package.
    /A Install all or none.
    /PATH Path Search for driver packages under the given path.
    /EL Enables all languages not explicitly listed in the XML file.
    /L LanguageID Tries to use the given language in all UI. Useful for localization tests.
    /SE Suppress the EULA.
    /C Dump logging output to attached Console (Windows XP and above).
    /D Delete driver binaries on uninstall.
    /SW Suppresses the Device Installation Wizard, the operating system might still pop-up user dialogs.
    /? | /h | /help Shows this help.
    
    c:\Program Files\Analog Devices\PlutoSDR-M2K>

    /C dumps output to the console 

    Scopy install will not call dpinst with the silent switches. This is coded in the installer script here: https://github.com/analogdevicesinc/scopy/blob/master/scopy.iss.cmakein#L264 . The drivers are created by us, and packaged with the dpinst installer according to the xml I previously linked. dpinst is a Microsoft tool, and not developed/maintained by us. You can try contacting Microsoft :) 

    Did you try running dpinst in the Windows Console and the switches are not passed ? Or this only happens during autmoatic installation ? (it sounds like there is an issue with the your particular setup and not the driver itself).

    The help also mentions that dpinst "searches the current directory". Can you try changing the working directory before calling it ? (i see you are running it like this - "PlutoSDR-M2K\dpinst.exe" )

  • I unpacked your drivers from Github and that is the folder it created, so I am really calling it like this: Call "%~dp0PlutoSDR-M2K\dpinst.exe" /se /q, and I have a feeling from what I am seeing is that in a silent mode it runs using the dpinst.xml, which in any of the copies I have are very generic and have no unattend commands in them, so I may try to edit one and see if I can make it run.

    However I appreciate the switch info above for dpinst.exe, I may try some out of there and see if I can get a log and try to get that to run unattended.

    Oh, and for testing the commands, I use an elevated command prompt to run a batch file with the commands in it until I find one that works, then I put them into a package for deployment.

    Thanks again for so much info.

  • So now using some of the new switches and the /c I can see it has two return codes, one of which indicates that a driver in the folder is not signed. ( 0xE0000242 and 0x80040000 ) 

  • as it turns out, as I remove one driver at a time that it fails on, that it fails on all the inf files in that folder. 

  • I may be wrong, but as far as i know, inf files are cleartext, so they cannot be signed.

     The files that are signed are the cat files which are signed on my machine.

    For reference the output on my PC is 

    C:\Program Files\Analog Devices>PlutoSDR-M2K\dpinst.exe /c /se /q
    
    INFO: Option set: dumping log info to console.
    INFO: Current working directory: 'C:\Program Files\Analog Devices\PlutoSDR-M2K'
    INFO: Running on path 'C:\Program Files\Analog Devices\PlutoSDR-M2K'
    INFO: DPInst.xml does not list the current UI language.
    INFO: User UI Language is 0x409.
    INFO: Install option set: Running in quiet mode. Suppressing Wizard and OS popups.
    INFO: Install option set: Suppressing EULA.
    INFO: Found driver package: 'C:\Program Files\Analog Devices\PlutoSDR-M2K\pluto-cdc-acm.inf'.
    INFO: Found driver package: 'C:\Program Files\Analog Devices\PlutoSDR-M2K\pluto-dfu.inf'.
    INFO: Found driver package: 'C:\Program Files\Analog Devices\PlutoSDR-M2K\pluto-rndis.inf'.
    INFO: Found driver package: 'C:\Program Files\Analog Devices\PlutoSDR-M2K\pluto-usbd.inf'.
    INFO: Preinstalling 'c:\program files\analog devices\plutosdr-m2k\pluto-cdc-acm.inf' ...
    INFO: ENTER: DriverPackagePreinstallW
    INFO: Driver package is already preinstalled 'c:\program files\analog devices\plutosdr-m2k\pluto-cdc-acm.inf'.
    SUCCESS:c:\program files\analog devices\plutosdr-m2k\pluto-cdc-acm.inf is preinstalled.
    INFO: RETURN: DriverPackagePreinstallW (0xB7)
    INFO: ENTER: DriverPackageGetPathW
    INFO: RETURN: DriverPackageGetPathW (0x0)
    INFO: Preinstalling 'c:\program files\analog devices\plutosdr-m2k\pluto-dfu.inf' ...
    INFO: ENTER: DriverPackagePreinstallW
    INFO: Driver package is already preinstalled 'c:\program files\analog devices\plutosdr-m2k\pluto-dfu.inf'.
    SUCCESS:c:\program files\analog devices\plutosdr-m2k\pluto-dfu.inf is preinstalled.
    INFO: RETURN: DriverPackagePreinstallW (0xB7)
    INFO: ENTER: DriverPackageGetPathW
    INFO: RETURN: DriverPackageGetPathW (0x0)
    INFO: Preinstalling 'c:\program files\analog devices\plutosdr-m2k\pluto-rndis.inf' ...
    INFO: ENTER: DriverPackagePreinstallW
    INFO: Driver package is already preinstalled 'c:\program files\analog devices\plutosdr-m2k\pluto-rndis.inf'.
    SUCCESS:c:\program files\analog devices\plutosdr-m2k\pluto-rndis.inf is preinstalled.
    INFO: RETURN: DriverPackagePreinstallW (0xB7)
    INFO: ENTER: DriverPackageGetPathW
    INFO: RETURN: DriverPackageGetPathW (0x0)
    INFO: Preinstalling 'c:\program files\analog devices\plutosdr-m2k\pluto-usbd.inf' ...
    INFO: ENTER: DriverPackagePreinstallW
    INFO: Driver package is already preinstalled 'c:\program files\analog devices\plutosdr-m2k\pluto-usbd.inf'.
    SUCCESS:c:\program files\analog devices\plutosdr-m2k\pluto-usbd.inf is preinstalled.
    INFO: RETURN: DriverPackagePreinstallW (0xB7)
    INFO: ENTER: DriverPackageGetPathW
    INFO: RETURN: DriverPackageGetPathW (0x0)
    INFO: ENTER: DriverPackageInstallW
    INFO: Installing INF file 'c:\program files\analog devices\plutosdr-m2k\pluto-cdc-acm.inf' (Plug and Play).
    INFO: Looking for Model Section [DeviceList.NTamd64]...
    INFO: Installing devices with Id "USB\VID_0456&PID_B673&REV_0510&MI_03" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-cdc-acm.inf_amd64_52287b43598a29b1\pluto-cdc-acm.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Installing devices with Id "USB\VID_0456&PID_B672&REV_0504&MI_03" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-cdc-acm.inf_amd64_52287b43598a29b1\pluto-cdc-acm.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Installing devices with Id "USB\VID_0456&PID_B672&REV_0510&MI_03" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-cdc-acm.inf_amd64_52287b43598a29b1\pluto-cdc-acm.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Marked Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0504&MI_03' for reinstall on next plug-in.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B673&REV_0510&MI_03' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-cdc-acm.inf_amd64_52287b43598a29b1\pluto-cdc-acm.inf' installed on it.
    INFO: Marked Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0504&MI_03' for reinstall on next plug-in.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B673&REV_0510&MI_03' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-cdc-acm.inf_amd64_52287b43598a29b1\pluto-cdc-acm.inf' installed on it.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0510&MI_03' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-cdc-acm.inf_amd64_52287b43598a29b1\pluto-cdc-acm.inf' installed on it.
    INFO: No drivers installed. No devices found that match driver(s) contained in 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-cdc-acm.inf_amd64_52287b43598a29b1\pluto-cdc-acm.inf'.
    INFO: RETURN: DriverPackageInstallW (0xE000020B)
    INFO: No matching device was found for 'c:\program files\analog devices\plutosdr-m2k\pluto-cdc-acm.inf'. Driver will be installed when plugged in.
    INFO: ENTER: DriverPackageInstallW
    INFO: Installing INF file 'c:\program files\analog devices\plutosdr-m2k\pluto-dfu.inf' (Plug and Play).
    INFO: Looking for Model Section [libusbDevice_WinUSB.NTamd64]...
    INFO: No matching devices found in INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-dfu.inf_amd64_03f9e3a1f21ed276\pluto-dfu.inf" on the Machine.
    INFO: No drivers installed. No devices found that match driver(s) contained in 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-dfu.inf_amd64_03f9e3a1f21ed276\pluto-dfu.inf'.
    INFO: RETURN: DriverPackageInstallW (0xE000020B)
    INFO: No matching device was found for 'c:\program files\analog devices\plutosdr-m2k\pluto-dfu.inf'. Driver will be installed when plugged in.
    INFO: ENTER: DriverPackageInstallW
    INFO: Installing INF file 'c:\program files\analog devices\plutosdr-m2k\pluto-rndis.inf' (Plug and Play).
    INFO: Looking for Model Section [LinuxDevices.NTamd64]...
    INFO: Installing devices with Id "USB\VID_0456&PID_B673&REV_0510&MI_00" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-rndis.inf_amd64_91eb70d626dd571b\pluto-rndis.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Installing devices with Id "USB\VID_0456&PID_B672&REV_0510&MI_00" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-rndis.inf_amd64_91eb70d626dd571b\pluto-rndis.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Installing devices with Id "USB\VID_0456&PID_B672&REV_0504&MI_00" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-rndis.inf_amd64_91eb70d626dd571b\pluto-rndis.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B673&REV_0510&MI_00' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-rndis.inf_amd64_91eb70d626dd571b\pluto-rndis.inf' installed on it.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0510&MI_00' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-rndis.inf_amd64_91eb70d626dd571b\pluto-rndis.inf' installed on it.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B673&REV_0510&MI_00' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-rndis.inf_amd64_91eb70d626dd571b\pluto-rndis.inf' installed on it.
    INFO: Marked Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0504&MI_00' for reinstall on next plug-in.
    INFO: Marked Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0504&MI_00' for reinstall on next plug-in.
    INFO: No drivers installed. No devices found that match driver(s) contained in 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-rndis.inf_amd64_91eb70d626dd571b\pluto-rndis.inf'.
    INFO: RETURN: DriverPackageInstallW (0xE000020B)
    INFO: No matching device was found for 'c:\program files\analog devices\plutosdr-m2k\pluto-rndis.inf'. Driver will be installed when plugged in.
    INFO: ENTER: DriverPackageInstallW
    INFO: Installing INF file 'c:\program files\analog devices\plutosdr-m2k\pluto-usbd.inf' (Plug and Play).
    INFO: Looking for Model Section [libusbDevice_WinUSB.NTamd64]...
    INFO: Installing devices with Id "USB\VID_0456&PID_B673&REV_0510&MI_05" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-usbd.inf_amd64_d34000f2ea421b55\pluto-usbd.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Installing devices with Id "USB\VID_0456&PID_B672&REV_0510&MI_05" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-usbd.inf_amd64_d34000f2ea421b55\pluto-usbd.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Installing devices with Id "USB\VID_0456&PID_B672&REV_0504&MI_05" using INF "C:\WINDOWS\System32\DriverStore\FileRepository\pluto-usbd.inf_amd64_d34000f2ea421b55\pluto-usbd.inf".
    INFO: Installation did not occur because the hardware isn't currently present.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B673&REV_0510&MI_05' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-usbd.inf_amd64_d34000f2ea421b55\pluto-usbd.inf' installed on it.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0510&MI_05' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-usbd.inf_amd64_d34000f2ea421b55\pluto-usbd.inf' installed on it.
    INFO: Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B673&REV_0510&MI_05' already has 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-usbd.inf_amd64_d34000f2ea421b55\pluto-usbd.inf' installed on it.
    INFO: Marked Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0504&MI_05' for reinstall on next plug-in.
    INFO: Marked Phantom Device with Hardware/Compatible Id 'USB\VID_0456&PID_B672&REV_0504&MI_05' for reinstall on next plug-in.
    INFO: No drivers installed. No devices found that match driver(s) contained in 'C:\WINDOWS\System32\DriverStore\FileRepository\pluto-usbd.inf_amd64_d34000f2ea421b55\pluto-usbd.inf'.
    INFO: RETURN: DriverPackageInstallW (0xE000020B)
    INFO: No matching device was found for 'c:\program files\analog devices\plutosdr-m2k\pluto-usbd.inf'. Driver will be installed when plugged in.
    INFO: Returning with code 0x400

    There is an option to allow unsigned packages (/LM) although I don't think that is the correct approach.

    -Adrian

  • Right, the inf files point windows to the cat files so by eliminating each inf file one by one I skipped it trying to install it's related cat file.

    The LM switch states it will not work with newer Windows:

    /LM Legacy mode. Accepts unsigned driver packages and packages with missing files. These packages won't install on the latest version of Windows.

    I actually tried it and it didn't work.

    Inherently Windows will not install unsigned drivers as a security feature and trying to do this automated won't install unsigned drivers, they will need to be signed.

    When doing it with the wizard it can allow unsigned drivers.