if(NS_LoadString(hInst, IDS_ERROR_GET_WINDOWS_DIRECTORY_FAILED, szEGetWinDirFailed, MAX_BUF) == WIZ_OK)
if(GetPrivateProfileString("Messages", "ERROR_GET_WINDOWS_DIRECTORY_FAILED", "", szEGetWinDirFailed, sizeof(szEGetWinDirFailed), szFileIniUninstall))
HRESULT Initialize(HINSTANCE hInstance){  char szBuf[MAX_BUF];  HWND hwndFW;  hDlgMessage = NULL;  DetermineOSVersion();  gdwWhatToDo = WTD_ASK;  /* load strings from setup.exe */  if(NS_LoadStringAlloc(hInst, IDS_ERROR_GLOBALALLOC, &szEGlobalAlloc, MAX_BUF))    return(1);  if(NS_LoadStringAlloc(hInst, IDS_ERROR_STRING_LOAD, &szEStringLoad,  MAX_BUF))    return(1);  if(NS_LoadStringAlloc(hInst, IDS_ERROR_DLL_LOAD,    &szEDllLoad,     MAX_BUF))    return(1);  if(NS_LoadStringAlloc(hInst, IDS_ERROR_STRING_NULL, &szEStringNull,  MAX_BUF))    return(1);  ZeroMemory(szBuf, sizeof(MAX_BUF));  if((szClassName = NS_GlobalAlloc(MAX_BUF)) == NULL)    return(1);  lstrcpy(szClassName, CLASS_NAME);  /* Allow only one instance of setup to run.   * Detect a previous instance of setup, bring it to the    * foreground, and quit current instance */  if((hwndFW = FindWindow(szClassName, szClassName)) != NULL)  {    ShowWindow(hwndFW, SW_RESTORE);    SetForegroundWindow(hwndFW);    return(1);  }  hAccelTable = LoadAccelerators(hInst, szClassName);  if((szUninstallDir = NS_GlobalAlloc(MAX_BUF)) == NULL)    return(1);  GetModuleFileName(NULL, szBuf, sizeof(szBuf));  ParsePath(szBuf, szUninstallDir, MAX_BUF, PP_PATH_ONLY);  if((szTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL)    return(1);  if((szOSTempDir = NS_GlobalAlloc(MAX_BUF)) == NULL)    return(1);  if((szFileIniUninstall = NS_GlobalAlloc(MAX_BUF)) == NULL)    return(1);  lstrcpy(szFileIniUninstall, szUninstallDir);  AppendBackSlash(szFileIniUninstall, MAX_BUF);  lstrcat(szFileIniUninstall, FILE_INI_UNINSTALL);  // determine the system's TEMP path  if(GetTempPath(MAX_BUF, szTempDir) == 0)  {    if(GetWindowsDirectory(szTempDir, MAX_BUF) == 0)    {      char szEGetWinDirFailed[MAX_BUF];      if(NS_LoadString(hInst, IDS_ERROR_GET_WINDOWS_DIRECTORY_FAILED, szEGetWinDirFailed, MAX_BUF) == WIZ_OK)        PrintError(szEGetWinDirFailed, ERROR_CODE_SHOW);      return(1);    }    AppendBackSlash(szTempDir, MAX_BUF);    lstrcat(szTempDir, "TEMP");  }  lstrcpy(szOSTempDir, szTempDir);  AppendBackSlash(szTempDir, MAX_BUF);  lstrcat(szTempDir, WIZ_TEMP_DIR);  if(!FileExists(szTempDir))  {    AppendBackSlash(szTempDir, MAX_BUF);    CreateDirectoriesAll(szTempDir);    if(!FileExists(szTempDir))    {      char szECreateTempDir[MAX_BUF];      if(NS_LoadString(hInst, IDS_ERROR_CREATE_TEMP_DIR, szECreateTempDir, MAX_BUF) == WIZ_OK)      {        wsprintf(szBuf, szECreateTempDir, szTempDir);        PrintError(szBuf, ERROR_CODE_HIDE);      }      return(1);    }    RemoveBackSlash(szTempDir);  }  return(0);}