Topic: [BUG] Driver folder "D\" was not deleted...

Base (multiple versions) Leaves my drivers behind at %systemdrive%\D

KTD is off, and they don't exist at the KTD location.
winnt.sif has DPsFnshr.exe listed and it does run.

DPsFnshr.ini wrote:

[Settings]
; DO NOT SET THIS MANUALLY, LET THE DriverPacks BASE DO IT FOR YOU! (may NOT contain any spaced, if it does, all exceptions must be adapted to be compatible!)
DPsRoot    = "%SystemDrive%"
; DO NOT SET THIS MANUALLY, LET THE DriverPacks BASE DO IT FOR YOU!
KTD = "false"
; system variables supported (see remarks for a list) one location cannot be used as
; KTDlocation: the root directory specified in[Settings]\DPsRoot
KTDlocation    = "%SystemRoot%\DriverPacks"
; system variables supported (see remarks for a list)
logLocation = "%SystemRoot%"
; enables/disables debug mode (enabled by default)
debug = "true"

DPsFnshr.log wrote:

2008-07-10 23:27:16 : <INIT> Detected a method 2 driver installation, the DevicePath value in the registry has been reset.
2008-07-10 23:27:16 : <FLTR> Collected the HWIDs for this system.
2008-07-10 23:27:16 : <FLTR> Verifying requirements for exception [NV3] (1 of 1 exceptions).
2008-07-10 23:27:16 : <FLTR>     2. +hwids (ANY +hwids must be matched)
2008-07-10 23:27:16 : <FLTR>         ! Could not match any of the +hwids.
2008-07-10 23:27:16 : <FLTR>     => This exception will not be applied.
2008-07-10 23:27:16 : <FLTR> Finished filtering exceptions.
2008-07-10 23:27:16 : <DBG>  0 exceptions have forfilled the requirements to be executed!
2008-07-10 23:27:16 : <KTD>  KTD will not be applied, the DriverPacks will be deleted.
2008-07-10 23:28:44 : <CLNP> Could not delete the DriverPacks, which are located in "C:\D".
2008-07-10 23:28:44 : <CLNP> Added new value to the RunOnce key in the registry: the cleanup of the "C:\D" directory will be retried (through CLI, not through the Finisher) after a reboot.
2008-07-10 23:28:44 : <CLNP> Deleted "C:\hwids.dat"!
2008-07-10 23:28:44 : <CLNP> Deleted "C:\DPsFnshr.ini"!
2008-07-10 23:28:44 : <CLNP> Deleted "C:\devcon.exe"!
2008-07-10 23:28:44 : <CLNP> Deleted "C:\makePNF.exe"!
2008-07-10 23:28:44 : <CLNP> Deleted "C:\pmtimer.exe"!
2008-07-10 23:28:44 : <CLNP> Deleted "C:\DSPdsblr.exe"!
2008-07-10 23:28:44 : <CLNP> Deleted "C:\DriverPack_*.ini"!
2008-07-10 23:28:44 : <CLNP> Deleted "C:\mute.exe"!
2008-07-10 23:28:44 : <CLNP> Added new value to the RunOnce key in the registry: the DriverPacks Finisher itself will get deleted after the next reboot.
2008-07-10 23:28:44 : Program terminated.

forfilled lol

C:\D is read-only but rd /s /q takes care of it...

... Edit: title and first line by OverFlow ...

Last edited by ophielx (2008-07-11 20:15:03)

Re: [BUG] Driver folder "D\" was not deleted...

The finisher loaded two reg entries to delete those items:

2008-07-10 23:28:44 : <CLNP> Added new value to the RunOnce key in the registry: the cleanup of the "C:\D" directory will be retried (through CLI, not through the Finisher) after a reboot.
;
2008-07-10 23:28:44 : <CLNP> Added new value to the RunOnce key in the registry: the DriverPacks Finisher itself will get deleted after the next reboot.

If you had done nothing but reboot, that directory would have been deleted automatically. smile

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: [BUG] Driver folder "D\" was not deleted...

Thanks, but I can read too. I've rebooted no less than 5 times and the directory remains.  Same thing happened on my last install.

With the same installation image the directory is removed in VM.  But on real hardware the directory is not removed.

