Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm not familiar with NSIS, but you may find this little "DOS" trick helpful. </p> <p>I did notice that it is possible to open a file with NSIS, so this may help --</p> <pre><code>chkntfs c: | find "file system" &gt; yourfile.abc </code></pre> <p>CHKNTFS is a utility for managing the CHKDSK operations, but if you run the command with no command line switches, it simply reports the results. </p> <p>the "C:" is the drive you're interested in --</p> <p>You can run this from a command prompt to see the result, without the <strong>"> yourfile.abc"</strong> part, of course, which is what directs the output into that file.</p> <p>Before anyone down votes this, I just offer it as a thought provoking SUGGESTION, perhaps sparking the real solution and remember SO motto -- be KIND ... lol ...</p> <p>EDIT: this snippet may help -- I have no way to really TEST this -- THIS IS COMPILE TIME USAGE -- and you will most likely want RUN-TIME ... BUT, it may give you an idea ...</p> <p>I "assume" there isn't a define already named NTFS -- if so, change this accordingly. The first call CREATES the include file, the second APPENDS to it (the double > )... The /C option for FIND simply COUNTS the number lines containing the search item. Hence, the 0 or 1 result.</p> <pre><code>!system 'echo "!define NTFS=" &gt; newinclude.nsh' !system 'chkntfs c: | find /c "NTFS" &gt;&gt; newinclude.nsh' !include newinclude.nsh !ifdef NTFS !echo "NTFS is defined and value should reflect accordingly; 0=NO, 1=Yes it is NTFS" !endif </code></pre> <p><strong>EDIT: (again, lol)</strong></p> <p>here's a snippet that will set an ENVIRONMENT variable, which from what I can tell, should be rather easy to read during run-time -- you could construct a variable to execute, replacing the drive letter accordingly.</p> <pre><code>ExecWait 'chkntfs c: | find /c "NTFS" &gt; tempfile.abc' ExecWait 'set /p NTFS= &lt; tempfile.abc' Exec 'del tempfile.abc' </code></pre> <p>Now, an environment variable called NTFS should hold a 0 if not NTFS and 1 if the volume being inspected IS NTFS.</p> <p>Or directly </p> <pre><code>ExecWait 'chkntfs c: | find /c "NTFS"' $0 </code></pre> <p>$0 holds the return code; The results are kind of backwards as this is the ERROR return code. If 0 you HAVE NTFS and > 0 means NO NTFS.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload