Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Path must be a string. Received undefined #72

Open
apphelpyulongs opened this issue Dec 4, 2017 · 4 comments
Open

TypeError: Path must be a string. Received undefined #72

apphelpyulongs opened this issue Dec 4, 2017 · 4 comments

Comments

@apphelpyulongs
Copy link

  • The target platform(s) the problem occurs on (Linux, Mac, Mac App Store, and or Windows):
    Windows 8.1
  • Node version (run node -v):
    7.7.4
  • auto-launch version:
    5.0.3
  • The options you're passing to auto-launch:
  • Are you using NW.js or Electron?
    Electron
    • If so, which version?
      1.7.9
    • If you're using Electron, are you using auto-launch from the main process or a renderer process?
      main
  • Can you reproduce this with a simple Hello World example app?
  • If needs be, would you be able to provide us with a simple app (as simple as possible) which reproduces the problem?

const launcher = new AutoLaunch({
        name: result.productName,
        path: 'C:\\Program Files\\test\\service\\6.0.177\\test.exe', 
        isHidden: true
    });
    try {
        await launcher.enable();
        log.info(MODULE_NAME, `auto-launch ${result.productName} successfully!`);
    } catch (error) {
        log.error(MODULE_NAME, `auto-launch ${result.productName} failed! ${error}`);
    }```

I also tried to remove `path` but it's the same result 
@apphelpyulongs
Copy link
Author

to whoever uses Electron and wants to do auto-launch, Electron has native support for this functionality. Here is the doc for that https://electronjs.org/docs/api/app#appgetloginitemsettingsoptions-macos-windows

@adam-lynch
Copy link
Contributor

@4ver can you get someone to test on Windows?

@Imfdj
Copy link

Imfdj commented Oct 24, 2019

have a look!
dependencies: auto-launch -> AutoLaunchWindows -> winreg -> getRegExePath .
path.join(process.env.windir, 'system32', 'reg.exe'); process.env.windir is undefined.

@newPromise
Copy link

newPromise commented Sep 15, 2020

you should use auto-launch module in main process, I solved this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants