Skip to content

Add a configuration option to control whether to add "New py file" to the "New" in the right-click menu #268

@Xxx91n

Description

@Xxx91n

My system version: Windows11 loT Enterprise Edition 24H2

I don't want to install Python install manager (after restarting) automatically add the "New py file" option to "New" in my right-click menu, and I hope to be able to control this behavior in pymanager.json (or other way).

Since the Python install manager is installed through msix form (Microsoft package), I tried several common registry methods, but I couldn't remove/disable/override the ShellNew function.

Also I noticed that under C:\Program Files\WindowsApps\PythonSoftwareFoundation.PythonManager_25.2.240.0_x64__3847v3x7pw1km\templates:
AppxManifest.xml file
The content in it is:
<uap5:Extension Category="windows.appExecutionAlias"> <uap5:AppExecutionAlias desktop4:Subsystem="console"> <uap5:ExecutionAlias Alias="python.exe" /> </uap5:AppExecutionAlias> </uap5:Extension> <uap:Extension Category="windows.fileTypeAssociation"> <uap:FileTypeAssociation Name="py"> uap:DisplayNamePython Script</uap:DisplayName> uap:InfoTipPython Script </uap:InfoTip> uap:Logo_resources/pyx256.png</uap:Logo> desktop7:Logo_resources/py.ico</desktop7:Logo> <uap:EditFlags OpenIsSafe="false" /> uap:SupportedFileTypes <uap:FileType ContentType="text/x-python" uap4:ShellNewFileName="templates\template.py">.py</uap:FileType> </uap:SupportedFileTypes> </uap:FileTypeAssociation> </uap:Extension>

This section should indicate the template file for "new py file", but I can't modify AppxManifest.xml file.

Now my solution is to install the Python install manager via the installation package in the form of msi, so that there is no "new py file" after the restart. (I'm not sure if this is a feature of the msi package, as I've done a lot of useless work on the registry, and there's also a possibility that after abandoning msix, the priority takes effect)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions