Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8969527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:36:16+00:00 2026-06-15T17:36:16+00:00

In node-webkit, is there any way to find the path to the current application?

  • 0

In node-webkit, is there any way to find the path to the current application? In node.js, you can use __dirname to find the path to the current application, but in node-webkit, the variable __dirname appears to be undefined.

The following node.js script prints the file path correctly:

console.log(__dirname)

The following node-webkit script does not print the file path correctly:

<script type = "text/javascript">
    alert(__dirname);
</script>

What is the correct way to find the path to the current application in node-webkit?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:36:18+00:00Added an answer on June 15, 2026 at 5:36 pm

    The answer to this question was discussed here: https://groups.google.com/d/topic/node-webkit/IwGzluFC9iU/discussion

    On Windows, use "process.execPath" to see the path of the executable that launched it. Then work from there, removing the executable’s filename from the path to get the folder’s path (assuming your app’s .nw is relative to the executable or is combined with it).

    This works for me whether it is running with the zipped ‘app.nw’ or where ‘nw.exe’ and ‘app.nw’ are combined into one executable file (app.exe).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Node.js is there any way to listen to all events emitted by an
Node.getTextContent() returns the text content of the current node and its descendants. is there
Node.js is stated to be asynchronous, event-driven, non-blocking I/O, but how can I identify
any node above the current node in an hierarchical tree example the parent,grandparent,great-grandparent or
Any node can have any number of children. To search this tree i wrote
Node.js and redis look hot but I'm getting burned. I can't gracefully overcome what
Node.js is a perfect match for our web project, but there are few computational
Does node.js (considering a web application) have any preferred UI framework? Or it's an
4 node Binary Search tree: 2143. there are 3 ways to insert and get
Can node.js be setup to recognize a proxy (like Fiddler for example) and route

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.