What parameter is Notepad++ using to open files
I am currently working with EPM manager and I’m trying to block opening of a certian file for example “file.config.xml” via notepad++.
I cannot figure out what parameter is notepad++ using when i right click on file -> “Edit with notepad++”
What process runs when notepad++ is opening a file in the manner I described above?
Can someone help me?
I am not sure I understand what you are looking for.
What you describe is a shell extension for the explorer process that is stored in the registry.
Once you click on it, explorer.exe starts the associated program,
and the parameter used is probably
"%1"(with or without quotes),
but that’s true for any program that runs on Windows, hence my confusion.
block opening of a certian file
I certainly don’t get involved in this type of thing on a Windows machine (no need), so maybe I’m off-base, but wouldn’t it be more reasonable to set OS-level permission on the file such that active user can’t read it?
Or, if you have a different need, I think you are going to have to say some more about what the exact need is… which basically was stated well by @Ekopalypse when he said “I am not sure I understand what you are looking for.”
And moreover to the excellent points by @Ekopalypse and @Alan-Kilborn , having “Edit with Notepad++” not show up for a certain file or filetype in Windows Explorer in no way prevents the user from opening Notepad++ and doing File > Open or equivalent, and cannot prevent that.
As they said, the only way to prevent the user from opening
file.config.xmlin Notepad++ is to set the permissions on the file so they cannot even read the file. If all you want is to prevent them from saving changes, then you just need to remove write permission for the user.