Solved Change installation folder


Sheikh

Well-known member
Member
Local time
1:59 PM
Posts
140
Location
Tehran, IRAN.
OS
Windows 11 Pro 24H2
Hi
Whenever I want to install an application, it will ask me the installation directory. some apps like "ADATA SSD toolkit" or "Cloudflare warp" will install in program files folder in C drive by default. how can I change the installation destination without any problem for some specific installers? don't want to change registery or group policy. want to force the installer.
maybe some switches like /silent for change the default directory?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
will install in program files folder in C drive by default.
At the point where it shows you where the program will be install then that is the point at which you can specify a different folder by changing the installation path yourself before the installation begins.
Having said that, I believe that C: drive is the best partition for installing programs/apps. Installing to other partitions has been known to cause problems.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP EliteDesk 705 G5
    CPU
    AMD Ryzen 5 Pro 3400GE
    Memory
    8GB DDR4 SDRAM
    Graphics Card(s)
    Integrated AMD Radeon Vega 11
    Hard Drives
    256 GB PCIe NVMe M.2 SSD
  • Operating System
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    DELL Inspiron 15-3576
    CPU
    Intel Core i5-8250U
    Memory
    8 GB DDR4 - 2400 SODIMM
    Graphics card(s)
    Intel UHD Graphics 620
    Hard Drives
    256GB SK Hynix SC311 SATA SSD
Many installers or apps don't support running from a different folder. The program files path is hard-coded.

Your best option is to move the folder, and leave behind a symbolic link or junction point in the original location. This way you don't have to mess around with any reg keys. To expand @wiganken's advice: Don't move critical Windows apps to another drive, in case that drive goes offline for any reason.
 

My Computer

System One

  • OS
    Windows 7
At the point where it shows you where the program will be install then that is the point at which you can specify a different folder by changing the installation path yourself before the installation begins.
Having said that, I believe that C: drive is the best partition for installing programs/apps. Installing to other partitions has been known to cause problems.
Hello dear @wiganken and thanks for your explanation.
Unfortunately, some installers do not ask for destination and when you hit install, they will install the app to their default installation folder.
Some apps need to be installed on C drive because they are complicated or use some system services, but some of them are not like that and are very similar to portable apps. I tried to cut their installation folder to another drive, and they worked well, but I'm not sure if they are 100% reliable or not because I'm sure these apps will save some registry keys which use the installation path as default. so when you modify the installer, you can make sure that it will work well.
that's the reason I'm asking for some recommendations or switches like /DIR="x:\dirname"
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
The switches available are going to vary based on what type of installer it is, so there's no universal answer to that. The /DIR="x:\dirname" switch you mentioned is for Inno Setup installers, but others may just ignore it. The Nullsoft installer (NSIS) supports /D, but the dev who made the installer can disable that functionality.
 

My Computer

System One

  • OS
    Windows 11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical with Cherry MX Clears
    Antivirus
    Microsoft Defender
The dev is ultimately responsible for picking their package installer (and some don't even use one). If they're not interested in making the program folder portable, then you have to link a target folder. You don't know (unless you "strings" the executable or DLL files) if they hard-coded a path inside the app.

There is no universal format. There are common conventions, but there is no enforcement except when an app is distributed on the Microsoft or Steam Stores. Those Stores will mandate how programs get installed.

As devs get more experienced, they're more likely to grant users the option to install to a different path.

Symbolic links get around this problem because using the original path will resolve to where you've relocated the folder. And unless they're using relative paths to move up and sideways, like " ..\..\other_folder", then you're fine.
 

My Computer

System One

  • OS
    Windows 7
Agreed. Symbolic links are your friend here. I've actually moved the Program Files folders and ProgramData using symbolic links. I'm not recommending anyone do that, but the point is, symlinks work a treat.
 

My Computer

System One

  • OS
    Windows 11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical with Cherry MX Clears
    Antivirus
    Microsoft Defender
Thanks my friends. I will recheck your comments and will try your solutions on two of my installers tomorrow.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
The switches available are going to vary based on what type of installer it is, so there's no universal answer to that. The /DIR="x:\dirname" switch you mentioned is for Inno Setup installers, but others may just ignore it. The Nullsoft installer (NSIS) supports /D, but the dev who made the installer can disable that functionality.
Is there any way to find an installer “tree” of switches? I don’t know how to explain… I mean a way to expand all switches so I can find which switches are active for this installer.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
You can use the strings utility garlin hinted at. Sometimes you can run setup with a /? or /help, and it will show you command line options. If you start the setup, and see that it is, for example, an InstallShield installer, then you can lookup which switches those support.

 

My Computer

System One

  • OS
    Windows 11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical with Cherry MX Clears
    Antivirus
    Microsoft Defender
The dev is ultimately responsible for picking their package installer (and some don't even use one). If they're not interested in making the program folder portable, then you have to link a target folder. You don't know (unless you "strings" the executable or DLL files) if they hard-coded a path inside the app.

There is no universal format. There are common conventions, but there is no enforcement except when an app is distributed on the Microsoft or Steam Stores. Those Stores will mandate how programs get installed.

As devs get more experienced, they're more likely to grant users the option to install to a different path.

Symbolic links get around this problem because using the original path will resolve to where you've relocated the folder. And unless they're using relative paths to move up and sideways, like " ..\..\other_folder", then you're fine.
I’m very excited that you always help me my friend. Unfortunately I’m not a pro user like you and I can’t understand your answer. Do you mean after installation I have to cut the entire folder and create a shortcut with same name in previous directory?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
You can use the strings utility garlin hinted at. Sometimes you can run setup with a /? or /help, and it will show you command line options. If you start the setup, and see that it is, for example, an InstallShield installer, then you can lookup which switches those support.

Very well thank you. That’s what I’m searching about. Will give it a try <3
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
I’m very excited that you always help me my friend. Unfortunately I’m not a pro user like you and I can’t understand your answer. Do you mean after installation I have to cut the entire folder and create a shortcut with same name in previous directory?
A hard or symbolic link is a filesystem-level redirect for a given folder or file name.

For example, your installer creates "C:\Drivers". After it's done installing, you move folder "C:\Drivers\Something" to "E:\Folder\Drivers\Something".

From CMD as the Administrator:
Code:
mklink /d old_folder_path new_folder_path

mklink /d "C:\Drivers\Something" E:\Folder\Drivers\Something"

Where /d indicates this link is for a folder, and not for a single file. "dir C:\Drivers\Something" will show you the contents of the other folder.

A hard link makes the folder indistinguishable from the original folder. The target will now have two separate, but official names which point to the same object. Hard links cannot cross filesystems, meaning it can only happen if both locations are on the same drive letter.

A symbolic link is allowed to cross to a different drive letter.
 

My Computer

System One

  • OS
    Windows 7
A hard or symbolic link is a filesystem-level redirect for a given folder or file name.

For example, your installer creates "C:\Drivers". After it's done installing, you move folder "C:\Drivers\Something" to "E:\Folder\Drivers\Something".

From CMD as the Administrator:
Code:
mklink /d old_folder_path new_folder_path

mklink /d "C:\Drivers\Something" E:\Folder\Drivers\Something"

Where /d indicates this link is for a folder, and not for a single file. "dir C:\Drivers\Something" will show you the contents of the other folder.

A hard link makes the folder indistinguishable from the original folder. The target will now have two separate, but official names which point to the same object. Hard links cannot cross filesystems, meaning it can only happen if both locations are on the same drive letter.

A symbolic link is allowed to cross to a different drive letter.
Thanks, dear Garlin.:kiss:
Topic marked as solved.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Back
Top Bottom