(const unsigned char*)cwd, strlen(cwd));
(const unsigned char*)appPath, strlen(appPath));
int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR args, int){    HREG  reg;    HKEY  hkRunOnceHandle;    DWORD dwDisp;    int status = DONE;    if ( REGERR_OK == NR_StartupRegistry())    {        if ( REGERR_OK == NR_RegOpen("", &reg) )        {            LPTSTR cwd = new char[_MAX_PATH];            if (cwd)            {                GetCurrentDirectory(_MAX_PATH, cwd);                strcat(cwd, "\\xpicleanup.exe");                RegCreateKeyEx(HKEY_CURRENT_USER,                               "Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce",                               0,                               NULL,                               REG_OPTION_NON_VOLATILE,                               KEY_WRITE,                               NULL,                               &hkRunOnceHandle,                               &dwDisp);                                LPCTSTR cleanupKeyName = "mozilla_cleanup";                                RegSetValueEx(hkRunOnceHandle,                              cleanupKeyName,                              0,                              REG_SZ,                              (const unsigned char*)cwd,                              strlen(cwd));                do                 {                    status = PerformScheduledTasks(reg);                    if (status != DONE)                        Sleep(15000); // Sleep for 15 seconds                } while (status == TRY_LATER);                RegDeleteValue(hkRunOnceHandle, cleanupKeyName);                delete[] cwd;            }        }        NR_ShutdownRegistry();    }    return(0);}