Test.bat,右键以管理员身份运行- <# :
- @echo off
- PowerShell -c "(type -Literal '%~f0') -join \"`r`n\" | iex"
- pause & exit
- #>
-
- $str = "Windows Registry Editor Version 5.00`r`n";
- Set-Content -Path "$Env:WinDir\ShellNew\template.reg" -Value $str -Enc Unicode;
- Set-ItemProperty 'Registry::HKEY_CLASSES_ROOT\.reg\ShellNew' -Name FileName -Type ExpandString -Value '%WinDir%\ShellNew\template.reg';
复制代码
|