+
    )jX                       R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^RIHtHtHt ^R	IHtHt ^R
IHt ^RIHt ^RIHtHtHtH t H!t! ]! ]"4      t# ! R R]4      t$ ! R R]4      t%R# ) )annotationsN)	getLogger)Path)CompletedProcess)NamedTemporaryFile)Any)WinLex
logged_rununlink)MenuMenuItem)folder_path)windows_terminal_settings_files)notify_shell_changesregister_file_extensionregister_url_protocolunregister_file_extensionunregister_url_protocolc                     a  ] tR t^tR R ltR R lt]R R l4       t]R R l4       t]R	 R
 l4       t	]R R l4       t
]R V 3R ll4       tR R ltRR V 3R llltRR R lltR R ltRtV ;t# )WindowsMenuc                   V ^8  d   QhRR/#    returnztuple[Path] )formats   "6lib/python3.14/site-packages/menuinst/platforms/win.py__annotate__WindowsMenu.__annotate__   s     + + +    c                	R   \         P                  R V P                  4       V P                  P                  RRR7       V P                  '       d   V P                  P                  RRR7       V P
                  '       d   V P
                  P                  RRR7       V P                  3# )zCreating %sTparentsexist_ok)logdebugstart_menu_locationmkdirquick_launch_locationdesktop_locationselfs   &r   createWindowsMenu.create   s    		-!9!9:  &&td&C%%%&&,,TD,I   !!''t'D((**r    c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r   (   s       r    c                	t   \        V P                  4      pVP                  4       '       d%    \        VP	                  4       4       \        4       # \        4       #   \
         dS    \        P                  R T P                  4       \        P                  ! T P                  RR7       T P                  3u # i ; i)Removing %sT)ignore_errors)r   r'   existsnextiterdirStopIterationr%   r&   shutilrmtreetuple)r,   menu_locations   & r   removeWindowsMenu.remove(   s    T556!!3 ]**,-
 wuw	 ! 3		-)A)ABd66dK00223s   A AB76B7c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r   7   s     ] ]T ]r    c                    \        \        V P                  RR4      4      V P                  V P                  4      ,          # )z
On Windows we can create shortcuts in several places:

- Start Menu
- Desktop
- Quick launch (only for user installs)

In this property we only report the path to the Start menu.
For other menus, check their respective properties.
Fstart)r   windows_folder_pathmoderendernamer+   s   &r   r'   WindowsMenu.start_menu_location6   s2     '		5'BCdkkRVR[R[F\\\r    c                   V ^8  d   QhRR/# r>   r   )r   s   "r   r   r   E   s     J Jt Jr    c                	    V P                   R 8X  d   \        P                  ! R4       R# \        \	        V P                   RR4      4      # )systemz>Quick launch menus are not available for system level installsNFquicklaunch)rB   warningswarnr   rA   r+   s   &r   r)   !WindowsMenu.quick_launch_locationD   s7    99 MMZ['		5-HIIr    c                   V ^8  d   QhRR/# r>   r   )r   s   "r   r   r   M   s     F F$ Fr    c                	B    \        \        V P                  R R4      4      # )Fdesktop)r   rA   rB   r+   s   &r   r*   WindowsMenu.desktop_locationL   s    '		5)DEEr    c                   V ^8  d   QhRR/# )r   r   z
list[Path]r   )r   s   "r   r   r   Q   s     : :J :r    c                    V P                   R8X  d#   \        P                  RV P                  4       . # \	        V P                   4      # )zLocation of the Windows terminal profiles.

The parent directory is used to check if Terminal is installed
because the settings file is generated when Terminal is opened,
not when it is installed.
rH   zA%s: Terminal profiles are not available for system level installs)rB   r%   warningrD   r   r+   s   &r   terminal_profile_locations&WindowsMenu.terminal_profile_locationsP   s>     99 KKSUYU^U^ I.tyy99r    c                   V ^8  d   QhRR/# )r   r   zdict[str, str]r   )r   s   "r   r   r   `   s      n r    c                	  < \         SV `  pVP                  R \        V P                  R,          4      R\        V P                  R,          4      R\        V P                  R,          4      R\        V P
                  R,          4      R\        V P
                  R,          4      R\        V P                  R	,          R
