• AutoHotkey – Remove the ‘3D Objects’ folder in Win 10 1709 upwards

    Home » Forums » Developers, developers, developers » DevOps Lounge » AutoHotkey – Remove the ‘3D Objects’ folder in Win 10 1709 upwards

    Author
    Topic
    #1773532

    Windows 1709 introduced a 3D Objects folder. If you never use it you can use the following AutoHotkey script to remove it.

    Code:
    ; See https://www.howtogeek.com/331361/how-to-remove-the-3d-objects-folder-from-this-pc-on-windows-10/
    
    ; Only allow one instance
    #SingleInstance,Force
    
    ; Elevate, i.e. ‘Run as admin’, ‘cos the registry edits are to the MACHINE hive, not USER hive
    If Not A_IsAdmin
    {
       Run *RunAs “%A_ScriptFullPath%”  ; Requires v1.0.92.01+
       ExitApp
    }
    
    ; First, a quick check that the script is only being used in Win 10
    if A_OSVersion in WIN_8,WIN_7,WIN_VISTA,WIN_2003,WIN_XP,WIN_2000,WIN_NT4,WIN_95,WIN_98,WIN_ME  ; Note: No spaces around commas.
    {
        MsgBox, 16, Remove 3D Objects folder, This script is only for Windows 10.
        ExitApp
    }
    
    SetRegView 64 ; See https://autohotkey.com/docs/commands/SetRegView.htm (example 2)
    
    ; Check if OS is 1709+ as this is when 3D Objects was introduced
    RegRead, CurVer, HKLMSOFTWAREMicrosoftWindows NTCurrentVersion, ReleaseID ; Version
    
    If CurVer <= 1703
    {
        MsgBox, 16, Warning, Windows 10 is NOT version 1709 or later
        ExitApp
    }
        
    ; Delete this registry key
    RegDelete, HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerMyComputerNameSpace{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}  ; Requires AHK v1.1.21+
    
    ; If OS is x64 delete this additional registry key
    If %A_Is64bitOS% := 1
    RegDelete, HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionExplorerMyComputerNameSpace{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}  ; Requires AHK v1.1.21+
    
    SetRegView Default
    
    MsgBox, 64, Remove 3D Objects, Done! Restart File Explorer for the change to take place.
    
    ExitApp

    You won't see anything except a Message Box when the change has been made:

    Before:

    Click to enlarge

    After:

    Click to enlarge

    Hope this helps…

    Reply To: AutoHotkey – Remove the ‘3D Objects’ folder in Win 10 1709 upwards

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: