0

I have a WPF application which communicates with a device through serial port in Windows 10. My application is installed to a computer by using Setup.exe as shown by the following icon:

enter image description here

When one runs the Setup.exe it installs into the path:

C:\Users\myUserName\AppData\Local\DeployMyApp

with the following folders and files:

enter image description here

So far so good, but the thing is that a driver of the device also needs to be installed to be able to communicate with my WPF program.

And of course if I install the driver package(called dpinst64.exe) myself first and then run my application things work. But when I send my application to users, I would just want them to click Setup.exe once and it would first install dpinst64.exe and then the WPF.

But I also use auto updater Squirrel which checks the version each time the program is executed and updates the program if there is a new version. So the driver only needs to be installed if it is not installed.

1-) I have never dealt with such a situation before and would there be a workaround?

Basically how can I dictate Setup.exe to run to install the driver package first?

I use Nuget Package Explorer and create Setup.exe in Visual Studio by using the command: Squirrel --releasify MyNugetPackageName.nupkg

2-) If the above is not possible how can I check whether the driver is installed and if not prompt the user to install the driver when my program is executed?

user1999
  • 199
  • 8
  • Is Setup.exe your own program? If thats the case, you may be able to include dpinst64.exe as resource of your setup application and run it as first step. But if setup.exe is produced by a install tool, you'd focus on find how this tool manages the dependencies. Installers normally do, and offer options for that – zameb Jun 16 '21 at 18:06
  • No Setup.exe is installing my WPF program and packages. – user1999 Jun 16 '21 at 18:07
  • I also updated the question – user1999 Jun 16 '21 at 18:07
  • myApplication.exe is my program. Setup.exe is acting like an installer. – user1999 Jun 16 '21 at 18:10
  • Not familiar with Squirrel, looks great! I would do something in the line of coding and calling a CheckDependencies() method (done by yourself) before updateManager.UpdateApp(). In CheckDependencies method I would do a driver check like https://stackoverflow.com/a/23331286/8044750, including one extra line of code to call the driver installer... if this doesn't help, let's wait for others to give better advice :) – zameb Jun 16 '21 at 18:17

0 Answers0