Default installation folder #423

Closed
opened 2026-01-29 16:39:12 +00:00 by claunia · 33 comments
Owner

Originally created by @OmiCron07 on GitHub (Dec 6, 2019).

Originally assigned to: @GregorBiswanger on GitHub.

  • Version: 7.30.2
    .Net Core 3.1
  • Target: Windows

My electron.manifest.json file :

{
  "executable": "RestroomsWatcher.MonitoringClient",
  "splashscreen": {
    "imageFile": "/Desktop/Assets/Splash.png"
  },
  "singleInstance": true,
  "build": {
    "appId": "com.RestroomsWatcher.MonitoringClient.app",
    "productName": "Restrooms Watcher",
    "copyright": "Company © 2020",
    "buildVersion": "0.9.0",
    "compression": "maximum",
    "directories": {
      "output": "../../../bin/Desktop",
      "buildResources": "Desktop/Assets"
    },
    "win": {
      "icon": "../../../Desktop/Assets/AppIcon.png"
    },
    "extraResources": [
      {
        "from": "./bin",
        "to": "bin",
        "filter": [ "**/*" ]
      }
    ],
    "files": [
      {
        "from": "./ElectronHostHook/node_modules",
        "to": "ElectronHostHook/node_modules",
        "filter": [ "**/*" ]
      },
      "**/*"
    ]
  }
}

When I build the app, I get the setup file Restrooms Watcher Setup 0.9.0.exe, but when I'm using the setup to install the application, the destination folder is ..\AppData\Local\Programs\electron.net.host. If I have two different setups, it will install in the same folder. Is it a bug or how can I change the destination folder for the application name? Is it a way too to specify another folder instead of AppData?

Originally created by @OmiCron07 on GitHub (Dec 6, 2019). Originally assigned to: @GregorBiswanger on GitHub. * **Version**: 7.30.2 .Net Core 3.1 * **Target**: Windows My electron.manifest.json file : ```` { "executable": "RestroomsWatcher.MonitoringClient", "splashscreen": { "imageFile": "/Desktop/Assets/Splash.png" }, "singleInstance": true, "build": { "appId": "com.RestroomsWatcher.MonitoringClient.app", "productName": "Restrooms Watcher", "copyright": "Company © 2020", "buildVersion": "0.9.0", "compression": "maximum", "directories": { "output": "../../../bin/Desktop", "buildResources": "Desktop/Assets" }, "win": { "icon": "../../../Desktop/Assets/AppIcon.png" }, "extraResources": [ { "from": "./bin", "to": "bin", "filter": [ "**/*" ] } ], "files": [ { "from": "./ElectronHostHook/node_modules", "to": "ElectronHostHook/node_modules", "filter": [ "**/*" ] }, "**/*" ] } } ```` When I build the app, I get the setup file `Restrooms Watcher Setup 0.9.0.exe`, but when I'm using the setup to install the application, the destination folder is `..\AppData\Local\Programs\electron.net.host`. If I have two different setups, it will install in the same folder. Is it a bug or how can I change the destination folder for the application name? Is it a way too to specify another folder instead of `AppData`?
claunia added the question label 2026-01-29 16:39:12 +00:00
Author
Owner

@GregorBiswanger commented on GitHub (Dec 6, 2019):

Hi @OmiCron07

please see the electron-builder configuration documentation. In the electron.manifest.json file is the build-Part the 1:1 electron builder configuration-Part. Per default is NSIS as a setup ceation activated.
https://www.electron.build/configuration/nsis

Please try here the allowToChangeInstallationDirectory setting.
https://www.electron.build/configuration/nsis#NsisOptions-allowToChangeInstallationDirectory

@GregorBiswanger commented on GitHub (Dec 6, 2019): Hi @OmiCron07 please see the `electron-builder` configuration documentation. In the `electron.manifest.json` file is the build-Part the 1:1 electron builder configuration-Part. Per default is NSIS as a setup ceation activated. https://www.electron.build/configuration/nsis Please try here the `allowToChangeInstallationDirectory` setting. https://www.electron.build/configuration/nsis#NsisOptions-allowToChangeInstallationDirectory
Author
Owner

@OmiCron07 commented on GitHub (Dec 6, 2019):

I don't see any mention of the destination folder in their documentations. I don't want an assisted installer, just that the destination folder matches the product name and not the generic name electron.net.host.

@OmiCron07 commented on GitHub (Dec 6, 2019): I don't see any mention of the destination folder in their documentations. I don't want an `assisted installer`, just that the destination folder matches the product name and not the generic name `electron.net.host`.
Author
Owner

