-2

I am developing an application based on C# WPF.

This application uses system register to capture the Explorer Context Menu actions. In other words: the Explorer Context Menu presents an additional Item customized for my application, a bit like NotePad++ (see image 1).

I click on the right button on a file and my application is launched correctly. Naturally, the file name is passed to the application as argument% 1 from the command line. The image 2 shows how I configured the registers for the context menu.

The problem is that if the file name does not contain spaces, everything is fine. If instead it contains spaces, I find the file name in capital letters and truncated.


Case 1 OK

File name: dummy.txt

String captured in %1: dummy.txt


Case 2 KO

File name: paths - Copia.txt

String captured in %1: PACE0~1.TXT


In the following two examples, the first correct and working, the second is the scenario in which I have the problems described.


Image 1

enter image description here

Image 2

enter image description here

Does anyone know a way to avoid this?

Footnotes

Unfortunately I know very little about the Windows system and this is causing me a lot of headaches. I have no idea what the cause of the problem might be.

Keep in mind that I may have misplaced the question: I myself am doubtful that I have provided the information necessary to solve the problem.

shogitai
  • 1,823
  • 1
  • 23
  • 50

1 Answers1

1

Try and change the registry entries to "C:\Program Files (x86)\Polito\Kyactus\Kyactus.exe" "%1" -- enclose both the path to the program and the %1 in quotes, but for each use a different pair.

sticky bit
  • 36,626
  • 12
  • 31
  • 42