суббота, 26 августа 2023 г.

Disable Edge Browser Initial Questions

 cls


# Parameters

$registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Edge"

$registryName = "HideFirstRunExperience"

$registryValue = 1


# Function to disable Edge initial questions

function Disable-EdgeFirstRunExperience {

    # Check if the registry key exists

    if (-Not (Test-Path $registryPath)) {

        # Create the registry key if it doesn't exist

        New-Item -Path $registryPath -Force

    }


    # Set the registry value to disable the first-run experience

    Set-ItemProperty -Path $registryPath -Name $registryName -Value $registryValue

}


# GUI Design

Add-Type -AssemblyName System.Windows.Forms

$form = New-Object System.Windows.Forms.Form

$form.Text = "Disable Edge Initial Questions"

$form.Size = New-Object System.Drawing.Size(300,150)

$form.StartPosition = "CenterScreen"


$button = New-Object System.Windows.Forms.Button

$button.Location = New-Object System.Drawing.Point(75,40)

$button.Size = New-Object System.Drawing.Size(150,30)

$button.Text = "Disable Questions"

$button.Add_Click({

    Disable-EdgeFirstRunExperience

    [System.Windows.Forms.MessageBox]::Show("Edge initial questions have been disabled.", "Success")

})

$form.Controls.Add($button)


$form.ShowDialog()


Комментариев нет:

Отправить комментарий