@OmiCron07 commented on GitHub (Dec 11, 2019):

I set up the AutoUpdate feature and there the notification :

image

Even there the name of the application is wrong.

@OmiCron07 commented on GitHub (Dec 11, 2019): I set up the AutoUpdate feature and there the notification : ![image](https://user-images.githubusercontent.com/31325575/70638004-238c4c00-1c06-11ea-9413-9cace609a74a.png) Even there the name of the application is wrong.
Author
Owner

@OmiCron07 commented on GitHub (Dec 11, 2019):

I have found the name electron.net.host in these files :

image

So, the name is wrong but the version number is right :

image

@OmiCron07 commented on GitHub (Dec 11, 2019): I have found the name `electron.net.host` in these files : ![image](https://user-images.githubusercontent.com/31325575/70640031-53891e80-1c09-11ea-8b81-1f3b2df740b4.png) So, the name is wrong but the version number is right : ![image](https://user-images.githubusercontent.com/31325575/70640129-7c111880-1c09-11ea-84d3-4bcca6f5ab91.png)
Author
Owner

@OmiCron07 commented on GitHub (Dec 11, 2019):

Just discovered that Electron.App.GetNameAsync() returns electron.net.host instead of my productName.

@OmiCron07 commented on GitHub (Dec 11, 2019): Just discovered that `Electron.App.GetNameAsync()` returns `electron.net.host` instead of my `productName`.
Author
Owner

@OmiCron07 commented on GitHub (Dec 12, 2019):

Probably linked too :

image

The publisher's name is wrong. Instead of my company name, it displays Gregor Biswanger.

@OmiCron07 commented on GitHub (Dec 12, 2019): Probably linked too : ![image](https://user-images.githubusercontent.com/31325575/70729211-c27d7a80-1cd0-11ea-842b-2d0ba62dfbdd.png) The publisher's name is wrong. Instead of my company name, it displays `Gregor Biswanger`.
Author
Owner

@jadhavrani123 commented on GitHub (Feb 29, 2020):

how can I change my installation folder name? folder name is electron.net.host replace to my project name

@jadhavrani123 commented on GitHub (Feb 29, 2020): how can I change my installation folder name? folder name is electron.net.host replace to my project name
Author
Owner

@jadhavrani123 commented on GitHub (Feb 29, 2020):

please give me a answer?I want to change folder name

@jadhavrani123 commented on GitHub (Feb 29, 2020): please give me a answer?I want to change folder name
Author
Owner

@GregorBiswanger commented on GitHub (Feb 29, 2020):

I just tested that electron-builder doesn't just let the names and authors be configured externally. This would normally be done using the extraMetadata setting.

I will add this as a new feature for the upcoming Electron.NET version, which you can easily do in the electron.manifest.json file.

Current workaround to the solution: While you are executing the following command, for example, electronize build /target win - can you be active, before electron-builder becomes active at the end, quickly exchange the package.json with your own data. You can find the current file under PROJECTFOLDER/obj/desktop/win/package.json - write your desired name for app name and your author name there.

ElectronNet-Workaround

Please give me your feedback on whether it worked for you.

@GregorBiswanger commented on GitHub (Feb 29, 2020): I just tested that electron-builder doesn't just let the names and authors be configured externally. This would normally be done using the extraMetadata setting. **I will add this** as a new feature for the **upcoming Electron.NET version**, which you can easily do in the `electron.manifest.json` file. **Current workaround to the solution:** While you are executing the following command, for example, `electronize build /target win` - can you be active, before electron-builder becomes active at the end, quickly exchange the `package.json` with your own data. You can find the current file under `PROJECTFOLDER/obj/desktop/win/package.json` - write your desired name for app name and your author name there. ![ElectronNet-Workaround](https://user-images.githubusercontent.com/7336300/75614165-43ad1680-5b36-11ea-99b5-8d5cdf31a464.gif) Please give me your feedback on whether it worked for you.
Author
Owner

@jadhavrani123 commented on GitHub (Mar 2, 2020):

Thank you for responce,
I am also tried it yesterday using that solution but it not work

@jadhavrani123 commented on GitHub (Mar 2, 2020): Thank you for responce, I am also tried it yesterday using that solution but it not work
Author
Owner

@jadhavrani123 commented on GitHub (Mar 2, 2020):

electronize build /target win I am use these command for exe folder but it is possible to create two ceperate folder for 32 bit OS & 64 bit OS

@jadhavrani123 commented on GitHub (Mar 2, 2020): electronize build /target win I am use these command for exe folder but it is possible to create two ceperate folder for 32 bit OS & 64 bit OS
Author
Owner

@jadhavrani123 commented on GitHub (Mar 2, 2020):

electronize build /target win I am use these command for exe folder but it is possible to create two ceperate folder for 32 bit OS & 64 bit OS

@jadhavrani123 commented on GitHub (Mar 2, 2020): electronize build /target win I am use these command for exe folder but it is possible to create two ceperate folder for 32 bit OS & 64 bit OS
Author
Owner

@jadhavrani123 commented on GitHub (Mar 4, 2020):

Hello sir,
It is possible at the time of PC restart how can I store my EletctronNet exe in tray

@jadhavrani123 commented on GitHub (Mar 4, 2020): Hello sir, It is possible at the time of PC restart how can I store my EletctronNet exe in tray
Author
Owner

@OmiCron07 commented on GitHub (Mar 4, 2020):

Hello sir,
It is possible at the time of PC restart how can I store my EletctronNet exe in tray

To start your app automatically on Windows boot, use Electron.App.SetLoginItemSettings(new LoginSettings { OpenAtLogin = true })

@OmiCron07 commented on GitHub (Mar 4, 2020): > > > Hello sir, > It is possible at the time of PC restart how can I store my EletctronNet exe in tray To start your app automatically on Windows boot, use `Electron.App.SetLoginItemSettings(new LoginSettings { OpenAtLogin = true })`
Author
Owner

@jadhavrani123 commented on GitHub (Mar 5, 2020):

Thank you it worked for me actually I want to store app in tray, not open directly at the time of PC restart

@jadhavrani123 commented on GitHub (Mar 5, 2020): Thank you it worked for me actually I want to store app in tray, not open directly at the time of PC restart
Author
Owner

@jadhavrani123 commented on GitHub (Mar 5, 2020):

If you know answer then please help me.

Thanks in advance

@jadhavrani123 commented on GitHub (Mar 5, 2020): If you know answer then please help me. Thanks in advance
Author
Owner

@jadhavrani123 commented on GitHub (Mar 5, 2020):

` document.getElementById("close-btn").addEventListener("click", function (e) {
const window = remote.getCurrentWindow();
window.close();

    });`

these is the code on Close button but I want only on first time exe not close ,after second time exe will close
how I am code write for that??

@jadhavrani123 commented on GitHub (Mar 5, 2020): ` document.getElementById("close-btn").addEventListener("click", function (e) { const window = remote.getCurrentWindow(); window.close(); });` these is the code on Close button but I want only on first time exe not close ,after second time exe will close how I am code write for that??
Author
Owner

@jadhavrani123 commented on GitHub (Mar 5, 2020):

To start your app automatically on Windows boot, use Electron.App.SetLoginItemSettings(new LoginSettings { OpenAtLogin = true });

it work for me thank you but one problem is here with application one elctron window is open how to remove it

@jadhavrani123 commented on GitHub (Mar 5, 2020): To start your app automatically on Windows boot, use Electron.App.SetLoginItemSettings(new LoginSettings { OpenAtLogin = true }); it work for me thank you but one problem is here with application one elctron window is open how to remove it
Author
Owner

@OmiCron07 commented on GitHub (Mar 5, 2020):

it work for me thank you but one problem is here with application one elctron window is open how to remove it

You probably have somewhere Electron.WindowManager.CreateWindowAsync(options, loadUrl);, so you just have to remove that line.

@OmiCron07 commented on GitHub (Mar 5, 2020): > it work for me thank you but one problem is here with application one elctron window is open how to remove it You probably have somewhere `Electron.WindowManager.CreateWindowAsync(options, loadUrl);`, so you just have to remove that line.
Author
Owner

@jadhavrani123 commented on GitHub (Mar 6, 2020):

Thank you it work for me

@jadhavrani123 commented on GitHub (Mar 6, 2020): Thank you it work for me
Author
Owner

@jadhavrani123 commented on GitHub (Mar 6, 2020):

how can I change my installation folder name? folder name is electron.net.host replace to my project name

installation path is : C:\Users\xyz\AppData\Local\Programs\electron.net.host
but i want electron.net.host replace to my project name

@jadhavrani123 commented on GitHub (Mar 6, 2020): how can I change my installation folder name? folder name is electron.net.host replace to my project name installation path is : C:\Users\xyz\AppData\Local\Programs\electron.net.host but i want electron.net.host replace to my project name
Author
Owner

@jadhavrani123 commented on GitHub (Mar 6, 2020):

how to restore exe to its previous position from tray and do not open multiple windows of that exe and how to restart exe on button click.

@jadhavrani123 commented on GitHub (Mar 6, 2020): how to restore exe to its previous position from tray and do not open multiple windows of that exe and how to restart exe on button click.
Author
Owner

@OmiCron07 commented on GitHub (Mar 6, 2020):

For the moment, you can't change the installation folder name, thus this issue.

To show the app, you have to call Electron.WindowManager.CreateWindowAsync(options, loadUrl); and to restore the position, just set the properties of the options parameter of the CreateWindowAsync method. To avoid opening multiple times the window, I don't know a way but by tracking when you are opening or closing the window and thus, verify yourself the state of the window before opening a new one.

@OmiCron07 commented on GitHub (Mar 6, 2020): For the moment, you can't change the installation folder name, thus this issue. To show the app, you have to call `Electron.WindowManager.CreateWindowAsync(options, loadUrl);` and to restore the position, just set the properties of the `options` parameter of the `CreateWindowAsync` method. To avoid opening multiple times the window, I don't know a way but by tracking when you are opening or closing the window and thus, verify yourself the state of the window before opening a new one.
Author
Owner

@pooja6747 commented on GitHub (Mar 7, 2020):

Hello Sir,
Actually on click cntrl + shift + i open developer tool in my exe , but I want to close it ??

@pooja6747 commented on GitHub (Mar 7, 2020): Hello Sir, Actually on click cntrl + shift + i open developer tool in my exe , but I want to close it ??
Author
Owner

@pooja6747 commented on GitHub (Mar 7, 2020):

if you know answer give me response

@pooja6747 commented on GitHub (Mar 7, 2020): if you know answer give me response
Author
Owner

@jadhavrani123 commented on GitHub (Mar 9, 2020):

var menu = new MenuItem[] {

             new MenuItem
            {
                Label = "Open",

        Click = async () => mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
                {
                    Width = 900,
                    Height = 700,
    }),

},

On minimize my exe store it work properly but problem is here in tray icon right click open option exe open multiple items

how to remove it please help us

On open click I want exe open only one time

@jadhavrani123 commented on GitHub (Mar 9, 2020): var menu = new MenuItem[] { new MenuItem { Label = "Open", Click = async () => mainWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Width = 900, Height = 700, }), }, On minimize my exe store it work properly but problem is here in tray icon right click open option exe open multiple items how to remove it please help us On open click I want exe open only one time
Author
Owner

@jadhavrani123 commented on GitHub (Mar 11, 2020):

https://github.com/ElectronNET/Electron.NET/issues/348#issuecomment-592988286
@GregorBiswanger sir is worked for but one problem occur is here folder name is replace to project name but it shows only on my PC not on another user in another user PC is install with electron.net .host folder name
how I can change it??

@jadhavrani123 commented on GitHub (Mar 11, 2020): https://github.com/ElectronNET/Electron.NET/issues/348#issuecomment-592988286 @GregorBiswanger sir is worked for but one problem occur is here folder name is replace to project name but it shows only on my PC not on another user in another user PC is install with electron.net .host folder name how I can change it??
Author
Owner

@jadhavrani123 commented on GitHub (Mar 12, 2020):

My editor is Visual studio 2019 with Angular fronted
At the time exe package create 3 folder local , swiftshader , resources but in resources folder bin folder is create how to remove it??

@jadhavrani123 commented on GitHub (Mar 12, 2020): My editor is Visual studio 2019 with Angular fronted At the time exe package create 3 folder local , swiftshader , resources but in resources folder bin folder is create how to remove it??
Author
Owner

@GregorBiswanger commented on GitHub (Apr 19, 2020):

You can set a name and author of the app in electron.manifest.json with the new Electron.NET Version 8.31.1

As example:

{
  "executable": "ElectronNet8311",
  "splashscreen": {
    "imageFile": "/wwwroot/assets/electronnet-splashscreen-2.jpg"
  },
  "name": "ElectronNet8311",
  "author": "Max Mustermann",
  "description": "voll my app",
  "singleInstance": false,
  "build": {
    "appId": "com.ElectronNet8311.app",
    "productName": "ElectronNet8311",
    "copyright": "Copyright © 2020",
    "buildVersion": "1.0.0",
    "compression": "maximum",
    "directories": {
      "output": "../../../bin/Desktop"
    },
    "extraResources": [
      {
        "from": "./bin",
        "to": "bin",
        "filter": ["**/*"]
      }
    ],
    "files": [
      {
        "from": "./ElectronHostHook/node_modules",
        "to": "ElectronHostHook/node_modules",
        "filter": ["**/*"]
      },
      "**/*"
    ]
  }
}
@GregorBiswanger commented on GitHub (Apr 19, 2020): You can set a name and author of the app in `electron.manifest.json` with the new Electron.NET Version 8.31.1 As example: ``` { "executable": "ElectronNet8311", "splashscreen": { "imageFile": "/wwwroot/assets/electronnet-splashscreen-2.jpg" }, "name": "ElectronNet8311", "author": "Max Mustermann", "description": "voll my app", "singleInstance": false, "build": { "appId": "com.ElectronNet8311.app", "productName": "ElectronNet8311", "copyright": "Copyright © 2020", "buildVersion": "1.0.0", "compression": "maximum", "directories": { "output": "../../../bin/Desktop" }, "extraResources": [ { "from": "./bin", "to": "bin", "filter": ["**/*"] } ], "files": [ { "from": "./ElectronHostHook/node_modules", "to": "ElectronHostHook/node_modules", "filter": ["**/*"] }, "**/*" ] } } ```
Author
Owner

@kristianklok commented on GitHub (Dec 18, 2020):

I don't see any mention of the destination folder in their documentations. I don't want an assisted installer, just that the destination folder matches the product name and not the generic name electron.net.host.

@OmiCron07 Sorry for necro'ing this thread. Did you ever find a solution to this? I have been looking into this all day and it appears that two ElectronNet applications using unassisted installers cannot co-exist on the same (Windows) system. Even if they are from different vendors?

@kristianklok commented on GitHub (Dec 18, 2020): > I don't see any mention of the destination folder in their documentations. I don't want an `assisted installer`, just that the destination folder matches the product name and not the generic name `electron.net.host`. @OmiCron07 Sorry for necro'ing this thread. Did you ever find a solution to this? I have been looking into this all day and it appears that two ElectronNet applications using unassisted installers cannot co-exist on the same (Windows) system. Even if they are from different vendors?
Author
Owner

@OmiCron07 commented on GitHub (Dec 18, 2020):

I don't see any mention of the destination folder in their documentations. I don't want an assisted installer, just that the destination folder matches the product name and not the generic name electron.net.host.

@OmiCron07 Sorry for necro'ing this thread. Did you ever find a solution to this? I have been looking into this all day and it appears that two ElectronNet applications using unassisted installers cannot co-exist on the same (Windows) system. Even if they are from different vendors?

I didn't come back to the app I made with Electron.Net and I didn't test version 8.31.1 either for the new installation folder name. I suggest you open a new issue for your problem, sorry that I can't help much.

@OmiCron07 commented on GitHub (Dec 18, 2020): > > > > I don't see any mention of the destination folder in their documentations. I don't want an `assisted installer`, just that the destination folder matches the product name and not the generic name `electron.net.host`. > > @OmiCron07 Sorry for necro'ing this thread. Did you ever find a solution to this? I have been looking into this all day and it appears that two ElectronNet applications using unassisted installers cannot co-exist on the same (Windows) system. Even if they are from different vendors? I didn't come back to the app I made with Electron.Net and I didn't test version 8.31.1 either for the new installation folder name. I suggest you open a new issue for your problem, sorry that I can't help much.
Author
Owner

@HJST1979 commented on GitHub (Feb 4, 2021):

Example for "Default installation folder" write this in electron.manifest.json

"build": {
"appId": "com..app",
"productName": "",
"copyright": "Copyright © 2021",
"buildVersion": "1.0.0",
"compression": "maximum",
"win": {
"icon": "../../../.ico"
},
"nsis" : {
"oneClick" : false,
"multiLanguageInstaller" : true,
"allowToChangeInstallationDirectory" : true
},

.....

@HJST1979 commented on GitHub (Feb 4, 2021): Example for "Default installation folder" write this in electron.manifest.json "build": { "appId": "com.<xxx>.app", "productName": "<xxx>", "copyright": "Copyright © 2021", "buildVersion": "1.0.0", "compression": "maximum", "win": { "icon": "../../../<xxx>.ico" }, **"nsis" : { "oneClick" : false, "multiLanguageInstaller" : true, "allowToChangeInstallationDirectory" : true },** .....
Author
Owner

@gsobrinhodev commented on GitHub (Sep 18, 2023):

Friends,

It's possible we have the installation on default directory but with my App name? Instead electron.net.host ?

@gsobrinhodev commented on GitHub (Sep 18, 2023): Friends, It's possible we have the installation on default directory but with my App name? Instead electron.net.host ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#423