Announcement

Collapse
No announcement yet.

winpebuilder delete files left behind

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • winpebuilder delete files left behind

    I am using Winpebuilder to try and make a bootable USB with BurnIn Test. However, if the program errors out while making the USB it leaves behind files that cannot be deleted. Usually in folders named something like WPB0000. I have spent hours trying to delete these, boot into safe mode, change ownership, etc. Nothing seems to work. If everything in Winpebuilder is not just right it errors and leaves all this junk behind. There should be something in program so if it errors out, if cleans up all the files it made.

    Thanks

  • #2
    It seems to be impossible to create a BurnIn USB Boot drive using Winpebuilder. Tried pretty much everything, just errors out and leaves stuff behind I can't delete. Windows 11 Pro all updates. Have atttached the only log file I could find from last time trying to create USB drive.

    Thanks
    Attached Files

    Comment


    • #3
      It seems to hang when copying Diskpart.exe. Take that part out and it works.

      Thanks

      Comment


      • #4
        Maybe the USB drive is bad? Did you try another USB drive?

        For the locked files that can't be deleted, can you try and reboot the machine and then deleted the files, that should remove any locks. Second thing to try would be to run Windows Explorer as the Admin user, then delete the files.

        Comment


        • #5
          Yeah, I did try a different USB drive, didn't help. It just seems to hang when trying to copy/overwrite Diskpart.exe. Maybe some Win 11 update?

          Did try to reboot computer to delete files, didn't help. Didn't try running Explorer in Admin mode. Did try running Directory Opus in Admin mode, didn't help. Found a program called Unlock It by Emco that was able to unlock files and delete them. While I know sometimes user error can cause the program to error out and abort, just seems it could delete the temp stuff it left behind.

          Thanks

          Comment


          • #6
            If the temp work folder cannot be deleted, they files may be still mounted by DISM and may require to manually clean up any unmounted images:
            • From the Start Menu, Open the "Deployment and Imaging Tools Environment" with administrator privileges.
            • Run the command "dism /get-mountedwiminfo" to show the currently mounted images. Take note of the "Mount Dir:"
            • Then use the command "dism /unmount-wim /mountdir:<Mount Dir> /discard" to discard the changes made to the image and unmount it from the system.​

            Comment


            • #7
              Code:
              Sat 03/02/2024  7:17:55.31: Copying C:\Windows\System32\diskpart.exe to C:\WINPEB~1\WPB0000\mount\windows\System32\diskpart.exe...
              Sat 03/02/2024  7:17:55.32: ---Existing file found, taking ownership to overwrite... Complete
              Sat 03/02/2024  7:17:56.39: ---Copying file to WinPE Image... Retrying [1]
              Sat 03/02/2024  7:17:57.43: ---Copying file to WinPE Image... Retrying [4]
              Sat 03/02/2024  7:17:58.84: ---Copying file to WinPE Image... Retrying [4]
              Sat 03/02/2024  7:18:00.26: ---Copying file to WinPE Image... Failed [4]: copy "C:\Windows\System32\diskpart.exe" "C:\WINPEB~1\WPB0000\mount\windows​
              WinPEBuilder uses the xcopy command to copy files to the mounted image. Exit codes can be found on the previous linked page. Exit code 1 indicates that "No files were found to copy." Exit code 4 indicates "Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line." Possibly check that source exists, e.g. diskpart.exe is located at "C:\Windows\System32".

              Comment


              • #8
                Thanks for the info. I will take note of the mounted by the DISM thing to delete them.

                Not sure why it will not copy the diskpart.exe file. I know it has worked before. Pretty sure there is enough memory and disk space and have checked that the diskpart.exe is in the system32 folder. It does copy the msvfw32.dll ok.

                Thanks

                Comment


                • #9
                  Not sure why it will not copy the diskpart.exe file. I know it has worked before.
                  Are you providing your own diskpart.exe file? You shouldn't need to specify it, as the base image for WinPE should contain diskpart.exe already.

                  Comment


                  • #10
                    Yes, I was providing or specifying where diskpart.exe is. But I was thinking that too, why would I need to specify or copy it over when is part of the WinPE Image.

                    Thanks

                    Comment

                    Working...
                    X