Windows XP
--
Questions
--
Followers
Top Experts
rundll32.exe C:\WINDOWS\System32\shimgv
However the ImageView_PrintTo call needs 4 arguments, while the FullScreen call only requires on.
Would anyone know what the other 4 arguments are so I can print from the command line with a call like:
rundll32.exe C:\WINDOWS\System32\shimgv
what should I put for the last 3 arguments?
Thanks in advance
-willem
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
rundll32.exe C:\WINDOWS\System32\shimgv
rundll32.exe C:\WINDOWS\System32\shimgv
The Windows Picture and Fax Viewer simply pops up. If i replace either %1 or %4 or any of other other args with the filename.tiff the the command simply returns without doing anything. I was hoping to find out what i need to enter in as the values for each of the %#'s.
Because for the:
rundll32.exe C:\WINDOWS\System32\shimgv
call, the %1 is replaced with filename.tiff (if you look at the file type properties for tiff viewing it'll have:
rundll32.exe C:\WINDOWS\System32\shimgv
So following similiar logic I would need to have 4 args for the PrintTo call...
-willem
will print to your default printer






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
So I think my only option is still to figure out what arguments "shimgvw.dll, ImageView_PrintTo" uses.
-willem
Thanks a lot!
-willem
C?
pb

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
The command line is:
rundll32.exe %SystemRoot%\System32\shim
The /pt stands for PrintTo
As the MS article vaguely explains, the 4 arguments are 2 required and 2 legacy from Windows 3.1, thus the last two only need to be 'there' but empty
1st argument is the file name in quotes for long file name with spaces
2nd argument is the printer name in quotes
3rd not used
4th not used
The first is the full path to the file in quotes
The 2nd argument is your printer in the form "\\computername\sharename"
I had to replace the %systemroot% with c:\windows when using the Shell command
Here is the VBA code I used to prep the Shell
Private Sub PrintGraphics(uImagePath As String)
Dim retval
Dim uexeline As String
Dim uPrinterName as string
uPrinterName = "\\Server\Share"
If IsNull(uImagePath) = False Then
If Trim(uImagePath) <> "" Then
uexeline = "rundll32.exe C:\WINDOWS\System32\shimgv
" " & Chr(34) & uPrinterName & Chr(34) & " " & Chr(34) & Chr(34) & " " & Chr(34) & Chr(34)
Debug.Print uexeline
retval = Shell(uexeline, vbHide)
End If
End If
End Sub
My actual uExelilne was:
rundll32.exe C:\WINDOWS\System32\shimgv
Worked like a charm
Windows XP
--
Questions
--
Followers
Top Experts
Microsoft Windows XP is the sixth release of the NT series of operating systems, and was the first to be marketed in a variety of editions: XP Home and XP Professional, designed for business and power users. The advanced features in XP Professional are generally disabled in Home Edition, but are there and can be activated. There were two 64-bit editions, an embedded edition and a tablet edition.