Windows 10: Attempting to set hidden attribute to start menu folders via cmd

Discus and support Attempting to set hidden attribute to start menu folders via cmd in Windows 10 Performance & Maintenance to solve the problem; Ok, so I've been working on my unattended install and I am hitting a wall. I currently am using classic shell start menu to replace the original and I... Discussion in 'Windows 10 Performance & Maintenance' started by FailStyle, Dec 24, 2016.

  1. FailStyle Win User

    Attempting to set hidden attribute to start menu folders via cmd


    Ok, so I've been working on my unattended install and I am hitting a wall. I currently am using classic shell start menu to replace the original and I want to set the default start menu folders to hidden for two reasons. First reason being that I already have links for each of these located in classic start menu and don't need a second set sitting in my programs folder. Second reason, if I delete them(which doesn't work either), windows updates like to replace a few of these every now and then.

    Here is what I'm attempting to do via .bat file:

    Code: takeown /f "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Maintenance" /r /d y > NUL 2>&1 icacls "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Maintenance" /grant administrators:F /t > NUL 2>&1 takeown /f "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Accessories" /r /d y > NUL 2>&1 icacls "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Accessories" /grant administrators:F /t > NUL 2>&1 takeown /f "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools" /r /d y > NUL 2>&1 icacls "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools" /grant administrators:F /t > NUL 2>&1 takeown /f "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Ease of Access" /r /d y > NUL 2>&1 icacls "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Ease of Access" /grant administrators:F /t > NUL 2>&1 takeown /f "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows System" /r /d y > NUL 2>&1 icacls "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows System" /grant administrators:F /t > NUL 2>&1 attrib +H "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Maintenance" > NUL 2>&1 attrib +H "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Accessories" > NUL 2>&1 attrib +H "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools" > NUL 2>&1 attrib +H "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Ease of Access" > NUL 2>&1 attrib +H "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows System" > NUL 2>&1 takeown /f "%appdata%\Microsoft\Windows\Start Menu\Programs\Maintenance" /r /d y > NUL 2>&1 icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Maintenance" /grant administrators:F /t > NUL 2>&1 takeown /f "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Accessories" /r /d y > NUL 2>&1 icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Accessories" /grant administrators:F /t > NUL 2>&1 takeown /f "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools" /r /d y > NUL 2>&1 icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools" /grant administrators:F /t > NUL 2>&1 takeown /f "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Ease of Access" /r /d y > NUL 2>&1 icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Ease of Access" /grant administrators:F /t > NUL 2>&1 takeown /f "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" /r /d y > NUL 2>&1 icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" /grant administrators:F /t > NUL 2>&1 takeown /f "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows System" /r /d y > NUL 2>&1 icacls "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows System" /grant administrators:F /t > NUL 2>&1 attrib +H "%appdata%\Microsoft\Windows\Start Menu\Programs\Maintenance" > NUL 2>&1 attrib +H "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Accessories" > NUL 2>&1 attrib +H "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Administrative Tools" > NUL 2>&1 attrib +H "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows Ease of Access" > NUL 2>&1 attrib +H "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" > NUL 2>&1 attrib +H "%appdata%\Microsoft\Windows\Start Menu\Programs\Windows System" > NUL 2>&1[/quote] I verified that takeown and icacls are returning successfully, but the ONLY folder this works on is the Maintenance folder from both the programdata and appdata locations. The rest of the folders not only persist, but if I try to delete them via explorer I receive a pop up saying I need admin access, click ok and it deletes. So obviously something is preventing or retaking ownership of the folders??

    The account is an admin with UAC disabled and the bat file uses an auto-elevation to run as administrator, so I know that rights are fine. Any help would be appreciated. Open to use cmd, powershell, or even a 3rd party program as long as I can run it in a portable solution.

    :)
     
    FailStyle, Dec 24, 2016
    #1

  2. Unwanted Pictures in Gallery

    You will have to find the folders where these icons are and then use Windows File Manager (Connected via USB to a PC) to set the Folder's attribute to "Hidden"
     
    el_loco---01, Dec 24, 2016
    #2
  3. Unable to change the location of Downloads to G:\ drive after replacing Hard Drive

    type this in Run:

    explorer %userprofile%

    This shows the "normal" folder view for your user profile, containing the actual path in Address bar.

    And type:

    cmd /k attrib %userprofile%

    This tells you if the profile folder has Hidden attribute or not.
     
    Ramesh Srinivasan, Dec 24, 2016
    #3
  4. FailStyle Win User

    Attempting to set hidden attribute to start menu folders via cmd

    Ok, so I found out how to set hidden attributes via powershell using this command:

    Code: (Get-Item “Folder Path”).Attributes = ‘Hidden’[/quote] When I use this code it works successfully on the Maintenance folder, but any of the others error out saying that the directory doesn't exist. What am I missing here?
     
    FailStyle, Dec 25, 2016
    #4
  5. FailStyle Win User
    So for whatever reason, when viewing in explorer those folders are named as I have them in my bat file. If I open cmd and go into the directory and get the listing, the folders have a different name. I have changed my bat file to match the folder names found through cmd and everything works as it should. Now I'm left with 2 unimportant questions:

    • Why did the takeown and icacls return as successful for folders that aren't there?
    • Does it have to do with those folders being linked together, like a library maybe?
     
    FailStyle, Apr 4, 2018
    #5
