question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any way to specify a custom install path for Windows?

See original GitHub issue
  • Version: 6.3.3
  • Target: Mac and Windows (with a Squirrel installer)

We’re transitioning from an NW.js app where the app is installed in AppData/Roaming and the localStorage is placed in AppData/Local but Electron/Squirrel is installed to AppData/Local and localStorage is placed in AppData/Roaming (opposite). When our users update from one to the other, we don’t want the localStorage being deleted when the Electron app is installed there. So can we customize these paths (so we can put our Electron app & localStorage in the same locations as before)?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
1inuscommented, Nov 10, 2017

build/installer.nsh

 !macro preInit
    SetRegView 64
    WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp"
    WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp"
    SetRegView 32
    WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp"
    WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp"
 !macroend

then include this file in package.json

1reaction
soubhikchatterjeecommented, May 23, 2019

Does anyone knows what variable to use such that i can set the $INSTDIR path as “C:\Users{CURRENT_USERNAME}”

Where {CURRENT_USERNAME} is the currently logged in username.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing with the Custom installation path on Windows systems
Click Custom location of WebSphere Application Server to specify a path to a version of WebSphere Application Server in a different location. The...
Read more >
Changing the default installation folder for programs in ...
1. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion. · 2. At the right panel, look for ProgramFilesDir. · 3. Double click on it to change ...
Read more >
Change Default Install Location Windows 10 [Tutorial]
Change Default Install Location Windows 10 [Tutorial]By default, Windows installs all the programs in C:\Program Files or C:\Program Files ...
Read more >
How to install files in a custom folder - Advanced Installer
When installing an application you may, need to install some files directly on the C: drive. This can be done in two ways:...
Read more >
Change Default Installation Directory In Windows 10/8/7
If you want to change the default installation location of programs in Windows 10/8/7, there is an easy workaround. You just need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found