Hide drive for local users

Richard01

Well-known member
Joined
May 7, 2020
Posts
55
i want to hide drive on local user. When changing HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Nodrives reg on local user it hides when restarting explorer. But after relog of the user it changes back to default value. Tried using gpo through mmc.exe only for local users. But it wont hide the drive.

Code:
#if version >= 3
CLASS USER
CATEGORY !!WindowsComponents
        KEYNAME "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
        POLICY !!NoDrives
            EXPLAIN !!NoDrives_Help
            PART !!NoDrivesDropdown       DROPDOWNLIST NOSORT REQUIRED
            VALUENAME "NoDrives"
                ITEMLIST
                    NAME !!ShowAll       VALUE NUMERIC       0
                    NAME !!HideAll       VALUE NUMERIC       67108863 DEFAULT
                    NAME !!ABDEGPR_Only       VALUE NUMERIC       67108608
                END ITEMLIST
            END PART
        END POLICY
        POLICY !!NoViewOnDrive
            EXPLAIN !!NoViewOnDrive_Help
            PART !!NoViewOnDriveDropdown       DROPDOWNLIST NOSORT REQUIRED
            VALUENAME "NoViewOnDrive"
                ITEMLIST
                    NAME !!ShowAll       VALUE NUMERIC       0
                    NAME !!HideAll       VALUE NUMERIC       67108863 DEFAULT
                    NAME !!ABDEGPR_Only       VALUE NUMERIC       67108608
                END ITEMLIST
            END PART
        END POLICY
END CATEGORY ; WindowsComponents
#endif
[strings]
NoDrives="Schovaj vybrane disky"
NoDrives_Help="Removes the icons representing all but selected hard drives from My Computer"
NoDrivesDropdown="Pick one of the following combinations"
NoViewOnDriveDropdown="Pick one of the following combinations"
NoDrivesDropdown="Pick one of the following combinations"
NoViewOnDrive="Zablokuj pristup k vybranim diskom"
NoViewOnDrive_Help="Prevents users from using My Computer to gain access to the content of selected drives."
NoViewOnDriveDropdown="Pick one of the following combinations"
WindowsComponents="Sino"
ShowAll="Show all drives"
HideAll="Hide all drives"
ABDEGPR_Only="Zablokuj disky od I do Z"

Do you know what could be the issue that resets the reg value to default?

Thanks
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top