cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Randy40
Level 4

Programmatically deleting file from DriverStore folder in Vista

Hello, as part of cleanup prior to installing a 3rd party PDF converter driver on Vista systems, I need our InstallShield 2008 Premier Edition install to remove a specific file from a subfolder under the C:\Windows\System32\DriverStore\FileRepository folder. If I manually take ownership of the file I can delete it, but if I try to have the file deleted automatically through our InstallShield install the DeleteFile() method fails - I believe due to the strict Vista security inherent on that driver cache folder. Is there a way to delete the file using a method in InstallScript that satisfies Vista security? Any help would be appreciated. Thanks.

Regards,

Randy
Labels (1)
0 Kudos
(2) Replies
james83
Level 2

you can use DPInst.exe to delete driver packages from driverstore\filerepository. For more info, visit http://msdn.microsoft.com/en-us/library/ms790806.aspx.
But if you want to delete single file, then this won't help you.
0 Kudos
prolific
Level 2

james83 wrote:
you can use DPInst.exe to delete driver packages from driverstore\filerepository. For more info, visit http://msdn.microsoft.com/en-us/library/ms790806.aspx.
But if you want to delete single file, then this won't help you.


Hi,

How to use DPInst.exe in InstallScript to delete the entire FileRepository folder where our driver files are stored? As you know, the folder names are created by Windows so we do not know the folder name under FileRepository where the files are stored. Executing the DPInst.exe requires the directory path, right?
Example: C:\Windows\System32\DriverStore\FileRepository\_amd64_0634f445a8611d95

In Windows 8.1, our drivers are being called from the FileRepository folder even if we already have uninstall the Installer program. Our Installer program does not delete the FileRepository folder.

Hoping for any answer.

Mike
0 Kudos