Thema:

Attempting to set hidden attribute to start menu folders via cmd

Loading...
  1. Attempting to set hidden attribute to start menu folders via cmd - Similar Threads - Attempting set hidden

  2. Photos Folder and Hidden/System Attribute Automatically Set

    in Windows 10 Network and Sharing
    Photos Folder and Hidden/System Attribute Automatically Set: I have several folders located on NAS drive with {random path}\Photos\ When navigating to the folder can go to the path {random path} and the folder will be missing from explorer. There are two ways I can get to the folder without changing my system settings to view system...
  3. Photos Folder and Hidden/System Attribute Automatically Set

    in Windows 10 Gaming
    Photos Folder and Hidden/System Attribute Automatically Set: I have several folders located on NAS drive with {random path}\Photos\ When navigating to the folder can go to the path {random path} and the folder will be missing from explorer. There are two ways I can get to the folder without changing my system settings to view system...
  4. Photos Folder and Hidden/System Attribute Automatically Set

    in Windows 10 Software and Apps
    Photos Folder and Hidden/System Attribute Automatically Set: I have several folders located on NAS drive with {random path}\Photos\ When navigating to the folder can go to the path {random path} and the folder will be missing from explorer. There are two ways I can get to the folder without changing my system settings to view system...
  5. Folder attributes

    in Windows 10 Network and Sharing
    Folder attributes: Need to be able to easily add/change attributes, e.g selecting a bunch of files and being able to say what week or semester they are in, saves having to create daunting folder structures...
  6. How to clear hidden and system attributes of folder

    in Windows 10 Support
    How to clear hidden and system attributes of folder: I tried to clear it with total commander but it did not work. I made this folder system and hidean using total commander DOS very long time ago and now it is not visible in a new cloned OS drive . - - - Updated - - - nevermind I changed view option now it is visible 175202
  7. Restore hidden file attributes

    in Windows 10 Support
    Restore hidden file attributes: I accidentally made all files of windows to be shown (unhide using properties--> attributes). Now, if I click hide again, the system is hiding folders that are open by default (say documents vs appdata, appdata must be hidden but documents must be visible). Is there a way...
  8. Change hidden files/folders attribute for individual files or folders

    in Windows 10 Network and Sharing
    Change hidden files/folders attribute for individual files or folders: Ref previous article at: https://answers.microsoft.com/en-us/windows/forum/windows_10-files/cannot-change-view-hidden-files-for-a-specific/d362a9a3-07cd-47af-8e97-6ae4a124c29a Issue: The folder attribute "show hidden files and folders" in the folder view options is,...
  9. Folder Attribution

    in Windows 10 Network and Sharing
    Folder Attribution: How shall I remove the "Read Only' attribution from a folder / file in Win 10 ? https://answers.microsoft.com/en-us/windows/forum/all/folder-attribution/fa83146a-1157-47ea-9f3e-71fd42f9446c"
  10. Set or Unset Hidden Attribute of Files and Folders in Windows 10

    in Windows 10 Tutorials
    Set or Unset Hidden Attribute of Files and Folders in Windows 10: How to: Set or Unset Hidden Attribute of Files and Folders in Windows 10 How to Set or Unset Hidden Attribute of Files and Folders in Windows 10 [img] Information In Windows, you can set or clear the hidden attribute for files and folders to hide or unhide them....