Tech Support Guy banner
Status
Not open for further replies.
1 - 1 of 1 Posts

·
Registered
Joined
·
6 Posts
Discussion Starter · #1 ·
We have associated a particular piece of software with a file type so that when the user tries to Open a file of this type, a specific program is run with the argument list provided by the user.

Normally there will be no arguments:

User command: MyFile.ext
Executed command: Viewer.exe MyFile.ext

But the user can invoke the file with a printer name to indicate that they want to print the file rather than view it:

User command: MyFile.ext -p MyPrinter
Executed command: Viewer.exe -p MyPrinter MyFile.ext

The problem we have is when we have to pass printer names which contain spaces - it seems impossible to edit the registry so that the spaces are preserved but the printer is still recognised as a single argument. In other words:

User command: MyFile.ext -p "My Printer"
Desired command: Viewer.exe -p "My Printer" MyFile.ext

Depending on how we attack this, what we get is Viewer.exe returning any one of the following:
Unknown printer: My
Unknown printer: "My
Unknown file: Printer

NB
The reason that the user cannot execute the "Viewer.exe" application explicitly is that its location is indeterminate - the identity of the viewer application is stored elsewhere in the registry. As part of our installation procedure we generate a .reg file and update the client PC. I attach an example - note that this is a version which only supports printer names that do NOT contain spaces - the question is how it could be modified to do so. Nothing we have yet tried works.

Can anyone help here please?
 

Attachments

1 - 1 of 1 Posts
Status
Not open for further replies.
Top