mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
make more robust by calling GetSystemDirectory
svn path=/trunk/; revision=18648
This commit is contained in:
parent
eec7e9d35d
commit
6d032338d0
1 changed files with 12 additions and 5 deletions
|
@ -400,6 +400,8 @@ InstallReactOS (HINSTANCE hInstance)
|
|||
{
|
||||
TCHAR sAccessories[256];
|
||||
TCHAR sGames[256];
|
||||
TCHAR Sys[_MAX_PATH];
|
||||
|
||||
|
||||
# if 0
|
||||
OutputDebugStringA ("InstallReactOS() called\n");
|
||||
|
@ -447,12 +449,17 @@ InstallReactOS (HINSTANCE hInstance)
|
|||
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 )
|
||||
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();
|
||||
|
|
Loading…
Reference in a new issue