Cara menambah Edit atau Run with pada menu klik kanan fail PS1

Fail PS1 ialah skrip atau cmdlet , digunakan oleh Windows PowerShell .

Panduan ini akan menunjukkan kepada anda cara menambah atau mengalih keluar menu Edit atau Jalankan dengan tersuai pada menu konteks untuk fail PowerShell .ps1 untuk semua pengguna dalam Windows 10 .

Menu Edit atau Jalankan dengan konteks termasuk item berikut untuk fail PS1:

  • Jalankan dengan PowerShell
  • Jalankan dengan PowerShell sebagai pentadbir
  • Jalankan dengan PowerShell 7
  • Jalankan dengan PowerShell 7 sebagai pentadbir
  • Edit dengan PowerShell ISE
  • Edit dengan PowerShell ISE sebagai pentadbir
  • Edit dengan PowerShell ISE (x86)
  • Edit dengan PowerShell ISE (x86) sebagai pentadbir
  • Edit dengan Notepad
  • Edit dengan Notepad sebagai pentadbir

Cara menambah Edit atau Run with pada menu klik kanan fail PS1

Tambahkan "Edit atau Jalankan dengan" pada menu klik kanan fail PS1 dalam Windows 10

Bagaimana untuk menambah "Edit atau Jalankan dengan" pada menu klik kanan fail PS1 dalam Windows 10

Ini caranya:

1. Lakukan langkah 2 (tambah - klik kanan), langkah 3 (tambah - Shift + klik kanan) atau langkah 4 (padam) di bawah bergantung pada apa yang anda mahu lakukan.

2. Untuk menambah menu konteks fail PS1 "Edit atau Jalankan dengan" (hanya klik kanan untuk memaparkan), muat turun fail Add_Edit_or_Run_with_to_PS1_context_menu.reg .

Kandungan fail REG) - Kod:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\.ps1]

[HKEY_CLASSES_ROOT\.ps1]
@="Microsoft.PowerShellScript.1"

[-HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1]

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1]
"EditFlags"=dword:00020000
"FriendlyTypeName"=hex(2):40,00,22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,\
  00,72,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,\
  33,00,32,00,5c,00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,70,00,6f,00,77,\
  00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,5c,00,76,00,31,00,2e,00,30,00,\
  5c,00,70,00,6f,00,77,00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,2e,00,65,\
  00,78,00,65,00,22,00,2c,00,2d,00,31,00,30,00,33,00,00,00

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\DefaultIcon]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe\",1"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell]
@="Open"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open\Command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with]
"MUIVerb"="Edit or Run with"
"Extended"=-
"SubCommands"=""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\001flyout]
"MUIVerb"="Run with PowerShell"
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\001flyout\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" \"-Command\" \"if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\002flyout]
"MUIVerb"="Run with PowerShell as administrator"
"HasLUAShield"=""
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\002flyout\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" \"-Command\" \"\"& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File \\\"%1\\\"' -Verb RunAs}\""



[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\003flyout]
"MUIVerb"="Run with PowerShell 7"
"Icon"="pwsh.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\003flyout\Command]
@="\"C:\\Program Files\\PowerShell\\7\\pwsh.exe\" \"-Command\" \"if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\004flyout]
"MUIVerb"="Run with PowerShell 7 as administrator"
"HasLUAShield"=""
"Icon"="pwsh.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\004flyout\Command]
@="\"C:\\Program Files\\PowerShell\\7\\pwsh.exe\" \"-Command\" \"\"& {Start-Process pwsh.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File \\\"%1\\\"' -Verb RunAs}\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\005flyout]
"MUIVerb"="Edit with PowerShell ISE"
"Icon"="powershell_ise.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\005flyout\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\006flyout]
"MUIVerb"="Edit with PowerShell ISE as administrator"
"HasLUAShield"=""
"Icon"="powershell_ise.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\006flyout\Command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,start PowerShell_ISE.exe \"\"%1\"\"'  -Verb RunAs\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\007flyout]
"MUIVerb"="Edit with PowerShell ISE (x86)"
"Icon"="powershell_ise.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\007flyout\Command]
@="\"C:\\WINDOWS\\syswow64\\WindowsPowerShell\\v1.0\\powershell_ise.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\008flyout]
"MUIVerb"="Edit with PowerShell ISE (x86) as administrator"
"HasLUAShield"=""
"Icon"="powershell_ise.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\008flyout\Command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,start C:\\WINDOWS\\syswow64\\WindowsPowerShell\\v1.0\\powershell_ise.exe \"\"%1\"\"'  -Verb RunAs\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\009flyout]
"MUIVerb"="Edit with Notepad"
"Icon"="notepad.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\009flyout\Command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\010flyout]
"MUIVerb"="Edit with Notepad as administrator"
"HasLUAShield"=""
"Icon"="notepad.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\010flyout\Command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,start C:\\Windows\\System32\\notepad.exe \"\"%1\"\"'  -Verb RunAs\""