Last edited by ophielx (2008-07-12 07:18:24)

Re: [BUG] Driver folder "D\" was not deleted...

Whoa, OK.  That's odd.
\D\ directory shouldn't be tagged as read-only.  Do you change/delete users through nlite?

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: [BUG] Driver folder "D\" was not deleted...

i second that
lets see presetup.cmd too... i suspect it has been altered

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: [BUG] Driver folder "D\" was not deleted...

I don't add/change users with nlite and I haven't modified anything.  It's just a standard point and click DriverPacks integration.  AFAIK I've had this issue with Base for a long time now, but I never really cared enough to report it since it's not that big of a deal.

If exist "%systemroot%\system32\setupold.exe" DEL /F "%systemroot%\system32\setupold.exe"

REM +==========================================================================+
REM |   Finding CD/DVD driveletter.                                            |
REM |--------------------------------------------------------------------------|
SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:%TAGFILE%" SET CDDRIVE=%%i:


REM +==========================================================================+
REM |   Decompressing the DriverPacks to the harddisk - using un7zip.exe.      |
REM |--------------------------------------------------------------------------|
%CDDRIVE%\OEM\bin\un7zip.exe %CDDRIVE%\OEM\DP*.7z %SystemDrive%\


REM +==========================================================================+
REM |   Copying/decompressing the files to finish the installation.            |
REM |--------------------------------------------------------------------------|
%CDDRIVE%\OEM\bin\un7zip.exe %CDDRIVE%\OEM\bin\*.7z %SystemDrive%\
COPY /Y %CDDRIVE%\OEM\bin\DPsFnshr.ini %SystemDrive%\
IF EXIST %CDDRIVE%\OEM\*.ins COPY /Y %CDDRIVE%\OEM\*.ins %SystemDrive%\


REM +==========================================================================+
REM |   Scanning for driverdirectories.                                        |
REM |--------------------------------------------------------------------------|
%CDDRIVE%\OEM\bin\DevPath.exe %SystemDrive%\D


REM +==========================================================================+
REM |   Disable Driver Signing Policy and keep it disabled.                    |
REM |--------------------------------------------------------------------------|
START %SystemDrive%\DSPdsblr.exe

EXIT

Last edited by ophielx (2008-07-12 18:17:20)

Re: [BUG] Driver folder "D\" was not deleted...

Well, I figured it out.  I installed again and took a look at the runonce key that gets set and it doesn't work.
cmd.exe /c "if exist C:\D  then rd /s /q C:\D"
returns: 'then' is not recognized as an internal or external command, operable program or batch file.

I've updated the autoit script and created a sample DPsFnshr.exe with the changes.

Const $_FINISHERDIR = StringReplace(@ScriptDir, "\", "")

changed to:

If StringRight(@ScriptDir,1)=="\" Then
Const $_FINISHERDIR = StringTrimRight(@ScriptDir,1)
Else
Const $_FINISHERDIR = @ScriptDir
EndIf

____________________________________________________________________

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "retry cleanup of the DriverPacks", "REG_SZ", 'cmd.exe /c "if exist ' & $SET_DPSROOT & "\D  then rd /s /q " & $SET_DPSROOT & '\D"')

changed to:

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "retry cleanup of the DriverPacks", "REG_SZ", 'cmd.exe /c rd /s /q "' & $SET_DPSROOT & '\D"')

____________________________________________________________________

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "retry cleanup of the DriverPacks Finisher temp dir", "REG_SZ", 'cmd.exe /c "if exist ' & $_DPSTMP & "  then rd /s /q " & $_DPSTMP & '"')

changed to:

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "retry cleanup of the DriverPacks Finisher temp dir", "REG_SZ", 'cmd.exe /c rd /s /q "' & $_DPSTMP & '"')

____________________________________________________________________

forfilled changed to fulfilled ;)

I changed the $_FINISHERDIR constant to what I think the actual intent of the coder was.  The original was kind of a hack and this is more future-proof.

The other two changes produce output similar to this: cmd.exe /c rd /s /q "C:\D"
Tested and working on real hardware.  Directory is no longer left behind.

http://www.megaupload.com/?d=M0LR1DYL

