Friday, 7 October 2011

NSIS installer for 64-bit Windows

Here are some tips for creating (32-bit) NSIS installer which installs 64-bit application on 64-bit Windows.

There is no 64-bit NSIS Installer (yet) so only 32-bit version will be running on 64-bit host which means that 32-bit redirection will take place: by default its Installation Directory is "C:\Program Files (x86)" and it reads/writes only from HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node portion of the registry. This is not what we want so we need to enable access to native Win64 directories/registry for our Installer.

Our installer, as 32-bit application, will probably be used both for 32-bit and 64-bit installations. It therefore needs to be able to determine architecture of the CPU it runs on. x64 plug-in offers macro RunningX64 which returns true if installer is running on 64-bit Windows (under WoW64 emulation):

setup.nsi:
!include x64.nsh
...
${If} ${RunningX64}
   DetailPrint "Installer running on 64-bit host"
${EndIf}

Once we've detected 64-bit host, we need to:
  • set "C:\Program Files" as Installation Directory - use $PROGRAMFILES64 instead of $PROGRAMFILES
  • enable access to 64-bit registry - use SetRegView NSIS command

setup.nsi:
!include x64.nsh

;set initial value for $INSTDIR
InstallDir "$PROGRAMFILES\${MY_COMPANY}\${MY_APP}"
...
${If} ${RunningX64}
   DetailPrint "Installer running on 64-bit host"
   ; disable registry redirection (enable access to 64-bit portion of registry)
   SetRegView 64
   ; change install dir
   StrCpy $INSTDIR "$PROGRAMFILES64\${MY_COMPANY}\${MY_APP}"
${EndIf}

If installer needs to detect whether some 64-bit process is running, use FindProcDLL plug-in (there are couple of versions available but I found only this one - FindProcDLL_mod_by_hnedka.7z - working for me; please have a look at this forum thread). Download this archived file, unpack it and copy FindProcDLL.dll to your ..\NSIS\Plugins directory.

setup.nsi:
${If} ${RunningX64}
   FindProcDLL::FindProc "Some64BitProcess.exe"
   ${If} $R0 == 1
      DetailPrint "FindProcDLL::FindProc() returned 1 (process is running)"
   ${ElseIf} $R0 == 0
      DetailPrint "FindProcDLL::FindProc() returned 0 (process is not running)"
   ${Else}
      DetailPrint "FindProcDLL::FindProc() returned unexpected value"
   ${Endif}
${Else}
...

14 comments:

Unknown said...

If you need to install either a 32-bit or 64-bit file, you can do this:

${If} ${RunningX64}
File "/oname=MyFile.exe" "files\MyFile64.exe"
${Else}
File "files\MyFile.exe"
${EndIf}

If you need to register a DLL, you can do this:

${If} ${RunningX64}
ExecWait 'regsvr32.exe /s "$INSTDIR\MyDLL.dll"'
${Else}
RegDLL "$INSTDIR\MyDLL.dll"
${EndIf}

(Or use Library.nsh)

Linards said...

This is just 0,01 % of the whole story. Biggest pain is to compile / debug excisting script.

Leads Seller said...

**SELLING SSN+DOB FULLZ**

CONTACT
Telegram > @leadsupplier
ICQ > 752822040
Email > leads.sellers1212@gmail.com

>>1$ each without DL/ID number
>>2$ each with DL
>>5$ each for premium (also included relative info)

*Will reduce price if buying in bulk
*Hope for a long term business

FORMAT OF LEADS/FULLZ/PROS

->FULL NAME
->SSN
->DATE OF BIRTH
->DRIVING LICENSE NUMBER WITH EXPIRY DATE
->COMPLETE ADDRESS
->PHONE NUMBER, EMAIL, I.P ADDRESS
->EMPLOYMENT DETAILS
->REALTIONSHIP DETAILS
->MORTGAGE INFO
->BANK ACCOUNT DETAILS

