lorents
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору парни посмотрите плиз где я ошибся код значит делает следующее, проверяет какой windows установлен, затем проверяет установлены ли Adobe Acrobat Reader, Internet Explorer и Windows Media Player и какая версия установлена если все норм то запускает приложение одним словом вот код Код: instances_of_file = 0; file_to_check_for = "7z460.exe"; processes = Window.EnumerateProcesses(); for j, file_path in processes do file = String.SplitPath(file_path); if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then instances_of_file = instances_of_file + 1; hWnd = j; break; end end strAcrobatVer = ir_GetAcrobatVersion(); strIEVer = ir_GetIEVersion() strWMPVer = ir_GetWMPVersion() OS_Name = System.GetOSName(); if (os_name =="Windows Vista") or (os_name =="Windows Server 2008") or (os_name =="Windows XP") or (os_name =="Windows Server 2003") or (os_name =="Windows 2000") then if (strAcrobatVer == "0.0.0.0") or (String.CompareFileVersions(strAcrobatVer, "7.0.9.0") == -1) or (strWMPVer == "0.0.0.0") or (String.CompareFileVersions(strWMPVer, "7.1.0.0") == -1) or (strIEVer == "0.0.0.0") or (String.CompareFileVersions(strIEVer, "5.5.0.0") == -1) then result = DialogEx.Show("Dialog1", true, nil, nil); else if instances_of_file > 0 then Window.SetOrder(hWnd, HWND_TOP); else File.Run("AutoPlay\\Docs\\7z460.exe", "", "", SW_SHOWNORMAL, false); end Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE); end elseif (os_name =="Windows NT 4") or (os_name =="Windows NT 3") or (os_name =="Windows ME") or (os_name =="Windows 98") or (os_name =="Windows 95") then result = Dialog.Message("Error", "Your message here.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1); if (result == IDOK) then Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE); end else if (strAcrobatVer == "0.0.0.0") or (String.CompareFileVersions(strAcrobatVer, "7.0.9.0") == -1) and (strWMPVer == "0.0.0.0") or (String.CompareFileVersions(strWMPVer, "7.1.0.0") == -1) and (strIEVer == "0.0.0.0") or (String.CompareFileVersions(strIEVer, "5.5.0.0") == -1) then result = DialogEx.Show("Dialog1", true, nil, nil); else if instances_of_file > 0 then Window.SetOrder(hWnd, HWND_TOP); else File.Run("AutoPlay\\Docs\\7z460.exe", "", "", SW_SHOWNORMAL, false); end Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE); end end |
| Всего записей: 3297 | Зарегистр. 30-12-2007 | Отправлено: 17:00 22-11-2008 | Исправлено: lorents, 15:09 23-11-2008 |
|