Last edited by ophielx (2008-07-13 11:50:05)

Re: [BUG] Driver folder "D\" was not deleted...

normaly the d folder is deleted before the reboot and that "backup" mechanisim is not needed as the primary function of deleteing the d\ folder is preformed by the finisher itself and not by the registry entry.

this is indeed a bug and as such should be reported at bugtracker, there is a link in the main forum.

I am still curious why it is not deleteing it -
is it possable you are doing something else that is causeing this folder to be in use?
very strange that this has never been reported before -
i would really like to know how this occurs / how to reproduce it...
the primary delete from finisher should work and i am sure is why you alone found that the 'backup mechanisim' for deleteing the files has a bug.

anyway it is an easy fix and i will implement it

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: [BUG] Driver folder "D\" was not deleted...

First post updated

edited the Title wording and added [BUG] 
I clarified the first line of the post to reflect the issue clearly.

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: [BUG] Driver folder "D\" was not deleted...

I don't use the directory or do anything that would cause it to happen.  The strange thing is it only happens on real hardware.  I can't reproduce it in a VM with the same exact installation image.  Another thing I noticed is that "\D" folder varies in the amount of files successfully deleted.  In one installation it was basically full, in another it only had one folder left.

I have an idea for a workaround, just a simple retry in the AU3 code.  I'll try something out later and see if it works.

Last edited by ophielx (2008-07-21 20:19:46)

Re: [BUG] Driver folder "D\" was not deleted...

Here the same problem , the D folder stays on C

Re: [BUG] Driver folder "D\" was not deleted...

Strangely enough, I seem to be experiencing the same problem on my current test install...

2008-08-05 02:18:34 : <KTD>  KTD will not be applied, the DriverPacks will be deleted.
2008-08-05 02:20:13 : <CLNP> Could not delete the DriverPacks, which are located in "C:\D".
2008-08-05 02:20:13 : <CLNP> Added new value to the RunOnce key in the registry: the cleanup of the "C:\D" directory will be retried (through CLI, not through the Finisher) after a reboot.
2008-08-05 02:20:13 : <CLNP> Deleted "C:\hwids.dat"!
2008-08-05 02:20:13 : <CLNP> Deleted "C:\DPsFnshr.ini"!
2008-08-05 02:20:13 : <CLNP> Deleted "C:\devcon.exe"!
2008-08-05 02:20:14 : <CLNP> Deleted "C:\makePNF.exe"!
2008-08-05 02:20:14 : <CLNP> Deleted "C:\pmtimer.exe"!
2008-08-05 02:20:15 : <CLNP> Deleted "C:\*.ins"!
2008-08-05 02:20:15 : <CLNP> Deleted "C:\DSPdsblr.exe"!
2008-08-05 02:20:16 : <CLNP> Deleted "C:\DriverPack_*.ini"!
2008-08-05 02:20:16 : <CLNP> Deleted "C:\mute.exe"!
2008-08-05 02:20:16 : <CLNP> Added new value to the RunOnce key in the registry: the DriverPacks Finisher itself will get deleted after the next reboot.
2008-08-05 02:20:16 : Program terminated.

D folder still present even after two reboots.
Never happended before and I did not deviate from my ususal settings at all!

The stuff on %systemroot% got all deleted, though...

Re: [BUG] Driver folder "D\" was not deleted...

i am begining to suspect that one of our installers that is called by the finisher is still running after teh finisher completes
(running in the background) causeing a file in use error for the delete.

this issue should be resolvved when i fix the backup delete routine with the next release of base...

DP BartPE Tutorial   DP_BASE Tutorial   HWID's Tool     Read BEFORE you post    UserBars!
http://driverpacks.net/userbar/admin-1.png
The DriverPacks, the DP_Base program, and Support Forum are FREE!.

Re: [BUG] Driver folder "D\" was not deleted...

I've noticed that too.  Sometimes an instance of "msiexec" is left running, but normally a restart clears the issue.

Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: [BUG] Driver folder "D\" was not deleted...

Well, well, it's just that this was on my testing machine, which has worked perfectly fine in the same HW config before, so unless it came by one of the three DPG nightlies (which got updated from the last try), I am clueless to what factor got changed that may lead to deviating results.