python .\leo-editor\leo\scripts\win-register-leo.leox
leo-messages.exe --script=..\scripts\win-register-leo.leox
(leo-dev) matt@ENV-SURFACE-MHW C:\Users\mattw\code\leo-editor
> python leo\scripts\win-register-leo.leox
--- Running register-leo Leo script
No admin privileges. Start Leo as administrator first and then run this script
--- end of script
matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\python leo-editor\leo\scripts\win-register-leo.leox
--- Running register-leo Leo script
Attempting to register leo filetype with Windows...
Python: c:\apps\miniconda3\envs\leo-dev\pythonw.exe
Leo: c:\apps\miniconda3\envs\leo-dev\Scripts\leo.exe
Found: c:\users\mattw\code\leo-editor\leo\Icons\LeoDoc.ico
Registered!
.leo, .leox files associated as 'Leo.File'
--- end of script
matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\python leo-editor\leo\scripts\win-unregister-leo.leox
--- Running unregister-leo Leo script
Attempting to un-register leo filetype with Windows...
Leo file type has been removed from registry
.leo, .leox file associations removed from registry
--- end of script
matt@ENV-SURFACE-MHW C:\Users\mattw\code
$ c:\apps\miniconda3\envs\leo-dev\Scripts\leo-m.exe --script=..\scripts\win-register-leo.leox
Leo 5.8.1-b2 devel, build 20190222005157, Fri Feb 22 00:51:57 PST 2019
--- Running register-leo Leo script
Attempting to register leo filetype with Windows...
Python: c:\apps\miniconda3\envs\leo-dev\pythonw.exe
Leo: c:\apps\miniconda3\envs\leo-dev\Scripts\leo.exe
Found: c:\users\mattw\code\leo-editor\leo\Icons\LeoDoc.ico
Registered!
.leo, .leox files associated as 'Leo.File'
Good news! The Register and Unregister scripts to enable/disable Windows to start Leo from double-clicking on a .leo file now work. --- For me. testing appreciated.
With b380d72 there's no longer a need to manually launch Leo or a command shell as administrator. Yay!
register-leo.leox fully working, inc. re-launch elevated
So now both register and unregister work, and we no longer require the
user to manually launch Leo or a CMD shell as administrator. Leo prompts
for elevation at run time.
What's not good: we're using cross-file clones between the scripts
because of the shared request elevation and related code. Have to figure
out how to combine these into a single script, or maybe even move into
Leo itself(?)
The prompt for elevation from just python on the command line does
not work. I haven't dug into it because now that we can fire from inside
Leo it's less necessary.
With b380d72 there's no longer a need to manually launch Leo or a command shell as administrator. Yay!