Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/21/2014 in all areas

  1. There are some ways to do this. Such as using a external DLL.But I do not like this way. The Inno surport Pascal script. The Pascal script can call standard Win32 API functions inside standard Windows DLLs. So we can check the app is whether running. Here is a part of script in section:; Any question, let me know. ;It work on 32 and 64 modules! [code] type HANDLE = LongInt; HMODULE = HANDLE; pHMODULE = Array[0..255] of HMODULE; LPDWORD = DWORD; PDWORD = Array[0..255] of DWORD; LPTSTR = String; const PROCESS_QUERY_INFORMATION = $400; PROCESS_VM_READ = $10; MAX_LENGTH = 255; function OpenProcess(dwDesiredAccess : DWORD; bInheritHandle : Boolean; dwProcessId : DWORD) : HANDLE; external 'OpenProcess@kernel32.dll stdcall delayload'; function CloseHandle(hObject : HANDLE) : BOOL; external 'CloseHandle@kernel32.dll stdcall delayload'; function EnumProcesses(var pProcessIds : PDWORD; cb : DWORD; var pBytesReturned : DWORD) : BOOL; external 'EnumProcesses@psapi.dll stdcall delayload'; //notice:delayload EnumProcessModules and EnumProcessModulesEx functions //64-bit using EnumProcessModulesEx; 32-bite using EnumProcessModules function EnumProcessModulesEx(hProcess : HANDLE; var lphModule : pHMODULE; cb : DWORD; var lpcbNeeded : LPDWORD; dwFilterFlag : DWORD) : BOOL; external 'EnumProcessModulesEx@psapi.dll stdcall delayload';function EnumProcessModules(hProcess : HANDLE; var lphModule : pHMODULE; cb : DWORD; var lpcbNeeded : LPDWORD) : BOOL; external 'EnumProcessModules@psapi.dll stdcall delayload'; function GetModuleFileNameExW(hProcess : HANDLE; hModule : HMODULE; lpFilename : LPTSTR; nSize : DWORD) : DWORD; external 'GetModuleFileNameExW@psapi.dll stdcall delayload'; //here is the functionfunction zylIsAppRunning(procName : String; fullPath : Boolean) : Boolean; var found : Boolean; filenameEnd : Integer; filename : String; NA : DWORD; entry : DWORD; maxEntries : DWORD; processes : PDWORD; lpFilename : LPTSTR; hProcess : HANDLE; hMod : pHMODULE; isModuleShot: Boolean; begin SetLength(lpFilename, MAX_LENGTH); found := False; if (EnumProcesses(processes, SizeOf(processes), maxEntries)) then begin entry := 0; maxEntries := maxEntries / SizeOf(maxEntries); while ((not found) and (entry < maxEntries)) do begin hProcess := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ, False, processes[entry]); if (hProcess <> 0) then begin isModuleShot := False; if IsWin64 then begin //EnumProcessModulesEx @param $3,surport 32-bit modules and 64-bit modules the sametiem isModuleShot := EnumProcessModulesEx(hProcess, hMod, SizeOf(hMod), NA, $3); end else begin isModuleShot := EnumProcessModules(hProcess, hMod, SizeOf(hMod), NA); end; if (isModuleShot) then if (GetModuleFileNameExW(hProcess, hMod[0], lpFilename, Length(lpFilename)) > 0) then begin filenameEnd := Pos(#0, lpFilename); filename := Copy(Lowercase(lpFilename), 1, filenameEnd - 1); if (not fullpath) then filename := ExtractFileName(filename); if (AnsiLowercase(filename) = AnsiLowercase(procName)) then found := True; end; CloseHandle(hProcess); end; entry := entry + 1; end; end; Result := found; end;//function end How to use: I wish you have installed the Unicode Inno Setup (the 5.5.x version or more).(If not, you can download it from the home page http://www.jrsoftware.org) You can use it where you need just like:zylIsAppRunning('notdpad.exe', false); An example project for Unicode Inno Setup is provided as download. The attachment "CheckAppRunning.zip" is the script. Unzip the file CheckAppRunning.zip, you can get a file named "CheckAppRunning.iss". Please copy the *.iss files to the directory: ./Inno Setup 5/Examples Then build the program and run it. CheckAppRunning.zip
    1 point
  2. MagicISO Maker v5.5 (Build 281) + MagicDisc v2.7.106 -- RePack by niTe_RiDeR_Pro + NOTE - You can select which programs to install in the setup wizard. This is the trial unregistered version of MagicISO. MagicDisc is a freeware. Command Line Options: Usage: miso.maker.5.5_mdisc.2.7.106_repack-_-niTe_RiDeR.exe [switch] All switches are optional. Switches: Examples: miso.maker.5.5_mdisc.2.7.106_repack-_-niTe_RiDeR.exe /SILENT /NORESTART /SUPPRESSMSGBOXES /LOGmiso.maker.5.5_mdisc.2.7.106_repack-_-niTe_RiDeR.exe /VERYSILENT /NORESTART /SUPPRESSMSGBOXES /COMPONENTS="magiciso" File Name: miso.maker.5.5_mdisc.2.7.106_repack-_-niTe_RiDeR.exe File Size: 4.89 MB (51,33,035 bytes) Architecture Supported: Both (x64 & x86) MD5: B3BCEC337246BB452F8B59E4B1EC86A7 SHA1: 838A5BA53083B7544AEAE64952E706C2B7E15D9A Enjoy! :thumbsup:
    1 point
  3. Will try, currently downloading (Data Usage Limit over, currently at 56KB/sec...
    1 point
  4. move the wintoolkit_apps dir to the root of the usb.
    1 point
×
×
  • Create New...