# Error: Could not delete driver



## ssawgift (Apr 15, 2019)

Occasionally (or more frequently recently) I get this error messagebox after logoff/logon or reboot. I'm running Windows 10 Pro and it seems the problem does not relate to any specific build.


----------



## eidairaman1 (Apr 15, 2019)

ssawgift said:


> Occasionally (or more frequently recently) I get this error messagebox after logoff/logon or reboot. I'm running Windows 10 Pro and it seems the problem does not relate to any specific build.



What driver?


----------



## kastriot (Apr 15, 2019)

Try to start windows in safe mode and see if that helps, if not look in event viewer what driver specifically cannot be deleted.


----------



## Naki (Apr 15, 2019)

ssawgift said:


> Occasionally (or more frequently recently) I get this error messagebox after logoff/logon or reboot. I'm running Windows 10 Pro and it seems the problem does not relate to any specific build.


Can you attach a screenshot?


----------



## Deleted member 67555 (Apr 15, 2019)

You need to view Non present devices in device manger and eliminate the problem driver then manually update the device drivers manually in device manger

Open cmd prompt under admin and type
SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
Then type from start menu.
_devmgmt.msc to go into device manger.
I'm not at my PC and I'm not sure if that's correct... Going from memory.. Haven't had to do this in awhile_

_I think you have to enable Hidden devices under the view tab in device manger... I think that's all..._


----------



## ssawgift (Apr 15, 2019)

I don't believe it's specific to GPU driver. I think it's something related to a temporary driver installed in %TEMP%.

Oh, I forgot to mention that I have a CMD batch that runs at logon and deletes all files in %TEMP% folder. That's why I guess it's the cause of my problem.


----------



## StefanM (Apr 23, 2019)

ssawgift said:


> I think it's something related to a temporary driver installed in %TEMP%.



That's _GPU-Z.sys_
Quit GPU-Z *before *you wipe temp folder.
Add to your batch file:


```
taskkill /IM "GPU-Z.exe"
```


----------



## W1zzard (Apr 23, 2019)

ssawgift said:


> Oh, I forgot to mention that I have a CMD batch that runs at logon and deletes all files in %TEMP% folder. That's why I guess it's the cause of my problem.


Are you running GPU-Z on startup (before or while your script runs) ?

GPU-Z needs a driver to talk to the hardware, it extracts that into %TEMP%, loads it and keeps the file around until the last instance of GPU-Z is shut down.


----------

