From 6d032338d09cda7d5e358ab48068d45c293797aa Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Thu, 20 Oct 2005 23:08:44 +0000 Subject: [PATCH] make more robust by calling GetSystemDirectory svn path=/trunk/; revision=18648 --- reactos/lib/syssetup/install.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/reactos/lib/syssetup/install.c b/reactos/lib/syssetup/install.c index a3ab01cb177..e3a819924e5 100644 --- a/reactos/lib/syssetup/install.c +++ b/reactos/lib/syssetup/install.c @@ -400,6 +400,8 @@ InstallReactOS (HINSTANCE hInstance) { TCHAR sAccessories[256]; TCHAR sGames[256]; + TCHAR Sys[_MAX_PATH]; + # if 0 OutputDebugStringA ("InstallReactOS() called\n"); @@ -446,13 +448,18 @@ InstallReactOS (HINSTANCE hInstance) CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("explorer.lnk"), _T("explorer.exe"), IDS_CMT_EXPLORER); CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("regedit.lnk"), _T("regedit.exe"), IDS_CMT_REGEDIT); } - + + if(!GetSystemDirectory(Sys, _MAX_PATH)) + Sys[0] = L'\0'; + /* create Games subfolder and fill if the exe is available */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, sGames, 256)) { - /* Check for existence */ - if( (_access( "c:\\reactos\\system32\\sol.exe", 0 )) != -1 ) - CreateShortcut(CSIDL_PROGRAMS, sGames, _T("Solitaire.lnk"), _T("sol.exe"), IDS_CMT_SOLITAIRE); - + if (Sys[0] != L'\0') { + if((_taccess(_tcscat(Sys, _T("\\sol.exe")), 0 )) != -1) + CreateShortcut(CSIDL_PROGRAMS, sGames, _T("Solitaire.lnk"), _T("sol.exe"), IDS_CMT_SOLITAIRE); + + /* winemine etc .... */ + } } CoUninitialize();