balubeto's Mega Query Thread

Discussion in 'Windows 10' started by balubeto, Dec 26, 2015.

  1. balubeto

    balubeto MDL Addicted

    Dec 22, 2009
    580
    10
    30
    #1 balubeto, Dec 26, 2015
    Last edited by a moderator: Apr 20, 2017
    Hi

    I installed Windows ADK 10 v1511 on Windows 10 v1511 Enterprise 64 bit.

    I typed the following commands:

    Code:
    Dism /Apply-Image /ImageFile:"<wim_File_Path>\install.wim" /Index:1 /ApplyDir:"<Apply_Directory_Path>" /Verify /CheckIntegrity
    Dism /Capture-Image /ImageFile:"<Windows_Files_Path>\sources\install.wim" /CaptureDir:"<Apply_Directory_Path>" /Name:"<Edition_name>" /Description:"<Description_name>" /Compress:max /Verify /CheckIntegrity
    
    Now, what is the command that allows to completely remove the entire content of the <Apply_Directory_Path> directory?

    Thanks

    Bye
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,965
    908
    60
    Dism /?
    Dism /apply-image /?
    etc.

    You haven't mounted anything. just delete the destination...
    You could have just exported the image with compression...
    Everything including examples are is dism help...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    How the hell did you get to "MDL Senior Member" status? Makes mockery of the system...
     
  4. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    Unfortunately that status is get by post counter. Obviously this doesn't mean you are knowledgeable.
     
  5. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,696
    13,695
    340
    #5 xinso, Dec 27, 2015
    Last edited by a moderator: Apr 20, 2017
  6. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120
    3 Learn something about file permissions and ownership, isn't really that hard and comes handy in the future.
     
  7. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,696
    13,695
    340
    #7 xinso, Dec 27, 2015
    Last edited: Dec 27, 2015
    Yeah, that would be really convenient. And It would be much appreciated if you can share that knowledge with him.
     
  8. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,207
    981
    90
    change the folder to windows.old and use clean up
     
  9. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,696
    13,695
    340
    Wow, what a smart idea! Thanks a lot.
     
  10. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120
    You can't rename the folder w/o setting the correct permissions.

    And when you do this, the folder can be deleted w/o the use of any tool.
     
  11. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120

    I think the web is plenty of tutorials that explains how to set a folder permission, given the mechanism is basically the same since NT 3.51

    Anyway just RMB > properties > security tab > advanced.

    Then Owner/principal (or whatever is called in english) to change the file/folder owner from Trusted installer or system to Administrators or the actual administrator.

    Then close and repeat the steps to add user(s) and to give full control to them.

    in both steps don't forget to inherit the changes or they will affect only the top level folder.


    Back to the main question

    There are many other ways

    Use a superelevated prompt and use rmdir /s

    Use the command prompt from the recovery environment that doen't take in account the permissions.

    Use a bootable linux distro an delete the folder using either the command line or a random filemanager
     
  12. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,207
    981
    90
    #12 LiteOS, Dec 27, 2015
    Last edited: Dec 27, 2015
    Not recommending removing users folder normally
    it might remove personal folders also

    @ts
    dont rename move to new folder
     
  13. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120

    Ah, ok. This works, given windows isn't unix where rename and move are the same things. ;)
     
  14. balubeto

    balubeto MDL Addicted

    Dec 22, 2009
    580
    10
    30
    #14 balubeto, Jan 8, 2016
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Dism /Apply-Image and completely remove the entire content of the directory

    Hi

    I installed Windows ADK 10 v1511 on Windows 10 v1511 Enterprise 64 bit.

    I typed the following commands:

    Code:
    Dism /Apply-Image /ImageFile:"<wim_File_Path>\install.wim" /Index:1 /ApplyDir:"<Apply_Directory_Path>" /Verify /CheckIntegrity
    Dism /Capture-Image /ImageFile:"<Windows_Files_Path>\sources\install.wim" /CaptureDir:"<Apply_Directory_Path>" /Name:"<Edition_name>" /Description:"<Description_name>" /Compress:max /Verify /CheckIntegrity
    
    Now, knowing that some directories and files have the TrustedInstaller or System user as owner, what are the commands that allows to completely remove the entire content of the <Apply_Directory_Path> directory?

    Thanks

    Bye
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. balubeto

    balubeto MDL Addicted

    Dec 22, 2009
    580
    10
    30
    Hi

    Should I take ownership and get full control of the entire contents of a not system directory structure (also containing files and symbolic links and not) that, now, this check belongs to TrustedInstaller or System users.

    Then, using only the Command Prompt commands, how do I do this?

    Thanks

    Bye
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120

    Hence the need of two passes one for replace the owner, the other to give the permissions to that (and optionally other users).



    I believe is better to understand how to manage the matter graphically, using some copy/pasted commands w/o a clear vision isn't really a good thing.

    anyway

    This

    takeown /F C:\Windows.old\* /R /A

    cacls C:\Windows.old\*.* /T /grant administrators:F

    rmdir /S /Q C:\Windows.old\

    Should do the trick
     
  17. balubeto

    balubeto MDL Addicted

    Dec 22, 2009
    580
    10
    30
    I already tried it and it does not work. Why?

    Thanks

    Bye
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120
    #20 T-S, Jan 9, 2016
    Last edited: Jan 9, 2016
    If you're on win 8+ try replacing the second line with

    icacls C:\Windows.old\*.* /T /grant administrators:F