Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Defrag from NSIS (http://forums.winamp.com/showthread.php?t=333254)

dougcvc 6th August 2011 10:16

Defrag from NSIS
 
Hello,

I am trying to use the Microsoft disk defragmenter in an NSIS script i am working on, but even in this simple example It does not work. It just does not seem to launch the defrag executable.

I am sure the command itself is correct as the exact command works from a batch file.
I have also tried exec, execwait, nsexec::exec with no luck.
I am using Windows 7 64 bit.

Here is the example:

code:
Name "defrag"
OutFile "defrag.exe"
RequestExecutionLevel Admin
InstallDir "$TEMP\"
XPStyle on
page instfiles

Section ""

execwait '"c:\windows\system32\chkdsk" C:' #This works
execwait '"c:\windows\system32\defrag.exe" C:\' #This does not

SectionEnd



Many thanks


EDIT:
fixed, i had to include x64.nsh then ${DisableX64FSRedirection}.


All times are GMT. The time now is 18:04.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.