ปิดการติดตั้ง network printer แบบอัตโนมัติ

ปิดการติดตั้ง network printer แบบอัตโนมัติ
แก้ปัญหาคอม
The short URL of the present article is: https://mistercheckman.com/awiu

ตั้งแต่มี windows10 มา windows10จะติดตั้งnetwork printerให้เองโดยอัตโนมัติ เครื่องที่ไม่ได้ใช้มันก็ติดให้ อยู่ชั้นไหนตึกบ้างก็ไม่รู้
นึกไม่ออกดูรูป ในรูปเจ้าของเครื่องจะใช้เครื่องแค่2เครื่อง แต่มาก็มาเพียบ บางทีเจ้าของเครื่องพิมพ์ไฟล์เป็น100หน้า สั่งพิมพ์ไปนึกว่าไม่ออก
เลยสั่งพิมพ์ใหม่อีก ผลสุดท้ายงานที่สั่งพิมพ์ไป ไปกองอยู่อีกชั้นหนึ่งซึ่งเป็นคนละแผนกกัน หัวจะปวด
มาดูวิธีแก้กัน

code———————————————————————————-code

Function Stop-PrinterAutoInstall
{

New-Item “Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private” -Force | New-ItemProperty -Name “AutoSetup” -Value 0 -Force | Out-Null

$PrinterInstall = Get-ItemProperty -Path “Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private” -Name “AutoSetup”

if ($PrinterInstall.AutoSetup -eq 0)
{
Write-Host “Printer AutoSetup Disabled”
}

Else {Write-Host “Printer AutoSetup still enabled, please setup manually”}
}

Function Start-PrinterAutoInstall
{
$PrinterInstall = Get-ItemProperty -Path “Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private” -Name “AutoSetup”
if ($PrinterInstall.AutoSetup -ne 1)
{
Set-ItemProperty -Path “Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NcdAutoSetup\Private” -Name “AutoSetup” -Value 1
Write-Host “Printer AutoSetup enabled”
}
Else {Write-Host “Printer AutoSetup already Enabled”}
}

Stop-PrinterAutoInstall

code———————————————————————————-code

ก่อนอื่น เปิด powershell ด้วยสิทธิ์ administrator

เอาCode ข้างบนมาวางแล้วกด enter

หลังจากเคาะ enter แล้ว จะมีข้อความ printer autosetup disable ปรากฎขึ้นมาตรงบรรทัดท้ายๆ

หลังจากปิดไปก็ลบเครื่องที่ไม่ได้ใช้ออก มันก็จะไม่กลับมากวนอีก
ปล.เรายังสามารถติดตั้ง network printer ได้ตามปกติ
หากใครต้องการเปิด ก็แก้ code บรรทัดสุดท้าย Stop-PrinterAutoInstall เป็น Start-PrinterAutoInstall

Facebook Comments Box
The short URL of the present article is: https://mistercheckman.com/awiu

Related Articles

Leave a Reply

Your email address will not be published.