>Fresh Leads for tax returns & w-2 form filling
>Payment mode BTC, ETH, LTC, PayPal, USDT & PERFECT MONEY

''OTHER GADGETS PROVIDING''

>SSN+DOB Fullz
>CC with CVV
>Photo ID's
>Dead Fullz
>Carding Tutorials
>Hacking Tutorials
>SMTP Linux Root
>DUMPS with pins track 1 and 2
>Sock Tools
>Server I.P's
>HQ Emails with passwords

Email > leads.sellers1212@gmail.com
Telegram > @leadsupplier
ICQ > 752822040

THANK YOU

SCRUITNIZE said...

HIRE A CYBER SECURITY SPECIALIST / CRYPTANALYST

I’m Cyber Security Professional and do all kinds of related works and give 100% satisfaction and confidential to my clients

I am providing services to my valuable clients:-

* Crypto currency i.e. BTC / ETH / XRP
* Paypal Acc
* Bank Transfer
* Credit cards
* Spamming
* Carding
* Virus/Rate
* Private Root Scanner
* Private WHM Scanner

Contact details: scruitnizes@gmail.com

micheal pan said...

BE SMART AND BECOME RICH IN LESS THAN 3DAYS....It all depends on how fast 
you can be to get the new PROGRAMMED blank ATM card that is capable of
hacking into any ATM machine,anywhere in the world. I got to know about 
this BLANK ATM CARD when I was searching for job online about a month 
ago..It has really changed my life for good and now I can say I'm rich and 
I can never be poor again. The least money I get in a day with it is about 
$50,000.(fifty thousand USD) Every now and then I keeping pumping money 
into my account. Though is illegal,there is no risk of being caught 
,because it has been programmed in such a way that it is not traceable,it 
also has a technique that makes it impossible for the CCTVs to detect 
you..For details on how to get yours today, email the hackers on : (
atmmachinehackers1@gmail.com ). Tell your 
loved once too, and start to live large. That's the simple testimony of how 
my life changed for good...Love you all ...the email address again is ;
atmmachinehackers1@gmail.com

phillipsgrey said...

Here at Pot City Herbs Community , You can easily get various strains such as : Sour diesel , Lemon haze , Blue cookies , Blue Cookies Strain ,
Blue Cookies Strain Review , Platinum kush , Banana kush
Gelato #4 , Afghani strain , Wedding cake strain , Wedding crasher strain ,
Blue dream strain , Amnesia haze , purple Animal cookies strain
Gorilla glue #33, Purple punch strain, Strawnana Strain , Granddaddy purple,
Purple haze strain , Thin mints Cookies strain, Hindu Kush strain
blueberry headband strain ,Northern lights strain , White widows strain ,True OG
Silver haze strain, Big Bud Strain , Jack Herrer , American Dream , OG Kush.

BLUE COOKIES STRAIN

Wickr Me : Budboos
Email: Budboos@protonmail.com
Text/Call: +15672460706
Visit: Potcityherbs.com

NoveltyDMVExperts said...


Driving license test has always been hard for everyone to make it through but novelty DMV experts has put in place the best and easier ways for you to obtain a a drivers license of any country and Class from home without any stress with just a Click away . Fake driver license , How to get a fake drivers license that works , how to get a fake drivers license from the dmv , Fake license , FAKE DRIVER LICENSE
Buy fake driving license online , Fake drivers license , how to get a fake drivers license that works , fake driving, fake driving school, fake driving school full
fakedrivingschool .

PAPERWORK EXPERTS PROGRAMMERS said...

Very interesting article. Many articles I come across these days do not really provide anything that attracts others as yours, but believe me the way you interact is literally awesome I do respect that so much. I will instantly grab your rss feed to stay informed of any updates you make and as well take the advantage to share some latest information about