,          4      R\        V P                  4       4      RR/4       V# )SCRIPTS_DIRScriptsPYTHONz
python.exePYTHONWzpythonw.exeBASE_PYTHONBASE_PYTHONWBIN_DIRLibrarybinSP_DIRICON_EXTico)superplaceholdersupdatestrprefixbase_prefix_site_packages)r,   re   	__class__s   & r   re   WindowsMenu.placeholders_   s    w+s4;;#:;#dkkL893t{{]:;s4#3#3l#BCD$4$4}$D E3t{{Y6>?#d1134E		
 r    c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r   p   s     	
 	
K 	
r    c           
     	   V P                   R ,          \        \        P                  P	                  RR4      4      V P                   R,          R,          V P                   R,          R,          \        \        P                  P	                  RR4      4      V P                   R,          R,          V P                   R,          R,          3# )z
_conda.exe	CONDA_EXEz"C:\oops\a_file_that_does_not_existcondabinz	conda.batr`   	MAMBA_EXEzmicromamba.exe)ri   r   osenvirongetr+   s   &r   _conda_exe_path_candidates&WindowsMenu._conda_exe_path_candidatesp   s    |+-RSTz)K7u${2-RSTz),<<u$'77
 	
r    c               (    V ^8  d   QhRRRRRRRR/# )r   valuer   slugboolextrazdict[str, str] | Noner   r   )r   s   "r   r   r   {   s*      C t <Q ]` r    c                   < \         SV `  WVR7      p\        VR4      '       d(   RV9   d!   V^ ,          R8w  d   VP                  RR4      pV# )a  
We extend the render method here to replace forward slashes with backslashes.
We ONLY do it if the string does not start with /, because it might
be just a windows-style command-line flag (e.g. cmd /K something).

This will not escape strings such as `/flag:something`, common
in compiler stuff but we can assume such windows specific
constructs will have their platform override, which is always an option.

This is just a convenience for things like icon paths or Unix-like paths
in the command key.
)ry   r{   replace/\)rd   rC   hasattrr}   )r,   rx   ry   r{   rk   s   &&&&r   rC   WindowsMenu.render{   sI     uu=5)$$%(c/MM#t,Er    c                    V ^8  d   QhRRRR/# )r   rh   zPath | Noner   r   r   )r   s   "r   r   r      s     5 5[ 5D 5r    c                	V    Vf   V P                   pV P                   R,          R,          # )NLibzsite-packages)rh   )r,   rh   s   &&r   rj   WindowsMenu._site_packages   s$    >[[F{{U"_44r    c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s     + + +r    c                	    V P                   3# N)r'   r+   s   &r   _pathsWindowsMenu._paths   s    ((**r    r   )FNr   )__name__
__module____qualname____firstlineno__r-   r;   propertyr'   r)   r*   rT   re   ru   rC   rj   r   __static_attributes____classcell__)rk   s   @r   r   r      s    + ] ] J J F F : :   	
 $5
+ +r    r   c                  *   ] tR t^t]R R l4       tR R ltR R ltR R ltR(R	 R
 llt	R R lt
R tR R ltR)R R lltR*R R lltR*R R lltR tR tR t]R+R R ll4       t]R+R R ll4       tR R ltR  R! ltR" R# ltR$ R% ltR& tR'tR# ),WindowsMenuItemc                   V ^8  d   QhRR/# r>   r   )r   s   "r   r   WindowsMenuItem.__annotate__   s     I I$ Ir    c                X    V P                   P                  V P                  4       ,          # )z
Path to the .lnk file placed in the Start Menu
On Windows, menuinst can create up to three shortcuts (start menu, desktop, quick launch)
This property only lists the one for start menu
)menur'   _shortcut_filenamer+   s   &r   locationWindowsMenuItem.location   s"     yy,,t/F/F/HHHr    c                   V ^8  d   QhRR/# r   r   ztuple[Path, ...]r   )r   s   "r   r   r      s     1 1( 1r    c                	   ^RI Hp V P                  4        V P                  4       pV EF5  pVP                  R8X  g   K  V P                  4       vrEV P                  R4      pV'       d;   \        \        P                  P                  V4      4      P                  RRR7       MR\        P                  9   d   RpMRpV P                  R	4      ;'       g    R
p\        V4      P                  4       '       d"   \        P                  RV P                   V4       V! VV P#                  R
R7      \%        V4      RP'                  V4      VV^ V P)                  4       4       EK8  	  V P*                  P,                   F  pV P/                  VRR7       K  	  V P1                  4       p	V P3                  4       p
V	'       g	   V
'       d   \5        4        V# )   )create_shortcutz.lnkworking_dirTr"   USERPROFILEz%USERPROFILE%z%HOMEDRIVE%%HOMEPATH%iconr   z$%s: Overwriting existing link at %s.)ext Fr;   )win_utils.winshortcutr   
_precreater   suffix_process_command
render_keyr   rr   path
expandvarsr(   rs   r3   r%   rS   	_log_namer   rg   join_app_user_model_idr   rT   $_add_remove_windows_terminal_profile_register_file_extensions_register_url_protocolsr   )r,   r   pathsr   target_path	argumentsr   r   r   changed_extensionschanged_protocolss   &          r   r-   WindowsMenuItem.create   ss   :D;;&(&*&;&;&=#K//-8KRWW''45;;DSW;X
 "**,-5??6*00bD Dz  ""BDNNTXY''B'/D	#'')	3 H 		<<H55hu5M =!;;= 88:!2 "r    c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s      ( r    c                	   V P                  4       pV P                  4       pV'       g	   V'       d   \        4        V P                  P                   F  pV P                  VR R7       K  	  \        ;QJ d"    . R V P                  4        4       F  NK  	  5M! R V P                  4        4       4      pV F$  p\        P                  RV4       \        V4       K&  	  V# )Tr   c              3  h   "   T F(  p\        V4      P                  4       '       g   K$  Vx  K*  	  R # 5ir   )r   is_file).0r   s   & r   	<genexpr>)WindowsMenuItem.remove.<locals>.<genexpr>   s!     M}tT
8J8J8Ldd}s   !2
2r1   )_unregister_file_extensions_unregister_url_protocolsr   r   rT   r   r9   r   r%   r&   r   )r,   r   r   r   r   r   s   &     r   r;   WindowsMenuItem.remove   s    !==? ::<!2 "		<<H55ht5L = Mt{{}MMt{{}MMDIImT*4L  r    c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      s      ( r    c                	t   V P                   .p. pV P                  R ,          '       d&   VP                  V P                  P                  4       V P                  R,          '       dX   V P                  P
                  '       d<   \        P                  ! R4       VP                  V P                  P
                  4       V'       d-   Y Uu. uF  q3V P                  4       ,          NK  	  up,          pV P                  R,          '       d    VP                  V P                  4       4       \        V4      # u upi )rO   rI   z"Quick launch menus are deprecated.activate)r   metadataappendr   r*   r)   rJ   rK   r   _path_for_scriptr9   )r,   r   
