我正在使用这个脚本来创建一个用户......我希望它将 shell 设置为“c:\app\myapp.exe”之类的东西,并且只针对那个用户..希望有人可以为我填写空白。谢谢你..对于Windows 7
Set WshShell = WScript.CreateObject("WScript.Shell")
If WScript.Arguments.length = 0 Then
Set ObjShell = CreateObject("Shell.Application")
ObjShell.ShellExecute "wscript.exe", """" & _
WScript.ScriptFullName & """" &_
" RunAsAdministrator", , "runas", 1
else
strComputer = "PC2"
Set colAccounts = GetObject("WinNT://" & strComputer & "")
Set objUser = colAccounts.Create("user", "Admin2")
objUser.SetPassword "test"
objUser.SetInfo
msgbox "done"
end if