I am trying to start and stop a service "net stop w32time" and "net start
w32time" with the code below but failed to do so. Why why why? Any idea or
suggestions? Many thanks!!
================
NETIns_HINST :=ShellExecute(Handle, 'open', 'net stop w32time', nil, nil,
SW_SHOWNORMAL);
if NETIns_HINST <= 32 then
begin
Application.MessageBox(PChar('Error'#13#13'ShellExecute() = ' +
IntToStr(NETIns_HINST)), PChar(Application.Title), MB_ICONSTOP);
end;
================
Martin
ShellExecute(Handle, 'open', 'net.exe', 'start w32time', nil, 0);
and make sure w32time is the service name not the exe name.
David
"Martin" <martin...@austco.com> schreef in bericht news:4132...@newsgroups.borland.com...
Next question :)
Under Win2000 command prompt the auto yes pipe doesn't work? Is there a
trick??
c:\>echo Y| net time \\PC1 /set
Thanks!
Martin
"David" <hedel2[*removeme*]@zonnet.nl> wrote in message
news:4132d189$1...@newsgroups.borland.com...