You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm developing an Electron app and using Squirrel for windows installation. I have added the MyApp.exe to PATH pointing to the location %localappdata%\MyApp\MyApp.exe
When the app is run from command line D:\Project\WorkSpace> MyApp the application launches but the working directory of the application is C:\...\AppData\Local\MyApp\app-1.0.0 is it possible to set the working directory of MyApp.exe to D:\Project\WorkSpace ? which is the actual working directory MyApp was run by the user.
I understand that any argument passed to MyApp.exe in the root app directory will be passed to MyApp.exe with in the app-version folder, but can the CWD be set by default without the user having to passing additional args.
The text was updated successfully, but these errors were encountered:
@KarthikeyanVedi it's not clear to me why the caller needs to change the working directory. Are you able to elaborate on why that's needed for your app?
When you run npm install or npm run, you need to run these command in the root directory of your project where package.json file is present. Here working directory is the root directory of your project.
Similarly my app needs to be executed in a project directory (workspace) where its project specific files are present, this app expects certain config files to present in the workspace root directory.
Currently the issue is, when a user tries to launch the app from a workspace folder like D:\Workspace>MyApp.exe, app is not able to locate any config files present in the D:\Workspace folder instead it looks for file in the folder where the MyApp.exe is installed, the reason being the working directory is changed during ProcessStart by this commit 1438452, but the actual working directory where the user has launched MyApp.exe is D:\WorkSpace
The app need the directory path from where the user has launched MyApp.exe so it can check for its config files in that folder. This path should generally be the Current Working Directory or this path should be passed as an argument during process start. Pull request #1408 fixes this by passing this path as an argument during ProcessStart
I'm developing an Electron app and using Squirrel for windows installation. I have added the
MyApp.exe
toPATH
pointing to the location%localappdata%\MyApp\MyApp.exe
When the app is run from command line
D:\Project\WorkSpace> MyApp
the application launches but the working directory of the application isC:\...\AppData\Local\MyApp\app-1.0.0
is it possible to set the working directory ofMyApp.exe
toD:\Project\WorkSpace
? which is the actual working directoryMyApp
was run by the user.I understand that any argument passed to
MyApp.exe
in the root app directory will be passed toMyApp.exe
with in the app-version folder, but can theCWD
be set by default without the user having to passing additional args.The text was updated successfully, but these errors were encountered: