bat或者vbs写一个,创建软件快捷方式到开始菜单的代码,希望附上对代码的一些解释,谢谢
1个回答
展开全部
If WScript.Arguments.Named.Exists("elevated") = False Then
'以管理员方式裕兴
CreateObject("Shell.Application").ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ /elevated", "", "runas", 1
WScript.QuitElse
'去system32 下进行设置
Set oShell = CreateObject("WScript.Shell")
oShell.CurrentDirectory = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)End If
'以管理员方式裕兴
CreateObject("Shell.Application").ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ /elevated", "", "runas", 1
WScript.QuitElse
'去system32 下进行设置
Set oShell = CreateObject("WScript.Shell")
oShell.CurrentDirectory = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)End If
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询