extra_dirs	directorys   &   r   r   WindowsMenuItem._paths   s    
==##dii889==''DII,K,K,KMM>?dii==>ZXZ	$"9"9";;;ZXXE==$$LL..01U| Ys   
D5c                   V ^8  d   QhRR/# )r   r   rg   r   )r   s   "r   r   r      s     ; ;c ;r    c                	N    V'       d   R V 2MRpV P                  R/ R7       V 2# ).r   rD   )r{   r   )r,   r   s   &&r   r   "WindowsMenuItem._shortcut_filename   s.    #iB//&/34SE::r    c                   V ^8  d   QhRR/# r>   r   )r   s   "r   r   r      s     Y Y$ Yr    c                	z    \        V P                  P                  R ,          4      V P                  R4      ,          # )MENU_DIRbat)r   r   re   r   r+   s   &r   r    WindowsMenuItem._path_for_script   s-    DII**:67$:Q:QRW:XXXr    c                	   V P                  R 4      pV'       g   R# \        RRR7      ;_uu_ 4       pVP                  V4       RRR4       \        \        P
                  P                  RR4      4      R,          p\        VR,          R	,          R
,          4      RXP                   R2.p\        VRR7       \        P                  ! VP                  4       R#   + '       g   i     L; i)	precreateNFw)deleterB   
SystemRoot
C:\Windowssystem32WindowsPowerShellv1.0powershell.exez"start 'z' -WindowStyle hidden"Tcheck)r   r   writer   rr   rs   rt   rg   rD   r
   r   )r,   precreate_codetmpr   cmds   &    r   r   WindowsMenuItem._precreate   s    5u3773IIn% 8

