Opening a Notebook through OneNote executable - windows

How can I open a notebook using the OneNote executable?
I know the following pieces of information:
The location of the OneNote executable in the machine (ONENOTE.EXE).
The location of the Notebook in the OneDrive. (Ex: C:\Users\Maria\OneDrive\mariasnotebook.url)
The URL inside of the OneDrive link (something like https://onedrive.live.com/redir.aspx?cid=abc123&redid=ABC123&type=3&CallerScenarioId=OneNote-Prod&CallerID=Sync-Windows)
Opening the URL in a browser redirects to the OneNote webapp and opens the corresponding notebook. But I do not want to open the notebook in the browser, I want to open the notebook in the OneNote desktop app. I have tried the following to no avail:
I have tried the following commands:
& ONENOTE.EXE "C:\Users\Maria\OneDrive\mariasnotebook"
& ONENOTE.EXE "C:\Users\Maria\OneDrive\mariasnotebook.url"
The above two commands open OneNote, but OneNote stays on "Loading, please wait" and show the warning sign for "could not be synchronized".
& ONENOTE.EXE https://onedrive.live.com/redir.aspx?cid=abc123&redid=ABC123&type=3&CallerScenarioId=OneNote-Prod&CallerID=Sync-Windows
The above command opens OneNote, but OneNote warns that "We couldn't open that location. It might not exist or you might noe have permission to open it."
How can I open a notebook using the OneNote executable? Do I have to use C# or something more fancy to do this?

Related

Isabelle/jEdit just starts with ~/Scratch.thy (or does not launch) by clicking .thy file or using open command in MacOS

Recently, I restarted playing with Isabelle/HOL.
However, I faced the following problem in MacOS (Monterey):
When I click foo.thy file, Isabelle/jEdit launches but ignores foo.thy and starts with ~/Scratch.thy. The same happens when I uses open foo.thy from terminal.
(Also, in MacOS Catalina, Isabelle/jEdit cannot be launched by clicking a file (it tries to launch in the sense that the icon hops in Dock, but after some seconds, it stops), though I cannot re-check it since I've already upgraded MacOS.)
How can I open a theory file by clicking the file?
Some additional information (these are under Monterey):
My Isabelle/jEdit is of Isabelle2021-1 from Isabelle's official site.
I checked Isabelle/jEdit can be launched by clicking Isabelle2021-1.app.
After launching Isabelle/jEdit, I can open files from File > Open... in the Menu bar.
I can open foo.thy directly by /Applications/Isabelle2021-1.app/bin/isabelle jedit foo.thy.
When I launch by clicking a file named Chapter01.thy, then the activity log includes
12:06:08 PM [main] [message] jEdit: starting with command line arguments: -settings=/Users/suzuyu/.isabelle/Isabelle2021-1/jedit -server=Isabelle2021-1 -reuseview -nobackground -nosplash -log=9 /Users/suzuyu/Scratch.thy
so, it seems that the file is already ignored at this stage.

admin center powershell: The application was unable to start correctly

In Windows Admin Center, when pressing PowerShell, this popup appears:
The application was unable to start correctly
Click OK to close the application.
Whitelist winpty-agent.
In cmd:
netsh firewall add allowedprogram "C:\Program Files\Windows Admin Center\winpty-agent.exe" enable
Restart your browser.

Strange thing with a printer driver dll in windows 10

I've a Xerox DocuColor 250, and windows 10. I'm trying to fix a problem that will crash any program when I go to printer preferences.
The strange thing is that: if I open the control panel, printer preferences works good whitout any problem. But if I open printer preferences from for example Word the program will crash and close. On the event viewer I see:
The module that generated the error: harmony10.dll, version: 2.6.102.0.
The path: ": C:\Windows\system32\spool\DRIVERS\x64\3\harmony10.dll"
The error offset "0x00000000000f5dc0"
How is possible that the same thing on the control panel won't crash but with a program it crash with this error?
If the problem won't solved with some windows-tricks, how can I track and debug a program and check what thing don't work and trying to "hack" the dll to bypass the error?
Delete all software associated with the printer, open the command line
and execute the printui /s command.
Next, look for your printer and remove the driver completely.
then install driver into printer disk or download here http://www.support.xerox.com/support/docucolor-240-250/downloads/enus.html?operatingSystem=win10
Also, try to open a command prompt on behalf of the administrator and enter:
 
net stop spooler
del %systemroot%\system32\spool\printers\*.*
net start spooler
exit

Connect from Mac to PC with terminal

how can we do to connect to a PC folder with the Mac Terminal ?
For example with the Terminal I would like to go to:
smb://PCServer01/Folder01/FinalFolder
I think the command you're looking for is open.
open takes an URL argument and can open files, applications, folders, web pages, ...
See man open.

Tomcat 8 System Tray Icon

I've been trying to get the Tomcat8 system tray icon to appear on a Windows Server 2012 box, but I'm running into an issue. I followed the instructions here to put the Tomcat 8 icon in the system try. So, I ran the following command
C:\..\bin>tomcat8w //MS//Tomcat8
The icon shows up in the system tray, as expected, but when I reboot my machine the icon is no longer there, and I must run the same command in order for it to appear again. Is there anything I can do to ensure that the icon remains persistently?
There are several solutions for this.
What worked for me is the following:
Create a .bat to run at windows log on that opens the tomcat icon tray.
To do so, just use what you posted before:
Open a notepad and type the following:
start "" "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin\Tomcat7w.exe" //MS//Tomcat7
Go to file --> Save as...
Select the location C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
in "Filename:" type, TomcatMonitor.bat
in "Save as type" select, All Files (.)
That's it. Next time your computer log on it will run the script to open the Tomcat monitor.
Tomcat 8: If you installed in the default location, type +R, then enter
"C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\Tomcat8w.exe" //MS//
and click OK. This will install the feather icon into the system tray (regardless of whether you had it before or not).

Resources