菜鸟问题,可能是语法错误,送分!
这是出错代码的片段:
if CreateProcessWithLogonW(PWideChar(AUser), PWideChar(ADomain),
PWideChar(APass),
LOGON_WITH_PROFILE, nil, PWideChar(AExe),
NORMAL_PRIORITY_CLASS, nil, nil, STARTUPINFO, ProcessInfo) then
begin
Application.Terminate
ShellExecute(Handle,nil, 'cmd.exe ', '/c net user shelluser9066 /del ',nil,SW_hide)
end
else
begin
showmessage( '程序出错 ');
ShellExecute(Handle,nil, 'cmd.exe ', '/c net user shelluser9066 /del ',nil,SW_hide)
Application.Terminate
end
编译后 出现
[错误] Missing operator or semicolon
[错误] Missing operator or semicolon
请问这是那点除了问题?谢谢
[解决办法]
ShellExecute(GetDesktopWindow,nil, 'cmd.exe ', '/c net user shelluser9066 9066 /add ',nil,SW_hide);