balubeto's Mega Query Thread

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

  1. balubeto

    balubeto MDL Addicted

    Joined:
    Dec 22, 2009
    Messages:
    508
    Likes Received:
    10
    Trophy Points:
    30
    #61 balubeto, Feb 2, 2016
    Last edited: Feb 2, 2016
    (OP)
    Since the /d option value of the takeown varies according to the language of Windows, how do I make sure that this command works properly for each language?

    Thanks

    Bye
     
  2. rpo

    rpo MDL Expert

    Joined:
    Jan 3, 2010
    Messages:
    1,166
    Likes Received:
    990
    Trophy Points:
    60
    Open an elevated command prompt and type takeown /? (this will give information for your localized Windows) and google for takeown for English language.
    For an English Windows the option for /D are Y(es) or N(o). If you have an Italien Windows, the options will be S(i) or N(o). For a French Windows we have O(ui) or N(on). No need a dictionary and common sense.
     
  3. 100

    100 MDL Expert

    Joined:
    May 17, 2011
    Messages:
    1,346
    Likes Received:
    1,560
    Trophy Points:
    60
    #63 100, Feb 2, 2016
    Last edited: Feb 2, 2016
    You're both wrong.

    I was wrong.
     
  4. rpo

    rpo MDL Expert

    Joined:
    Jan 3, 2010
    Messages:
    1,166
    Likes Received:
    990
    Trophy Points:
    60
    I typed takeown /f c:\temp /r /d y
    On my french Windows this command is erroring ("y" is not allowed for "/d" option).
    But takeown /f c:\temp /r /d o works (I have now ownership of c:\temp).
     
  5. 100

    100 MDL Expert

    Joined:
    May 17, 2011
    Messages:
    1,346
    Likes Received:
    1,560
    Trophy Points:
    60
    Hah, wow. You're right, it doesn't work. Despite that, the parameter description explicitly mentions "Y" and "N" for non-English languages. :doh:
     
  6. balubeto

    balubeto MDL Addicted

    Joined:
    Dec 22, 2009
    Messages:
    508
    Likes Received:
    10
    Trophy Points:
    30
    So, how should I solve my problem?

    Thanks

    Bye
     
  7. KNARZ

    KNARZ MDL Addicted

    Joined:
    Oct 9, 2012
    Messages:
    896
    Likes Received:
    475
    Trophy Points:
    30
    How about you FIRST research yourself?
     
  8. rpo

    rpo MDL Expert

    Joined:
    Jan 3, 2010
    Messages:
    1,166
    Likes Received:
    990
    Trophy Points:
    60
    The register key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Language\InstallLanguage returns a four digit language code.
     
  9. halasz

    halasz MDL Member

    Joined:
    Jan 13, 2013
    Messages:
    117
    Likes Received:
    35
    Trophy Points:
    10
  10. balubeto

    balubeto MDL Addicted

    Joined:
    Dec 22, 2009
    Messages:
    508
    Likes Received:
    10
    Trophy Points:
    30
    Sorry but I have lost the final and tested solution to delete the entire structure created by the dism /Apply-Image command.

    Some might rewrite it?

    Thanks

    Bye
     
  11. Mr.X

    Mr.X MDL Guru

    Joined:
    Jul 14, 2013
    Messages:
    7,625
    Likes Received:
    14,952
    Trophy Points:
    240
    :biggrin: :bye1:
     
  12. KNARZ

    KNARZ MDL Addicted

    Joined:
    Oct 9, 2012
    Messages:
    896
    Likes Received:
    475
    Trophy Points:
    30
  13. balubeto

    balubeto MDL Addicted

    Joined:
    Dec 22, 2009
    Messages:
    508
    Likes Received:
    10
    Trophy Points:
    30
    My hard drive is broken, and ...

    So, does anyone have the final solution to completely eliminate the directory structures protected by Windows 10 v1511?

    Thanks

    Bye
     
  14. Mr.X

    Mr.X MDL Guru

    Joined:
    Jul 14, 2013
    Messages:
    7,625
    Likes Received:
    14,952
    Trophy Points:
    240
    AND you should already know about many DATA BACKUP methods which actually exists, including the cloud. No excuse for such s...
     
  15. KNARZ

    KNARZ MDL Addicted

    Joined:
    Oct 9, 2012
    Messages:
    896
    Likes Received:
    475
    Trophy Points:
    30
    Don't feed that troll, but ban would be wise.
     
  16. balubeto

    balubeto MDL Addicted

    Joined:
    Dec 22, 2009
    Messages:
    508
    Likes Received:
    10
    Trophy Points:
    30
    #76 balubeto, Apr 28, 2016
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I found my script in the final version:
    Code:
    takeown /F "<Directory_path>" /A /R /D Y /SKIPSL >nul 2>&1
    icacls "<Directory_path>" /reset
    icacls "<Directory_path>" /grant:r Administrators:(OI)(CI)F /inheritance:e /Q /C /T /L >nul 2>&1
    pushd "<Directory_path>" && ( rd /S /Q "<Directory_path>" 2>nul & popd )
    
    Thanks

    Bye
     
  17. KNARZ

    KNARZ MDL Addicted

    Joined:
    Oct 9, 2012
    Messages:
    896
    Likes Received:
    475
    Trophy Points:
    30