GithubHelp home page GithubHelp logo

Comments (7)

adam-lynch avatar adam-lynch commented on July 20, 2024

Hmm I'm not sure. It works in a simple app for me here. I've just published 5.0.2 which fixes the path problem. Just in case, could you try it with 5.0.2 and no path argument?

from node-auto-launch.

akashnimare avatar akashnimare commented on July 20, 2024

I doubt it will fix the problem since it successfully launches the app on startup only the hidden mode doesn't work. Let me test it on 5.0.2.

from node-auto-launch.

king-d-dev avatar king-d-dev commented on July 20, 2024

Please have you been able to get it to work now, I'm also facing similar issue using a windows 10 device.

from node-auto-launch.

yafp avatar yafp commented on July 20, 2024

I am using 5.0.5 and just tested if the hidden option is working for me on windows 10.
In fact it doesnt.

The registry key looks like that:

"C:\path\to\my\app.exe" --hidden

from node-auto-launch.

rbestardpino avatar rbestardpino commented on July 20, 2024

Hi! I am facing the same issue for an electron app. Did any of you guys found a solution or workaround?

I am using:

Windows 10 Build 19043,
Node 14.16.1
Electron 13.1.4
auto-launch 5.0.5

My code is straightforward and taken from the documentation:

// Calling autolaunch from main process
const autoLaunch = new AutoLaunch({
  name: 'My App',
  path: app.getPath('exe'),
  isHidden: true,
})

autoLaunch.isEnabled().then((isEnabled) => {
  if (!isEnabled) autoLaunch.enable()
})

The registry in \HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run gets created OK including the --hidden flag.

I don't know where the flags are defined so I used Process Explorer as detailed here to see if I could find any flag that could work. I found the openAsHidden flag, but it didn't do anything (I don't know if is a valid flag tbh). If someone knows where flags are defined I'll be thankful.

I also tried with cmd.exe /c start /min "path to app" (info). But it did not work either.

Finally, I tried with some arbitrary flags: -silent, /background. Neither of those did anything.

I'm out of ideas 😢, any help is welcome.

Thanks, Rodrigo.

from node-auto-launch.

Oxalin avatar Oxalin commented on July 20, 2024

For documentation purpose: the argument "isHidden" doesn't magically hide the application except with AppleScript. For all other cases, it adds the argument when the application is called at launch, but the application still needs to deal with it in a way or another.

Using Electron, this could be done my calling some available methods for Windows and macOS though. But if IRC, this is not available under Linux. And for any other situation without Electron, the dev would still needs to do something of the argument to hide the application on startup.

from node-auto-launch.

Oxalin avatar Oxalin commented on July 20, 2024

Clarify how it works in README.md

from node-auto-launch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.