Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:55:16+00:00 2026-06-09T23:55:16+00:00

I am completely new to NSIS installer script, I want to set the install

  • 0

I am completely new to NSIS installer script, I want to set the install directory to the largest disk on the computer. Can anyone guide me how to do it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:55:17+00:00Added an answer on June 9, 2026 at 11:55 pm
    !include LogicLib.nsh
    System::Call 'kernel32::GetLogicalDrives()i.r0'
    StrCpy $1 $windir 3 ; Fallback if things go wrong
    StrCpy $2 0
    StrCpy $4 65 ; 'A'
    loop:
        IntOp $3 $0 & 1
        ${If} $3 <> 0
            IntFmt $3 "%c:\" $4
            System::Call 'kernel32::GetDiskFreeSpaceEx(tr3,*l.r5,*l,*l)i'
            ${If} $5 L> $2
                StrCpy $2 $5
                StrCpy $1 $3
            ${EndIf}
        ${EndIf}
        IntOp $4 $4 + 1
        IntOp $0 $0 >> 1
        StrCmp $0 0 "" loop
    StrCpy $InstDir "$1" ;You should probably append something to the path here, you cannot install to the root of a drive by default
    

    Put it in .onInit or the pre callback for your directory page…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am completely new to Jena/TDB. All I want to do is to load
So I am completely new to programming in C on a computer (I once
I'm pretty much completely new to the world of computer programming, so it's been
I'm completely new to Java/Android and am stuck with listviews. What I want is
I am completely new to liquibase and I was wondering if I can use
I am completely new with Android/Eclipse. I can't figure out how to add an
I am completely new to Flex. Can I realistically develop, say, a medium complex
I am completely new in windows phone app development. I want to know what
I'm completely new to Ruby and Web Services. I want to tap into SharePoint
Completely new to most of this stuff, but basically Im playing around with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.