Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Hide the wireless password

I need a package to delete this key.

"HKEY_CLASSES_ROOT\AppID\{86F80216-5DD6-4F43-953B-35EF40A35AEE}"

The problem I am having taking ownership of it in order to delete it.  How can I set-acl to take ownership using PDQ Deploy?

0

Comments

3 comments
Date Votes
  • Shouldn't need to modify permissions. 

    Here's some Powershell that *should* do what you want

    #Create HKCR drive as it's not exposed by the registry provider by default

    New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT

    #Enter the new Drive

    Set-Location HKCR:\AppID\

    #Remove the directory

    Remove-Item  -Path {86F80216-5DD6-4F43-953B-35EF40A35AEE} -Recurse -Force

     

    Here's an XML export of an example package which should work for you:

    <?xml version="1.0" encoding="utf-8"?>
    <AdminArsenal.Export Code="PDQDeploy" Name="PDQ Deploy" Version="14.2.0.3" MinimumVersion="9.0">
    <Package>
    <PackageDefinition name="Definition">
    <CopyMode>Default</CopyMode>
    <InventoryScanProfileId value="null" />
    <ScanAfterDeployment value="null" />
    <Timeout value="60" />
    <UseCustomTimeout value="false" />
    <RunAs>LocalSystem</RunAs>
    <Steps type="list">
    <PowerShellStep>
    <CustomCommandLine></CustomCommandLine>
    <Files></Files>
    <Script>#Create HKCR drive as it's not exposed by the registry provider by default

    New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT

    #Enter the new Drive

    Set-Location HKCR:\AppID\

    #Remove the directory

    Remove-Item -Path {86F80216-5DD6-4F43-953B-35EF40A35AEE} -Recurse -Force</Script>
    <SuccessCodes>0</SuccessCodes>
    <RunAs value="null" />
    <Conditions type="list">
    <PackageStepCondition>
    <Architecture>Both</Architecture>
    <Version>All</Version>
    <TypeName>OperatingSystem</TypeName>
    </PackageStepCondition>
    <PackageStepCondition>
    <IsUserLoggedOn>AlwaysRun</IsUserLoggedOn>
    <TypeName>LoggedOnUser</TypeName>
    </PackageStepCondition>
    </Conditions>
    <ErrorMode>StopDeploymentFail</ErrorMode>
    <Title>Remove Wireless Password From Registry</Title>
    <TypeName>PowerShell</TypeName>
    <IsEnabled value="true" />
    </PowerShellStep>
    </Steps>
    </PackageDefinition>
    <Description></Description>
    <FolderId value="11" />
    <Name>Hide WifiPassword Forum Example</Name>
    <Path>Private Packages\Hide WifiPassword Forum Example</Path>
    <Version></Version>
    <PackageDisplaySettings name="DisplaySettings">
    <DisplayType>Normal</DisplayType>
    <IconKey>Icon-Package</IconKey>
    <SortOrder value="8" />
    </PackageDisplaySettings>
    </Package>
    </AdminArsenal.Export>

     

    1
  • That seemed to work.  Just had to make one minor adjustment. I had to put ` back ticks in front of the {} brackets.

    Remove-Item -Path `{86F80216-5DD6-4F43-953B-35EF40A35AEE`} -Recurse -Force

    Thanks,
    Brad

    0
  • Ah yeah, {} are used in Powershell. Forgot to escape them. Glad it worked.

    0