3. Untuk menambah menu konteks fail PS1 "Edit atau Jalankan dengan" (tekan Shift + klik kanan untuk memaparkan), muat turun fail Add_Shift + Edit_or_Run_with_to_PS1_context_menu.reg .

Kandungan REG - Fail kod:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\.ps1]

[HKEY_CLASSES_ROOT\.ps1]
@="Microsoft.PowerShellScript.1"

[-HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1]

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1]
"EditFlags"=dword:00020000
"FriendlyTypeName"=hex(2):40,00,22,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,\
  00,72,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,\
  33,00,32,00,5c,00,77,00,69,00,6e,00,64,00,6f,00,77,00,73,00,70,00,6f,00,77,\
  00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,5c,00,76,00,31,00,2e,00,30,00,\
  5c,00,70,00,6f,00,77,00,65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,2e,00,65,\
  00,78,00,65,00,22,00,2c,00,2d,00,31,00,30,00,33,00,00,00

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\DefaultIcon]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe\",1"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell]
@="Open"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Open\Command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with]
"MUIVerb"="Edit or Run with"
"Extended"=""
"SubCommands"=""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\001flyout]
"MUIVerb"="Run with PowerShell"
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\001flyout\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" \"-Command\" \"if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\002flyout]
"MUIVerb"="Run with PowerShell as administrator"
"HasLUAShield"=""
"Icon"="powershell.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\002flyout\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" \"-Command\" \"\"& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File \\\"%1\\\"' -Verb RunAs}\""



[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\003flyout]
"MUIVerb"="Run with PowerShell 7"
"Icon"="pwsh.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\003flyout\Command]
@="\"C:\\Program Files\\PowerShell\\7\\pwsh.exe\" \"-Command\" \"if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\004flyout]
"MUIVerb"="Run with PowerShell 7 as administrator"
"HasLUAShield"=""
"Icon"="pwsh.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\004flyout\Command]
@="\"C:\\Program Files\\PowerShell\\7\\pwsh.exe\" \"-Command\" \"\"& {Start-Process pwsh.exe -ArgumentList '-ExecutionPolicy RemoteSigned -File \\\"%1\\\"' -Verb RunAs}\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\005flyout]
"MUIVerb"="Edit with PowerShell ISE"
"Icon"="powershell_ise.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\005flyout\Command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell_ise.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\006flyout]
"MUIVerb"="Edit with PowerShell ISE as administrator"
"HasLUAShield"=""
"Icon"="powershell_ise.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\006flyout\Command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,start PowerShell_ISE.exe \"\"%1\"\"'  -Verb RunAs\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\007flyout]
"MUIVerb"="Edit with PowerShell ISE (x86)"
"Icon"="powershell_ise.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\007flyout\Command]
@="\"C:\\WINDOWS\\syswow64\\WindowsPowerShell\\v1.0\\powershell_ise.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\008flyout]
"MUIVerb"="Edit with PowerShell ISE (x86) as administrator"
"HasLUAShield"=""
"Icon"="powershell_ise.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\008flyout\Command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,start C:\\WINDOWS\\syswow64\\WindowsPowerShell\\v1.0\\powershell_ise.exe \"\"%1\"\"'  -Verb RunAs\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\009flyout]
"MUIVerb"="Edit with Notepad"
"Icon"="notepad.exe"
"CommandFlags"=dword:00000020

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\009flyout\Command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""


[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\010flyout]
"MUIVerb"="Edit with Notepad as administrator"
"HasLUAShield"=""
"Icon"="notepad.exe"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with\shell\010flyout\Command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,start C:\\Windows\\System32\\notepad.exe \"\"%1\"\"'  -Verb RunAs\""

4. Untuk mengalih keluar menu konteks fail PS1 "Edit atau Jalankan dengan", muat turun fail Remove_Edit_or_Run_with_from_PS1_context_menu.reg .

Kandungan REG - Fail kod:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\Edit-Run-with]

5. Simpan fail .reg ke desktop.

6. Klik dua kali fail .reg yang dimuat turun untuk bergabung.

7. Apabila digesa, klik Jalankan > Ya (UAC) > Ya > OK untuk meluluskan gabungan.

