Removing left over files after Simplix update.

Discussion in 'Windows 7' started by jetjock, Jan 17, 2017.

  1. jetjock

    jetjock MDL Senior Member

    Mar 6, 2010
    302
    17
    10
    Does anyone know a method of deleting the leftover files in the "Mount" folder after doing a Simplix update?

    I know, they can just be left for the next update, but I have a reason for removing them. I have tried taking ownership, but I either get a "Can't access" message, or am told the file name is too long. I've tried many of the tips on the 'net for deleting these files & folders, but none have worked. I tried doing an "RD" from a CMD window, but keep getting the same messages. Tried moving one to the "Root" folder, but that just gave me two folders I couldn't delete! There was a suggestion to use a cmd window and an" "X" dir to show the short file name, and then change it so it could be deleted,but since there are several hundred files, and almost as many folders, this is just not practical.

    Suggestions please!

    jetjock :plane:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    #2 Enthousiast, Jan 17, 2017
    Last edited by a moderator: Apr 20, 2017
    When it's run properly there aren't any files left in the mount folder.

    If there are files left in the mount folder, it means the unmounting /commit command didn't finish correct.

    You can cleanup the mount folder by discarding it:

    Code:
    DISM.exe /unmount-Wim /MountDir:x:\mount /discard
    and/or

    Code:
    DISM /Cleanup-Wim
     
  3. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    Pay special attention on this:

    Hence your serviced image is corrupt, NO GOOD.
     
  4. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    Nah, when the saving part of the unmount procedure has finished but the unmounting part not (because there are explorer windows left open, etcetc), the image should be ok, but i would test it before installing for real.
     
  5. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    Test = time
    Redo = time, but playing safe
     
  6. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    #6 Enthousiast, Jan 17, 2017
    Last edited by a moderator: Apr 20, 2017
    Believe me, i leave sometimes an explorer windows opened (when mounted manually) and when i get this at unmounting /commit:

    Code:
    dism.exe /Unmount-wim /mountdir:"d:\mount" /commit
    
    
    Deployment Image Servicing and Management tool
    Version: 10.0.14393.0
    
    Image File : F:\W10UI_1.8\Work_NL\sources\install.wim
    Image Index : 1
    Saving image
    
    [==========================100.0%==========================] 
    
    Unmounting image
    
    [==========================100.0%==========================] 
    
    Error: 0xc1420117
    
    The directory could not be completely unmounted.  This is usually due to applications that still have files opened within the mount directory.  Close these files and unmount again to complete the unmount process.
    
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
    
    It's not any problem, as long as the saving went ok.

    After closing the explorer window:

    Code:
    dism.exe /Unmount-wim /mountdir:"d:\mount" /discard
    
    
    Deployment Image Servicing and Management tool
    Version: 10.0.14393.0
    
    Image File : F:\W10UI_1.8\Work_NL\sources\install.wim
    Image Index : 1
    Unmounting image
    
    [==========================100.0%==========================] 
    The operation completed successfully.
    
     
  7. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    #7 Mr.X, Jan 17, 2017
    Last edited: Jan 17, 2017
    At OP, the serviced imaged couldn't be unmounted due to several factors. Some come to my mind:

    1. Sudden PC restart (myriad causes for this, don't ask, rather go investigate lol)
    1a. Yeah, most likely an opened explorer instance pointing to the mount folder as Enthousiast said.
    2. A security app. It is recommended to stop anything that monitors filesystems.
    3. A sudden blackout/brownout that causes machines to restart or turn off.
     
  8. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    @Enthousiast

    I had headaches once years ago and learned the hard way about explorer lol
    I know what you are talking about so when I fire up cmd prompt for servicing an image I close any damn explorer windows :D
     
  9. wazzock

    wazzock MDL Senior Member

    Oct 22, 2016
    337
    187
    10
    and always have Unlocker installed incase :) :cool:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    When you have to use unlocker to repair a badly unmounted wim, than you better discard the project as whole ;)
     
  11. wazzock

    wazzock MDL Senior Member

    Oct 22, 2016
    337
    187
    10
    it aint needed for mounting issues :beee: :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,965
    908
    60
    #12 Flipp3r, Jan 18, 2017
    Last edited by a moderator: Apr 20, 2017
    Yeah if I have file explorer open then dism fails to remove files from the mount folder.
    The created wim is ok.
    As another precaution I always commit then discard:
    Code:
    Dism /Commit-Wim /MountDir:Mount
    Dism /Unmount-Wim /MountDir:Mount /Discard
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    Why do it that way when normal unmount /commit already first saves the changes and in a second process unmounts it?
     
  14. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    Different views on how to do things, that's it. Perhaps yours is way more efficient though.
     
  15. jetjock

    jetjock MDL Senior Member

    Mar 6, 2010
    302
    17
    10
    #15 jetjock, Jan 18, 2017
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Thanks to all who took the time to answer. I'll just respond in this one post, as it was the first.

    After reading my post, I found I should have been clearer as to just what I was updating in case it made a difference. I was not updating my live, installed version of Win 7, but rather I was updating the "install.wim" file extracted from my Win 7 DVD. To do this, I have created an 'Update" folder on another drive and created "Exe", "Mount" & "Wim" folders in it, plus I have added the four .bat files that run the update. I add the Simplix update file, in this case UpdatePack7R2-17.1.15.exe to the Exe folder, and add the extracted install.wim file to the Wim folder. I then run "integrietmp.bat" which updates Explorer 11 also and uses the "mount" folder as a temp folder.

    When I run the .bat file, a cmd window is opened showing the version codes for Win 7. I have been using the "*" code to update all the versions on the DVD. When all four versions have been mounted, updated and unmounted, I'm presented with a log file showing which updates were installed in each version, and whether they were successful or not (they have all, always been successful). During the running of the updates, two folders are created in the mount folder. They are "UpdatePack7Live" and "UpdatePack7Wim". In the "...Live" folder, "UpdateScan7.bin" is always left behind. This is easily deleted. In the "...Wim" folder, there are several sub folders created including a "Windows" folder. This folder contains "Assembly, Program Filesx86, Program Files, Program Data, Microsoft.Net, System 32, SysWow64, Web & winsx folders. (I may have missed a couple). These are the files & folders that are usually un-deletable. A month ago, I was able to delete them by taking ownership and deleting them. This time, taking ownership had no effect except to enable me to remove quite a few files by force deleting them with "Unlocker". The majority of them would not delete, either because of "Access denied" or "File too long" errors.

    Sorry to be so long winded, but maybe you can give me more informed advice if you have all the details. Thanks.

    jetjock :plane:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    All answers given where based on the fact you were offline updating the wim.

    After succesfully finishing updating using the batch files there shouldn't be anything left in the "mount" folder. When there are files left it's not unmounted correctly.

    I think you are on a windows 7 host system? I believe i saw a comment by abbodi1406 about the possibility that sometimes in win 7, unmounting can be problematic.

    I gave you the cleanup command for cleaning up "stale" files and the mountpoint (that still resides somewhere inside the host windows when an unmount error occurs).

    Please run that command in an elevated cmd and see what it reports.
     
  17. jetjock

    jetjock MDL Senior Member

    Mar 6, 2010
    302
    17
    10
    Thanks for the update. Just wanted to be sure we were all on the same page. When I wasn't able to delete all those files, and they were taking up so much space on the drive, I did a restore of the whole drive from an earlier backup. Since they are no longer there, I will try your command if I run into the same problem next month. Thank you very much to all who have responded, especially you Entousiast.

    jetjock :plane:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. jetjock

    jetjock MDL Senior Member

    Mar 6, 2010
    302
    17
    10
    #18 jetjock, Jan 18, 2017
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Are you referring to Windows File Explorer, or the process "Explorer.exe"? I am assuming the former.

    jetjock :plane:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. zmeul86

    zmeul86 MDL Member

    Jun 17, 2014
    185
    76
    10
    #19 zmeul86, Jan 19, 2017
    Last edited: Jan 19, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. jetjock

    jetjock MDL Senior Member

    Mar 6, 2010
    302
    17
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...