|]CDzQ..7:JJKz!89
 	3d#
		#(( 87s   CC*	c                   V ^8  d   QhRR/# )r   r   rg   r   )r   s   "r   r   r   
  s     ;" ;"# ;"r    c           	     	   R R.pV P                  R4      pV'       d   VP                  V4       V P                  R,          '       Ed   V P                  P	                  V P                  P
                  4      '       d<   RV P                  P
                   RV P                  P                   R2pRV R2R.pEMg\        V P                  P
                  4      R	R\        V P                  P                  4      .p\        VR
RR7      p\        VP                  P                  4       4      pVP                  pVR8X  d;   RV P                  P
                   RV P                  P                   R2pRV R2R.pMVR8X  d   . pVP                  4       P                  4        F[  p	V	P                  4       P                  R^4      w  rV
R8X  d   VP                  RV R24       KC  VP                  RV
 RV R24       K]  	  M\!        RV RV R24      hVP#                  4        VR.VORN,          pVP                  RP%                  \&        P(                  ! V P                  R4      4      4      4       RP%                  V4      # )z	@ECHO OFFz%:: Script generated by conda/menuinst
precommandr   "z" shell activate "z%@FOR /F "usebackq tokens=*" %%i IN (`z`) do set "ACTIVATOR=%%i"z@CALL %ACTIVATOR%zshell.cmd.exeTF)r   r%   z.batz" shell.cmd.exe activate "z.env=_CONDA_SCRIPTz@CALL "z@SET "z2Menuinst cannot parse activation scripts of type 'z': ''z @SETLOCAL ENABLEDELAYEDEXPANSIONz!:: This below is the user commandr   commandz
)r   r   r   r   _is_micromamba	conda_exerh   rg   r
   r   stdoutstripr   	read_text
splitlinessplitNotImplementedErrorr   r   r	   
quote_args)r,   linesr   	activatoractivation_linesactivator_cmdactivator_runactivation_filefiletypelinekeywordrx   s   &           r   _commandWindowsMenuItem._command
  sm   3
 __\2
