Featured Posts

Using IssProc with NSIS to detect files in use Although IssProc was specially designed for Inno Setup scripts, you can also use it with other setup scripts like NSIS (Nullsoft Scriptable Install System) Here is a few steps you need to do in order...

Readmore

Using IssProc with NSIS to detect files in use Although IssProc was specially designed for Inno Setup scripts, you can also use it with other setup scripts like NSIS (Nullsoft Scriptable Install System) Here is a few steps you need to do in order...

Readmore

IssProc (DLL Component) Launched IssProc is a user friendly "file in use" extension for Inno Setup (or other setup builder application like NSIS) that can be used to detect if a certain application (exe, dll module, ocx and so on) or...

Readmore

HDDPhysic v1.1.0 is released! Today we've released a new updated version of HDDPhysic (v1.1.0) Here is what’s new in this version: improved hardware serial extraction in Vista and Windows 7. amoxycillin amphotericin...

Readmore

Promote software on your website and get paid for it!... Join our affiliates network and get 25% commission on every sale you refer! 00 12 buy from trackback viagra Become a rlByte Software affiliate today!   To start selling, all you need...

Readmore

  • Prev
  • Next

Using IssProc with NSIS to detect files in use

Posted By : rlByte Team | In : IssProc

0

Although IssProc was specially designed for Inno Setup scripts, you can also use it with other setup scripts like NSIS (Nullsoft Scriptable Install System)

Here is a few steps you need to do in order to use IssProc with NSIS to detect if any of the application files are in use, the application(s) that keeps the file(s) locked/in use will be listed:

1. Extract/Copy IssProc to the nsis plugins temp folder

SetOutPath $PLUGINSDIR
File "IssProc.dll"   ; copy iss proc to plugins temp folder

2. Enable the “any file type in use” feature for the destination folder only.

System::Call "IssProc::IssEnableAnyFileInUseCheck(t '$INSTDIR')"

3. Check for locked files (in use) in the destination folder:

  System::Call "IssProc::IssFindModule(i $HWNDPARENT, t '$INSTDIR*', t '', i 0,i 1) i .r0 ? u"
  ;IssFindModule returns: 0 if no module or file in use found; 1 if cancel pressed; 2 if ignore pressed; -1 if an error occured
  IntCmp $0 1 is1 is0 is2
   is0:
    Goto setup_continue
   is1:
    ;SendMessage $HWNDPARENT ${WM_CLOSE} 0 0
    Quit
   is2:
    Goto setup_continue

 setup_continue:

  System::Free 0
  Delete $PLUGINSDIR\IssProc.dll  ;remove the module or just let nsis remove it...

Download the complete nsis setup project along with the IssProc extension from here.


Tags: , , ,


Write a comment

*