About AddSoftware directive in INF

I am testing INF AddSoftware function in my extension driver. My driver can download UWP APP from Windows Store by SoftwareID after driver is installed.

SoftwareType=2
SoftwareID=pfn://Publiser.xxxxxxx_xxxxxx

However if I uninstall the downloaded UWP APP manually, the APP will not be installed again even if I do following things:

  1. Reinstall driver (Uninstall Device & install inf)
  2. Update driver version
  3. Update APP version on Store

Is this normal behavior that the APP will not be installed again after user uninstalls it? Or is there any related information about this limitation? MSDN does not mention about this.

Removing the driver from the equation for a second, this is normal App Store behavior. The store respects the user’s choice to uninstall the app and will not force a re-install afterwards. The AddSoftware directive just kick starts the first time app install, it does not / cannot change the way the App Store evaluated the app state after the request to install.

From testing perspective, testers will have to reimage the test machine if verifying the driver again, is that correct?

One more question regarding to the flags of [DDInstall.Software], the msdn says the if the flags == 1, the AddSoftware process once for each device. Does it mean that each device has one chance to download the app from the app store? Per our testing, it looks that it behaves as same as the situation if flags == 0. What is the exact behaviour if flags is set as 1?

From a best practices perspective, reimaging is usually the right path anyway. Have a VM snapshot, and go back to that snapshot.

1 Like

@Marshall_Cai said:
From testing perspective, testers will have to reimage the test machine if verifying the driver again, is that correct?

One more question regarding to the flags of [DDInstall.Software], the msdn says the if the flags == 1, the AddSoftware process once for each device. Does it mean that each device has one chance to download the app from the app store? Per our testing, it looks that it behaves as same as the situation if flags == 0. What is the exact behaviour if flags is set as 1?

The flag doesn’t do much with AddSoftware type 2, it will technically re-evaluate whether it needs to download but won’t be necessary any time except initial install. For type 1 it would call the executable for each device instance.

Also note that after the user has removed the app, it will then show up in their app library so they can re-acquire it if they want, but there is no further automatic-acquisition path.