LL$==$$yy''		(;(;<<		 3 344FtyyGWGWFXXYZ	;I;F_`'$  		++,#		(()	! !+=% P"&}';';'A'A'C"D*11v%DII//00J499K[K[J\\]^  @	{Jcd+($ '')$ / 9 9 ; F F H)-););C)C"o5,33geWA4FG,33fWIQugQ4OP !I .LXJVZ[jZkklm   &&(2! 4 E 	SXXf//	0JKLM{{5!!r    Nc                    V ^8  d   QhRRRR/# )r   script_pathzos.PathLike | Noner   r   r   )r   s   "r   r   r   G  s      ); t r    c                    Vf   V P                  4       pM\        V4      pVP                  P                  RRR7       \	        VR4      ;_uu_ 4       pVP                  V P                  4       4       RRR4       V#   + '       g   i     T# ; i)zL
This method generates the batch script that will be called by the shortcut
NTr"   r   )r   r   parentr(   openr   r  )r,   r  fs   && r   _write_scriptWindowsMenuItem._write_scriptG  sz     //1K{+K   =+s##qGGDMMO$ $  $# s    A<<B	c                    V ^8  d   QhRRRR/# )r   	with_arg1rz   r   z
tuple[str]r   )r   s   "r   r   r   V  s     (* (*$ (*: (*r    c           
        V P                   R,          '       d   V P                  4       pV P                   R,          '       d*   RRR\        V4      .pV'       d   VP                  R4       M\	        \
        P                  P                  RR4      4      R	,          pVR
,          R,          R,          pV'       d   RMRpRV RV R2p\        VR,          4      RRRRR\        V4      RRV.
p\        P                  ! V4      # V P                  R4      pV'       dL   \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   VP                  R4       \        P                  ! V4      # )z1Process command and run it via WinLex.quote_args.r   terminalr   /Dz/Kz"%1"r   r   r   r   r   r   z%1 r   zstart 'z' z-WindowStyle hiddenzcmd.exe/CSTARTz/MINz""z-WindowStylehiddenr   c              3  ,   "   T F
  pR V9  x  K  	  R# 5i)z%1Nr   )r   args   & r   r   3WindowsMenuItem._process_command.<locals>.<genexpr>|  s     @T_s   FT)r   r	  rg   r   r   rr   rs   rt   r	   r   r   all)r,   r  scriptr   r   pwsharg1start_scripts   &&      r   r    WindowsMenuItem._process_commandV  s>   ==$$'')F}}Z(( $c&k:NN6*
  

|] KLzY"55>AQQ )ur ")4&8KL9,-I"  $$W-- //), @@@@@@NN6"  ))r    c                    V ^8  d   QhRRRR/# )r   r   r   r;   rz   r   )r   s   "r   r   r     s     -< -<T -<4 -<r    c                   V P                   P                  R4      '       d!   VP                  P                  4       '       g   R# V P	                  R4      pVP                  4       '       d%   \
        P                  ! VP                  4       4      M/ pRp\        VP                  R/ 4      P                  R. 4      4       F  w  rgVP                  R4      V8X  g   K  Tp M	  V'       d   V^ 8  d   R# VR,          R,          V EM"RRP                  \        P                  ! V P	                  R4      4      4      RV/pV P                   P                  R	4      '       d   V P	                  R	4      VR	&   V P                   P                  R
4      '       d   V P	                  R
4      VR&   V^ 8  dG   RV9  d   / VR&   RVR,          9  d   . VR,          R&   VR,          R,          P                  V4       M3\        P                  RV P                  V4       WR,          R,          V&   VP!                  \
        P"                  ! V^R7      4       R# )a  Add/remove the Windows Terminal profile.

Windows Terminal is using the name of the profile to create a GUID,
so the name will be used as the unique identifier to find existing profiles.

If the Terminal app has never been opened, the settings file may not exist yet.
Writing a minimal profile file will not break the application - Terminal will
automatically generate the missing options and profiles without overwriting
the profiles menuinst has created.
terminal_profileNprofileslistrD   commandliner   r   r   r   startingDirectoryz(%s: Overwriting terminal profile for %s.)indent)r   rt   r  r3   r   jsonloadsr   	enumerater   r	   r   r   r%   rS   r   
write_textdumps)	r,   r   r;   rD   settingsindexpprofileprofile_datas	   &&&      r   r   4WindowsMenuItem._add_remove_windows_terminal_profile  s    }}  !344HOO<R<R<T<T127?7H7H4::h0023b#HLLR$@$D$DVR$PQJA{{6"d* R
 qy$V,U3 sxx(9(9$//):T(UVL }}  (('+v'>V$}}  //48OOM4R01qyX-+-HZ(*!5535HZ(0$V,33LAFX\]6B$V,U3DJJx:;r    c                	6    V P                  R RR7      pV RV 2# )rD   Try   z
.AssocFiler   )r,   	extension
identifiers   && r   _ftype_identifier!WindowsMenuItem._ftype_identifier  s%    __V$_7
Z	{33r    c           	     x   V P                   R,          pV'       g   R# RP                  V P                  4       4      p\        \        P                  V Uu. uF  q3P                  4       NK  	  up4      4      pV F7  pV P                  V4      pV P                  WR4       V P                  W5R7       K9  	  R# u upi )8
This function uses CMD's `assoc` and `ftype` commands.
file_extensionsNr   )associate_to)
r   r   r   r   dictfromkeyslowerr4  
_cmd_ftype
_cmd_assoc)r,   
extensionsr   r   extsr3  s   &     r   _register_file_extensions_cmd-WindowsMenuItem._register_file_extensions_cmd  s     ]]#45
((40023DMM*"E*399;*"EFGC//4JOOJ0OOCO9  #Fs   B7c           	        V P                   R,          pV'       g   R# \        \        P                  V Uu. uF  q"P	                  4       NK  	  up4      4      pV F%  pV P                  V4      pV P                  V4       K'  	  R# u upi )r7  r8  N)r   r   r:  r;  r<  r4  r=  r,   r?  r   r@  r3  s   &    r   _unregister_file_extensions_cmd/WindowsMenuItem._unregister_file_extensions_cmd  sk     ]]#45
DMM*"E*399;*"EFGC//4JOOJ'  #Fs   Bc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r2  rg   r9  
str | Nonequeryrz   r;   r   r   r   )r   s   "r   r   r     s;     K KK&0K@DKVZK	Kr    c                    \        WV.4      ^8w  d   \        R4      hV P                  R4      '       g   \        R4      hV'       d	   V  RV 2pMV'       d   T pMV'       d   V  R2p\        RRRRX 2.R	R
7      # )zVhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/assocz6Only one of {associate_to, query, remove} must be set.r   zextension must startwith '.'r   r   r  r  assoc Tr   )sum
ValueError
startswithr
   )r2  r9  rI  r;   r  s   &&&& r   r>  WindowsMenuItem._cmd_assoc  s    
 V,-2UVV##C((;<<Kq/CCKq/C5$sen=TJJr    c               (    V ^8  d   QhRRRRRRRR/# )r   r   rH  rI  rz   r;   r   r   r   )r   s   "r   r   r     s2     K K'K7;KMQK	Kr    c                    \        WV.4      ^8w  d   \        R4      hV'       d	   V  RV 2pMV'       d   T pMV'       d   V  R2p\        RRRRX 2.RR7      # )	zVhttps://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ftypez1Only one of {command, query, remove} must be set.r   r   r  r  rK  Tr   )rL  rM  r
   )r3  r   rI  r;   r  s   &&&& r   r=  WindowsMenuItem._cmd_ftype  sh    
 '(A-PQQL'+CCL"C5$sen=TJJr    c                   V ^8  d   QhRR/# r   r   rz   r   )r   s   "r   r   r     s      4 r    c                   V P                   R,          pV'       g   R# RP                  V P                  RR7      4      pV P                  R4      p\	        \
        P                  V Uu. uF  qDP                  4       NK  	  up4      4      pV FW  pV P                  V4      p\        VVVVV P                  R4      V P                  4       V P                  P                  R7       KY  	  R# u upi )	WIPr8  Fr   Tr  r   rD   r   app_nameapp_user_model_idrB   )r   r   r   r   r   r:  r;  r<  r4  r   r   r   rB   )r,   r?  r   r   r   r@  r3  s   &      r   r   )WindowsMenuItem._register_file_extensions  s    ]]#45
((40040@Av&DMM*"E*399;*"EFGC//4J#0"&"9"9";YY^^   #Fs   (C*c                   V ^8  d   QhRR/# rT  r   )r   s   "r   r   r     s     	 	T 	r    c           	     	6   V P                   R ,          pV'       g   R# \        \        P                  V Uu. uF  q"P	                  4       NK  	  up4      4      pV F5  pV P                  V4      p\        W$V P                  P                  R7       K7  	  R# u upi )r8  FrB   T)	r   r   r:  r;  r<  r4  r   r   rB   rD  s   &    r   r   +WindowsMenuItem._unregister_file_extensions  st    ]]#45
DMM*"E*399;*"EFGC//4J%cDIINNK  	 #Fs   Bc                   V ^8  d   QhRR/# rT  r   )r   s   "r   r   r     s       r    c                ^   V P                   R,          pV'       g   R# RP                  V P                  RR7      4      pV P                  R4      pV FW  pV P	                  V4      p\        VVVVV P                  R4      V P                  4       V P                  P                  R7       KY  	  R# )	z~See https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)url_protocolsFr   TrW  r   rD   rX  )	r   r   r   r   r4  r   r   r   rB   )r,   	protocolsr   r   protocolr3  s   &     r   r   'WindowsMenuItem._register_url_protocols  s    MM/2	((40040@Av&!H//9J!0"&"9"9";YY^^ " r    c                   V ^8  d   QhRR/# rT  r   )r   s   "r   r   r   #  s      4 r    c                	    V P                   R ,          pV'       g   R# V F5  pV P                  V4      p\        W#V P                  P                  R7       K7  	  R# )rb  Fr^  T)r   r4  r   r   rB   )r,   rc  rd  r3  s   &   r   r   )WindowsMenuItem._unregister_url_protocols#  sG    MM/2	!H//9J#Htyy~~N " r    c                	    V P                  R 4      pV'       g.   RV P                  RRR7      P                  RR4       2R,          # V# )rZ  z	Menuinst.rD   Tr1  r   r   :N   N)r   r}   )r,   aumis   & r   r   "WindowsMenuItem._app_user_model_id,  sG    23tvDAII#rRSTUYZZr    r   )lnkr   )F)NFF)r   r   r   r   r   r   r-   r;   r   r   r   r   r  r	  r   r   r4  rA  rE  staticmethodr>  r=  r   r   r   r   r   r   r   r    r   r   r      s    I I1f $;Y;"z(*T-<^4:
( K K  K K,	(r    r   )&__doc__
__future__r   r%  rr   r7   rJ   loggingr   pathlibr   
subprocessr   tempfiler   typingr   utilsr	   r
   r   baser   r   win_utils.knownfoldersr   rA   r   win_utils.registryr   r   r   r   r   r   r%   r   r   r   r    r   <module>rz     sh     "  	     ' '  . .   F C  u+$ u+pZh Zr    