[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[注册表类] [求助]reg add 命令字数太长如何解决?

reg query "HKCR\Microsoft.PowerShellScript.1\shell"
reg add "HKCR\Microsoft.PowerShellScript.1\shell\runas" /f
reg add "HKCR\Microsoft.PowerShellScript.1\shell\runas" /v "HasLUAShield" /f
reg add "HKCR\Microsoft.PowerShellScript.1\shell\runas\Command" /f

:: PowerShell.exe "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"

reg add "HKCR\Microsoft.PowerShellScript.1\shell\runas\Command" /ve /d "PowerShell.exe \"-Command\" \"if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'\""

最后一句应该是字符太长无法执行?

回复 2# xczxczxcz


    本意实现右键管理员运行ps1文件;上述reg add执行成功,功能暂时还不满足。

TOP

返回列表