X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=installer%2Finstaller.c;h=85f91be983ca2b8216457d4d298e8fc07c6bef34;hb=1b806a1e99e7e6009f9a37bab11ab7a5fb1b1d9c;hp=05017f4d85890a6ae33831d8e40869cacd60290b;hpb=e0ec3fa71d079e7a289c624bf8aa9fd1957d2f5a;p=swftools.git diff --git a/installer/installer.c b/installer/installer.c index 05017f4..85f91be 100644 --- a/installer/installer.c +++ b/installer/installer.c @@ -425,7 +425,7 @@ BOOL CALLBACK PropertySheetFunc2(HWND hwnd, UINT message, WPARAM wParam, LPARAM } } if(message == WM_NOTIFY && (((LPNMHDR)lParam)->code == PSN_SETACTIVE)) { - if(!elevated && !has_full_access && config_forAllUsers) { + if(!elevated && !has_full_access) { OSVERSIONINFO winverinfo; memset(&winverinfo, 0, sizeof(OSVERSIONINFO)); winverinfo.dwOSVersionInfoSize = sizeof(winverinfo); @@ -563,10 +563,14 @@ BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM printf("a GUI program exists, creating desktop/startmenu links\n"); config_createLinks = 1; fclose(fi); + } else { + config_createLinks = 0; + config_createStartmenu = 0; + config_createDesktop = 0; } if(!config_createLinks) { - SendDlgItemMessage(hwnd, IDC_STARTMENU, SW_HIDE, 0, 0); - SendDlgItemMessage(hwnd, IDC_DESKTOP, SW_HIDE, 0, 0); + SendDlgItemMessage(hwnd, IDC_STARTMENU, BN_DISABLE, 0, 0); + SendDlgItemMessage(hwnd, IDC_DESKTOP, BN_DISABLE, 0, 0); } SendDlgItemMessage(hwnd, IDC_STARTMENU, BM_SETCHECK, config_createStartmenu, 0); @@ -575,13 +579,17 @@ BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM if(message == WM_COMMAND) { if((wParam&0xffff) == IDC_STARTMENU) { config_createStartmenu = SendDlgItemMessage(hwnd, IDC_STARTMENU, BM_GETCHECK, 0, 0); - config_createStartmenu^=1; + if(config_createLinks) { + config_createStartmenu^=1; + } SendDlgItemMessage(hwnd, IDC_STARTMENU, BM_SETCHECK, config_createStartmenu, 0); return 0; } if((wParam&0xffff) == IDC_DESKTOP) { config_createDesktop = SendDlgItemMessage(hwnd, IDC_DESKTOP, BM_GETCHECK, 0, 0); - config_createDesktop^=1; + if(config_createLinks) { + config_createDesktop^=1; + } SendDlgItemMessage(hwnd, IDC_DESKTOP, BM_SETCHECK, config_createDesktop, 0); return 0; }