nsCOMPtr<nsIProcess> cleanupProcess = do_CreateInstance(kIProcessCID);
nsCOMPtr<nsIProcess> cleanupProcess = do_CreateInstance(NS_PROCESS_CONTRACTID);
static nsresult VerifyInstallation(int argc, char **argv){#ifdef MOZ_XPINSTALL  nsresult rv;  nsCOMPtr<nsILocalFile> registryFile;  nsCOMPtr<nsIProperties> directoryService =           do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);  if (NS_FAILED(rv))    return NS_OK;  rv = directoryService->Get(NS_APP_INSTALL_CLEANUP_DIR,                             NS_GET_IID(nsIFile),                             getter_AddRefs(registryFile));  if (NS_FAILED(rv) || !registryFile)    return NS_ERROR_FAILURE;  registryFile->AppendNative(CLEANUP_REGISTRY);  PRBool exists;  registryFile->Exists(&exists);  if (exists)  {    nsCOMPtr<nsIFile> binPath;    const char lastResortMessage[] = "A previous install did not complete correctly.  Finishing install.";    ShowOSAlertFromFile(argc, argv, CLEANUP_MESSAGE_FILENAME.get(), lastResortMessage);    nsCOMPtr<nsIFile> cleanupUtility;    registryFile->Clone(getter_AddRefs(cleanupUtility));    cleanupUtility->SetNativeLeafName(CLEANUP_UTIL);    //Create the process framework to run the cleanup utility    nsCOMPtr<nsIProcess> cleanupProcess = do_CreateInstance(kIProcessCID);    rv = cleanupProcess->Init(cleanupUtility);    if (NS_SUCCEEDED(rv))      rv = cleanupProcess->Run(PR_FALSE,nsnull, 0, nsnull);    //We must exit because all open files must be released by the system    return NS_ERROR_FAILURE;  }#endif  return NS_OK;}