Go Back   Winamp Forums > Developer Center > NSIS Discussion

 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 22nd June 2010, 17:07   #1
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
Unable to locate file dpinst.exe

Hi,
I have been trying the following piece of code on a Windows 7 x64 machine for some time and it just doesn't work.
The Notepad.exe can be located but not dpinst.exe although it is very much present in the directory.

code:

!include "LogicLib.nsh"
Name "Example1"
OutFile "example1.exe"
InstallDir $DESKTOP\Example1

# Added by me
RequestExecutionLevel highest

Page directory
Page instfiles

Var /GLOBAL fname

Section ""
SetOutPath $INSTDIR

MessageBox MB_OK "SYSDIR: $SYSDIR"

;StrCpy $fname "$SYSDIR\notepad.exe"
StrCpy $fname "$SYSDIR\dpinst.exe"

${If} ${FileExists} $fname
MessageBox MB_OK "1"
${Else}
SearchPath $0 dpinst.exe
${If} ${FileExists} $0
MessageBox MB_OK "2"
${Else}
MessageBox MB_OK "3"
${EndIf}
${EndIf}
SectionEnd ; end the section



I could also make do with just "IfFileExists" ... that doesn't work either!

Any help would be appreciated, thanks!

Regards,
Shantanu
shantanu_gadgil is offline   Reply With Quote
 
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump