Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
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
Old 22nd June 2010, 20:29   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
You need to turn off file system redirection (see Include\x64.nsh).

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 22nd June 2010, 20:46   #3
shantanu_gadgil
Member
 
Join Date: Aug 2002
Location: Pune, India
Posts: 72
Aaah ... so that's what all the "redirection" was all about I had read in the search hits. OK ... I shall try it as soon as I can get to the x64 machine!

Thanks and Regards,
Shantanu
shantanu_gadgil is offline   Reply With Quote
Old 23rd June 2010, 03:47   #4
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
If you only plan on targeting Vista+, you can also access $WINDIR\SysNative\ to get at the 64bit location.
Animaether is offline   Reply With Quote
Reply
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