UNDETECTED FAKE BIRTH CERTIFICATE FOR FOREIGN PASSPORTS which many are not yet informed of the new and easiest way to get a dual citizenship through this birth certificate in any country and their advantages over the normal way. I will also take the advantage to ask for your permission to join our 179.3k members TELEGRAM GROUP
to share with us your ideas or any latest update on your blog.
Thanks I am Scott from Globex, we are expecting you on our platform
Thank so much for the great job. You can Call me Scott

Unknown said...



Hello all
am looking few years that some guys comes into the market
they called themselves hacker, carder or spammer they rip the
peoples with different ways and it’s a badly impact to real hacker
now situation is that peoples doesn’t believe that real hackers and carder scammer exists.
Anyone want to make deal with me any type am available.

Available Services

..Wire Bank Transfer all over the world

..Western Union Transfer all over the world

..Credit Cards (USA, UK, AUS, CAN, NZ)

..School Grade upgrade / remove Records

..Spamming Tool

..keyloggers / rats

..Social Media recovery

.. Teaching Hacking / spamming / carding (1/2 hours course)

discount for re-seller

Contact: 24/7

fixitrogers@gmail.com


BIG BROTHERS ILLU said...

Great specific article directly to the point. Many articles I come across these days do not really provide anything that attracts others as yours, but believe me the way you interact is literally awesome I do respect that so much. I will instantly get your link and stay informed of any updates you make and as well take the advantage to share some vital information regarding the. Hacked credit card numbers with cvv and zip code Here are easy ways, you can get a credit cards and code with high balance which can be use world-wild,I will also take the advantage to ask for your permission to join our TELEGRAM GROUP

Ethan Henry said...

I really appreciate the way you people freelance wordpress developer my plugin. Thanks!

Antonio Rainey said...

Wonderful piece you got here , I feel quite happy after I read your Article because I found out that we still have intelligent informative researchers who can still take time out of their busy schedule to put all this together I FOUND OUT HOW EASY IS TO SPOT A FAKE MALAYSIA PASSPORT I've bookmark your site and furthermore include RSS. keep us refreshed all the time.

Y’all don’t forget to join this EXPERTS TELEGRAM GROUP for more information about the Malaysian passport and and how to acquire them easily with no stress. You can also take advantage to learn and meet many Experts who will guide you on numerous techniques for anyone who love hacking and don’t know how to go about it .

Tools store said...






error404-store




- -- Spamming tools --




1-- cpanel https ssl secure
2-- shell ssl secure
3-- web-mail
4-- smtp
5-- rdp with send bluster
6-- scam pages
7-- ceo or cfo leads




-- Spy virus slinet Exploits --




1-- privet rat
2-- crypter exploits
3-- privet rdp hosting
4-- os andriod spy virus
5-- iso iPhone spy virus
6-- Nokia spy virus




- -- scanners brute-force ---




1-- linux roots
2-- cpanel scanner
3-- cpanel bruter
4-- shell scanner
5-- smtp scanner
6-- smtp bruter
7-- zimbra scanners


- -------------------


cpanel,shell,smtp,scampages,sender,ceo or cfo leads,rdp,spyvirus,crypter,exploits,scanners


Telegram:- @Donsmith000


icq :- @Donsmith000


https://error404-store.blogspot.com



Unknown said...







Hello all
am looking few years that some guys comes into the market
they called themselves hacker, carder or spammer they rip the
peoples with different ways and it’s a badly impact to real hacker
now situation is that peoples doesn’t believe that real hackers and carder scammer exists.
Anyone want to make deal with me any type am available

Available Services

..Wire Bank Transfer all over the world

..Western Union Transfer all over the world

..Credit Cards (USA, UK, AUS, CAN, NZ)

..School Grade upgrade / remove Records

..Spamming Tool

..keyloggers / rats

..Social Media recovery

.. Teaching Hacking / spamming / carding (1/2 hours course)

discount for re-seller

Contact: 24/7

fixitrogers@gmail.com