HCHTech 0 Posted September 30, 2022 Share Posted September 30, 2022 I'm running Win10 Pro 21H2 and I'm trying to start the desktop application with a batch file. No importing or anything, just start it up as if the icon were double-clicked. Easy, right? When I switch to the correct directory (c:\users\user\appdata\local\programs\evernote) and run "evernote.exe", the application does indeed start, but there is a ton of other data returned to the command window that eventually hangs with an "unable to create cache" line. Because of this, the batch file won't continue beyond that point. If it helps, here is the content that displays after the app opens: C:\Users\USER\AppData\Local\Programs\Evernote> [2022-09-30T02:07:24.772Z] INFO: electron.main/7176 on HCH2019(C:\Users\USER\AppData\Local\Programs\Evernote\resources\app.asar\node_modules\conduit-utils\node_modules\en-ts-utils\src\logger.ts:192 in info): client:utils:PerformanceLogger ELECTRON_INITIALIZATION took: 2078 ms (topicName=client:utils:PerformanceLogger) [2022-09-30T02:07:24.799Z] INFO: electron.main/7176 on HCH2019(C:\Users\USER\AppData\Local\Programs\Evernote\resources\app.asar\node_modules\conduit-utils\node_modules\en-ts-utils\src\logger.ts:192 in info): client:utils:PerformanceLogger APP_INITIALIZATION started: 2129 (topicName=client:utils:PerformanceLogger) [2022-09-30T02:07:24.800Z] INFO: electron.main/7176 on HCH2019(C:\Users\USER\AppData\Local\Programs\Evernote\resources\app.asar\node_modules\conduit-utils\node_modules\en-ts-utils\src\logger.ts:192 in info): Main app ready {"sender":{"isPackaged":true,"runningUnderARM64Translation":false,"userAgentFallback":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Evernote/10.44.8 Chrome/102.0.5005.167 Electron/19.0.13 Safari/537.36","commandLine":{},"_events":{},"_eventsCount":13}} [9716:0929/220724.818:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5) [9716:0929/220724.818:ERROR:cache_util.cc(145)] Unable to move cache folder C:\Users\USER\AppData\Roaming\Evernote\Cache\Cache_Data to C:\Users\USER\AppData\Roaming\Evernote\Cache\old_Cache_Data_000 [9716:0929/220724.818:ERROR:disk_cache.cc(196)] Unable to create cache [2022-09-30T02:07:25.109Z] INFO: electron.main/7176 on HCH2019(C:\Users\USER\AppData\Local\Programs\Evernote\resources\app.asar\node_modules\conduit-utils\node_modules\en-ts-utils\src\logger.ts:192 in info): Not the primary instance, quitting this instance [2022-09-30T02:07:25.110Z] INFO: electron.main/7176 on HCH2019(C:\Users\USER\AppData\Local\Programs\Evernote\resources\app.asar\node_modules\conduit-utils\node_modules\en-ts-utils\src\logger.ts:192 in info): The main instance initialized? :false [2022-09-30T02:07:25.115Z] INFO: electron.main/7176 on HCH2019(C:\Users\USER\AppData\Local\Programs\Evernote\resources\app.asar\node_modules\conduit-utils\node_modules\en-ts-utils\src\logger.ts:192 in info): onAppBeforeQuit [9716:0929/220729.822:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5) [9716:0929/220729.822:ERROR:cache_util.cc(145)] Unable to move cache folder C:\Users\USER\AppData\Roaming\Evernote\Partitions\name\Cache\Cache_Data to C:\Users\USER\AppData\Roaming\Evernote\Partitions\name\Cache\old_Cache_Data_000 [9716:0929/220729.824:ERROR:disk_cache.cc(196)] Unable to create cache I've looked at the handful of command line switches offered by typing "evernote.exe /?", but none appear that they would be helpful. The app works just fine, so my install seems ok, but it just doesn't like being started from the command line. Running the batch "as administrator" or the normal user doesn't make a difference. The 'access is denied' message would appear to point to a permissions problem, but exactly what permissions are required where isn't clear in the error message. Can someone steer me in the right direction? Link to comment
Level 5 PinkElephant 6,783 Posted September 30, 2022 Level 5 Share Posted September 30, 2022 There is an option introduced with the latest release on desktop to „Start Evernote with the computer“. I would use it. Link to comment
Evernote Expert agsteele 2,579 Posted September 30, 2022 Evernote Expert Share Posted September 30, 2022 Like @PinkElephantsays. But I might think something else was going on. Until the most recent release I had Evernote start when I booted my PC. Using a batch file was unnecessary.I just put a shortcut to the Evernote executable in the startup directory. I'm not sure why you needed a batch file. However, that's all rather moot. Use the new setting. Link to comment
HCHTech 0 Posted October 1, 2022 Author Share Posted October 1, 2022 I am aware of the new feature and aware that I can put the app in the startup group. Respectfully, that's not what I want to do. In my use case, I'd like to start several applications by script, on demand - among them, Evernote. I also expect that this ability was likely not contemplated by the designers. Most all applications I've run into over the years can be started this way - often done as part some automation or another. I was just hoping Evernote could be started this way as well - alas, it appears not to be the case. Link to comment
Level 5 PinkElephant 6,783 Posted October 1, 2022 Level 5 Share Posted October 1, 2022 EN v10 is not scriptable. From your experiment it seems this means it can’t be started this way neither. Link to comment
Evernote Expert Solution agsteele 2,579 Posted October 1, 2022 Evernote Expert Solution Share Posted October 1, 2022 4 hours ago, HCHTech said: Respectfully, that's not what I want to do. No disrespect perceived. Extra information always helps I had a couple of spare moments and created the most basic of batch files: C:\Users\myWindowsUsername\AppData\Local\Programs\Evernote\Evernote.exe I was able to run this as administrator and Evernote started. However I did notice that there was a bunch of program response in the command prompt window but it all ended correctly. So I guess that the response from Evernote.exe is tripping up your batch file. I couldn't comment on the BATCH code you're using. I'm sure that it is well written. Just to note that there are no command line switches for Evernote 10. Perhaps place Evernote as the last item in your batch file and don't exit or end the batch file. Link to comment
HCHTech 0 Posted October 1, 2022 Author Share Posted October 1, 2022 Yes, I'm not doing anything special in the batch, but putting evernote last as you suggest does make it better. I seems that the hanging is intermittent with that change. Sometimes, the batch completes successfully (and I haven't been able to catch how those "evernote response" lines are different when it succeeds) and sometimes it hangs, but in any event, having it hang doesn't hurt anything, so I think I'm off and running - thanks for the help. I can always kill the cmd window manually if it bothers me - no one is using this script other than me so it doesn't have to be pretty. BTW, running "evernote.exe /?" does output the following, so I would argue that v10 is still scriptable within those limitations. For example running "evernote.exe /minimize" does indeed start the app minimized. Evernote.exe [options] [FILE1 [FILE2]...] FILE1, FILE2, ... - list of files to import /h or /help or /? - command line help /v or /version - print version information /DeleteFiles - delete files after import /ShowLogs - open logs directory /ShowData - open user data and database directory /TestNetwork - run network connectivity tests /minimize - minimize main window /maximize - maximize main window /hide - hide main window /close or /quit - close application Link to comment
Evernote Expert agsteele 2,579 Posted October 1, 2022 Evernote Expert Share Posted October 1, 2022 All these undocumented things Link to comment
Level 5 PinkElephant 6,783 Posted October 1, 2022 Level 5 Share Posted October 1, 2022 In general EN on desktop is running inside of the Electron framework. The framework is in between the app and the OS and device level. It is not completely closed, but it is limited in access. Although it is based on a browser engine, you can compare it to a virtual machine. The app executes inside of the VM, you try to control it from the outside. If your script happens to use one of these interaction channels provided by framework or app, it may work. But this still doesn’t mean the app would be scriptable. Scriptable means that all actions provided for scripting will execute, for example the function set of AppleScript will be supported. No, v10 is not scriptable, the interface is fuzzy and badly documented at best. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now