8. Sekarang, anda boleh memadam fail .reg yang dimuat turun jika anda mahu.

Semoga anda berjaya.

Tinggalkan Komen

Bagaimana untuk mengalih keluar notis permintaan hak cipta di sudut kanan skrin pada Windows 10

Bagaimana untuk mengalih keluar notis permintaan hak cipta di sudut kanan skrin pada Windows 10

Adakah anda melihat pemberitahuan pengaktifan Windows 10 di sudut kanan skrin? Artikel ini akan membimbing anda cara memadamkan notis permintaan hak cipta pada Windows 10.

Arahan daripada AZ tentang cara memasang Windows 10 build 14393.222

Arahan daripada AZ tentang cara memasang Windows 10 build 14393.222

Baru-baru ini Microsoft mengeluarkan kemas kini kumulatif terkini untuk pengguna PC Windows 10 yang dipanggil Build 14393.222. Kemas kini yang dikeluarkan untuk Windows 10 ini terutamanya membetulkan pepijat berdasarkan maklum balas pengguna dan meningkatkan pengalaman prestasi sistem pengendalian.

Lindungi rangkaian komputer anda dengan hos Bastion hanya dalam 3 langkah

Lindungi rangkaian komputer anda dengan hos Bastion hanya dalam 3 langkah

Adakah anda mempunyai komputer pada rangkaian tempatan anda yang memerlukan akses luaran? Menggunakan hos benteng sebagai penjaga pintu untuk rangkaian anda boleh menjadi penyelesaian yang baik.

3 cara untuk mengosongkan semua log peristiwa dalam Windows 10 dengan cepat

3 cara untuk mengosongkan semua log peristiwa dalam Windows 10 dengan cepat

Kadangkala anda mungkin perlu memadamkan log peristiwa lama sekaligus. Dalam panduan ini, Quantrimang.com akan menunjukkan kepada anda 3 cara untuk memadam semua log peristiwa dalam Windows 10 Event Viewer dengan cepat.

Cara membuat kunci Windows jika papan kekunci anda tidak tersedia

Cara membuat kunci Windows jika papan kekunci anda tidak tersedia

Jika anda lebih suka menggunakan papan kekunci klasik lama, seperti IBM Model M, yang tidak termasuk kekunci Windows fizikal, terdapat kaedah mudah untuk menambah lagi, dengan meminjam kunci yang anda jarang gunakan. .

Cara membuat mod latar belakang telus pada Windows 10

Cara membuat mod latar belakang telus pada Windows 10

WindowTop ialah alat yang mempunyai keupayaan untuk meredupkan semua tetingkap aplikasi dan program yang dijalankan pada komputer Windows 10. Atau anda boleh menggunakan antara muka latar belakang gelap pada tingkap.

Kaedah IP palsu membantu anda mengakses tanpa nama

Kaedah IP palsu membantu anda mengakses tanpa nama

Dalam banyak artikel sebelumnya, kami telah menyebut bahawa kekal tanpa nama dalam talian adalah sangat penting. Maklumat peribadi dibocorkan setiap tahun, menjadikan keselamatan dalam talian semakin diperlukan. Itulah juga sebab kita harus menggunakan alamat IP maya. Di bawah, kita akan belajar tentang kaedah untuk mencipta IP palsu!

Bagaimana untuk mematikan bar Bahasa pada Bar Tugas Windows 8

Bagaimana untuk mematikan bar Bahasa pada Bar Tugas Windows 8

Bar Bahasa pada Windows 8 ialah bar alat bahasa kecil yang direka untuk dipaparkan secara automatik pada skrin Desktop. Walau bagaimanapun, ramai orang ingin menyembunyikan bar bahasa ini pada Bar Tugas.

Petua untuk mengoptimumkan kelajuan sambungan Internet daripada Linksys

Petua untuk mengoptimumkan kelajuan sambungan Internet daripada Linksys

Memaksimumkan kelajuan Internet adalah penting untuk mengoptimumkan sambungan rangkaian anda. Anda boleh menikmati hiburan dan pengalaman kerja yang optimum menggunakan komputer, TV sedia Internet, konsol permainan, dsb.

Bagaimana untuk menyediakan WEP, WPA, WPA2 untuk penghala Linksys

Bagaimana untuk menyediakan WEP, WPA, WPA2 untuk penghala Linksys

Kesambungan wayarles adalah satu keperluan hari ini dan kerana itu, keselamatan wayarles adalah penting untuk memastikan keselamatan dalam rangkaian dalaman anda.