Comments (7)
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.
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.
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.
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.
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.
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.
Clarify how it works in README.md
from node-auto-launch.
Related Issues (20)
- Windows cannot auto launch after application's install path changed. HOT 3
- There is no option to enable auto launch for all users HOT 1
- Auto-launch with electron-winstaller
- ProcessUncleanExitError appearing in console HOT 1
- Be more flexible on path value: must be absolute if not Windows Store target HOT 19
- IsHidden don't work on Linux?
- background app permission
- Share your code
- If i append args to autostart.opts.appPath the finally generate command is incorrect HOT 1
- Enable() with AppX doesn't add a registry entry HOT 10
- Extend the API with new methods
- isEnabled not working on Windows 11 when changed through Windows Settings
- Linux desktop entry file is named based on `path`, not `name` HOT 2
- Why the name I pass to AutoLaunch constructor is not be used? HOT 4
- Check if app launched as hidden at login or manually by the user HOT 13
- Error with Electron-Webpack 4.28.4 HOT 2
- AppleScript security issues on macOS Mojave HOT 3
- Add Ethereum name or address to package.json
- Open two Window (my App and Electron documencation window) HOT 5
- Invalid .desktop file is created if path contains spaces on Linux HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-auto-launch.