# PowerShell 実行
# 表示
reg.exe add "HKCU\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32" /f /ve
taskkill /f /im explorer.exe
explorer.exe
# 非表示
reg delete "HKCU\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
taskkill /f /im explorer.exe
explorer.exe
ファイル:run.bat
@echo off
wscript "C:\\send-f15.vbs"
ファイル:send-f15.vbs
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "powershell -ExecutionPolicy Bypass -NoProfile -File ""C:\\send-f15.ps1""", 0, False
ファイル:kill-f15.ps1
Get-WmiObject Win32_Process | Where-Object {
$_.CommandLine -like "*send-f15.ps1*"
} | ForEach-Object {
Stop-Process -Id $_.ProcessId -Force
}
ファイル:send-f15.ps1
Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;
public class K {
[DllImport("user32.dll")] public static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, UIntPtr dwExtraInfo);
}
"@
while ($true) {
[K]::keybd_event(0x7E, 0, 0, [UIntPtr]::Zero)
Start-Sleep -Milliseconds 50
[K]::keybd_event(0x7E, 0, 2, [UIntPtr]::Zero)
Start-Sleep -Seconds 30
}