Old 3rd June 2013, 20:07   #1
adnanshaheen
Junior Member
 
Join Date: Oct 2012
Posts: 9
Copying DLL to $SYSDIR

Hi All,

Here is a code in my nsis script.

SetOutPath $SYSDIR
MessageBox MB_OK $SYSDIR ;This shows C:\windows\System32
${If} ${RunningX64}
File ".\My64bitDLL.dll"
${Else}
File ".\My32bitDLL.dll"
${EndIf}

But the DLL is copied to C:\Windows\SysWow64. Why is that???
The DLL copied is 64bit.
adnanshaheen is offline   Reply With Quote
Old 3rd June 2013, 23:06   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
x64.nsh

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 4th June 2013, 07:17   #3
adnanshaheen
Junior Member
 
Join Date: Oct 2012
Posts: 9
x64.nsh is included. If you read below, I said the 64bit dll was copied.

Question here is "why the dll is copied to SysWOW64, rather then being copied to system32".
I do get the proper 64bit ach from script at runtime.
adnanshaheen is offline   Reply With Quote
Old 26th July 2013, 14:56   #4
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Quote:
Originally Posted by adnanshaheen View Post
x64.nsh is included. If you read below, I said the 64bit dll was copied.

Question here is "why the dll is copied to SysWOW64, rather then being copied to system32".
I do get the proper 64bit ach from script at runtime.
If you read the comments above in x64.nsh...

Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Old 4th June 2013, 09:13   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You need to disable the file system redirection. NSIS is 32-bit so will get redirected to SysWOW64. To stop this use ${DisableX64FSRedirection}. You can just use this once in a hidden Section and it will disable the redirection for all sections (the current thread).

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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