Missing print option during right-click

V

vauxha11

Hello,
I am running Windows XP SP1. When I right-click on a
file (such as a .txt or a .rtf) I am not getting
the 'print' option. I have a printer installed which works
correctly, and the files that I right-click on are
associated with an application (i.e., .txt files with
notepad). I have checked this feature on every win xp
machine I have seen and I always get the 'print' option
when I right-click on a file -- except on this one
machine.
This is causing an issue because I am have a vb app
which uses a shellexecute command (windows api call) to
print .rtf files -- and this is the only machine where
this command does not work (I do not get any errors, it
just runs the code and doesn't print the file). I know
that the two are related -- the missing print option, and
the non-functioning api call.
Is there a security or registry setting that I am not
aware of that addresses this, or a missing .dll?
Any help would be appreciated.

Thanks,
vauxha11
 
R

Ramesh [MVP]

..rtf associate with Wordpad and Microsoft Word overtakes this association when installed.

Therefore, the Print verb's command varies. The default value for the registry key HKEY_CLASSES_ROOT\.rtf contains the ProgID associated with the file type. The registry key HKEY_CLASSES_ROOT\[ProgID] must contain a subkey for the Print verb. if not the Print context menu won't appear. So the ShellExecute may not run.

For .txt files, apply this REG:

-------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\txtfile\shell\print]

[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00

-----

For .rtf the Print verb command may be Wordpad /p %1
For .txt, the Print verb command is %SystemRoot%\system32\NOTEPAD.EXE /p %1


--
Ramesh - Microsoft MVP
Windows XP Shell/User
http://www.mvps.org/sramesh2k

AumHa VSOP: http://www.aumha.org

Hello,
I am running Windows XP SP1. When I right-click on a
file (such as a .txt or a .rtf) I am not getting
the 'print' option. I have a printer installed which works
correctly, and the files that I right-click on are
associated with an application (i.e., .txt files with
notepad). I have checked this feature on every win xp
machine I have seen and I always get the 'print' option
when I right-click on a file -- except on this one
machine.
This is causing an issue because I am have a vb app
which uses a shellexecute command (windows api call) to
print .rtf files -- and this is the only machine where
this command does not work (I do not get any errors, it
just runs the code and doesn't print the file). I know
that the two are related -- the missing print option, and
the non-functioning api call.
Is there a security or registry setting that I am not
aware of that addresses this, or a missing .dll?
Any help would be appreciated.

Thanks,
vauxha11
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top