Skip to content

Instantly share code, notes, and snippets.

@wpsmith
Last active November 3, 2021 23:33
Show Gist options
  • Select an option

  • Save wpsmith/ad50f8e7c2c63296587af8d5d40c0233 to your computer and use it in GitHub Desktop.

Select an option

Save wpsmith/ad50f8e7c2c63296587af8d5d40c0233 to your computer and use it in GitHub Desktop.

Revisions

  1. wpsmith revised this gist Nov 3, 2021. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion mac.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    #!/bin/sh

    defaults write com.google.Chrome BrowserGuestModeEnabled -bool false
    defaults write com.google.chrome IncognitoModeAvailability -integer 1
    defaults write com.google.chrome IncognitoModeAvailability -integer 1
    defaults write com.google.Chrome BrowserAddPersonEnabled -bool false
    defaults write com.google.chrome AllowDeletetingBrowserHistory -bool false
  2. wpsmith revised this gist Sep 18, 2020. 1 changed file with 4 additions and 7 deletions.
    11 changes: 4 additions & 7 deletions windows.ps1
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,8 @@
    $registryPath = "HKLM:\SOFTWARE\Policies\Google\Chrome"
    // $registryPath = "Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome"

    $name = "IncognitoModeAvailability"
    $registryPath = "HKLM:\SOFTWARE\Policies\Google\Chrome"

    IF(!(Test-Path $registryPath)) {
    New-Item -Path $registryPath -Confirm -Force | Out-Null
    New-Item -Path $registryPath -Confirm:$false -Force | Out-Null
    }

    New-ItemProperty -Name BrowserGuestModeEnabled -Path $registryPath -Confirm -Force -Value 0 -PropertyType DWORD
    New-ItemProperty -Name IncognitoModeAvailability -Path $registryPath -Confirm -Force -Value 1 -PropertyType DWORD
    New-ItemProperty -Name BrowserGuestModeEnabled -Path $registryPath -Confirm:$false -Force -Value 0 -PropertyType DWORD
    New-ItemProperty -Name IncognitoModeAvailability -Path $registryPath -Confirm:$false -Force -Value 1 -PropertyType DWORD
  3. wpsmith renamed this gist Sep 18, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. wpsmith created this gist Sep 18, 2020.
    4 changes: 4 additions & 0 deletions mac.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    #!/bin/sh

    defaults write com.google.Chrome BrowserGuestModeEnabled -bool false
    defaults write com.google.chrome IncognitoModeAvailability -integer 1
    5 changes: 5 additions & 0 deletions regedit.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
    BrowserGuestModeEnabled: 0

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
    IncognitoModeAvailability: 1
    Binary file added windows.ps
    Binary file not shown.