Jump to content

How to Print a .gif file From a Batch File


Recommended Posts

Guest Steve Behman
Posted

I have a .gif file which, when "dragged", to a printer prints correctly as an

image.

 

When I attempt to get the same result from a batch file using:

 

"print /d:printername file."

 

I get garbage output. When I omit the printer name argument I get a dialog

asking several irrelevant things.

 

What I want to do is accomplish the same result as the drag-and-drop

operation did in a batch file (i.e. the correct printing of the .gif file as

the image it represents).

Posted

Re: How to Print a .gif file From a Batch File

 

Have fun!

 

Batch file examples

http://www.robvanderwoude.com/batexamples_p.html

 

 

ju.c

 

 

"Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

news:3CD26F4C-9159-4EE8-AE60-3E7B1E48EB89@microsoft.com...

> I have a .gif file which, when "dragged", to a printer prints correctly as an

> image.

>

> When I attempt to get the same result from a batch file using:

>

> "print /d:printername file."

>

> I get garbage output. When I omit the printer name argument I get a dialog

> asking several irrelevant things.

>

> What I want to do is accomplish the same result as the drag-and-drop

> operation did in a batch file (i.e. the correct printing of the .gif file as

> the image it represents).

Posted

Re: How to Print a .gif file From a Batch File

 

I recommend the PrintAny.vbs file, no console window!

 

Usage: PrintAny.vbs "C:\Path To\filename.ext"

 

 

Let me know if you need more help tweaking your command.

 

 

ju.c

 

 

"ju.c" <bibidybubidyboop@mailnator.com> wrote in message

news:#1utI25$IHA.1180@TK2MSFTNGP04.phx.gbl...

> Have fun!

>

> Batch file examples

> http://www.robvanderwoude.com/batexamples_p.html

>

>

> ju.c

>

>

> "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

> news:3CD26F4C-9159-4EE8-AE60-3E7B1E48EB89@microsoft.com...

>> I have a .gif file which, when "dragged", to a printer prints correctly as an

>> image.

>>

>> When I attempt to get the same result from a batch file using:

>>

>> "print /d:printername file."

>>

>> I get garbage output. When I omit the printer name argument I get a dialog

>> asking several irrelevant things.

>>

>> What I want to do is accomplish the same result as the drag-and-drop

>> operation did in a batch file (i.e. the correct printing of the .gif file as

>> the image it represents).

>

Guest Steve Behman
Posted

Re: How to Print a .gif file From a Batch File

 

Thanks very much for the response.

 

Unfortunately the .gif file type as**no** "Print" association.

 

Along the way I have learned that the drag-and-drop method actually invokes

mspaint.exe to do the printing!

 

Unfortunately, I have not been able to discover which command line switches

are employed in this process.

 

Searching the Web I have found that there are at least two switches /P and

/PT however, neither of the these produce the same result as does the

drag-and-drop.

 

The search continues!

 

"ju.c" wrote:

> I recommend the PrintAny.vbs file, no console window!

>

> Usage: PrintAny.vbs "C:\Path To\filename.ext"

>

>

> Let me know if you need more help tweaking your command.

>

>

> ju.c

>

>

> "ju.c" <bibidybubidyboop@mailnator.com> wrote in message

> news:#1utI25$IHA.1180@TK2MSFTNGP04.phx.gbl...

> > Have fun!

> >

> > Batch file examples

> > http://www.robvanderwoude.com/batexamples_p.html

> >

> >

> > ju.c

> >

> >

> > "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

> > news:3CD26F4C-9159-4EE8-AE60-3E7B1E48EB89@microsoft.com...

> >> I have a .gif file which, when "dragged", to a printer prints correctly as an

> >> image.

> >>

> >> When I attempt to get the same result from a batch file using:

> >>

> >> "print /d:printername file."

> >>

> >> I get garbage output. When I omit the printer name argument I get a dialog

> >> asking several irrelevant things.

> >>

> >> What I want to do is accomplish the same result as the drag-and-drop

> >> operation did in a batch file (i.e. the correct printing of the .gif file as

> >> the image it represents).

> >

>

Posted

Re: How to Print a .gif file From a Batch File

 

Restore gif association:

 

Info: http://www.dougknox.com/xp/file_assoc.htm

Download: http://www.dougknox.com/xp/fileassoc/xp_giffile_fix.zip

 

 

ju.c

 

 

"Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

news:E150A692-A1C6-45E2-8B99-1EFC21FF1785@microsoft.com...

> Thanks very much for the response.

>

> Unfortunately the .gif file type as**no** "Print" association.

>

> Along the way I have learned that the drag-and-drop method actually invokes

> mspaint.exe to do the printing!

>

> Unfortunately, I have not been able to discover which command line switches

> are employed in this process.

>

> Searching the Web I have found that there are at least two switches /P and

> /PT however, neither of the these produce the same result as does the

> drag-and-drop.

>

> The search continues!

>

> "ju.c" wrote:

>

>> I recommend the PrintAny.vbs file, no console window!

>>

>> Usage: PrintAny.vbs "C:\Path To\filename.ext"

>>

>>

>> Let me know if you need more help tweaking your command.

>>

>>

>> ju.c

>>

>>

>> "ju.c" <bibidybubidyboop@mailnator.com> wrote in message

>> news:#1utI25$IHA.1180@TK2MSFTNGP04.phx.gbl...

>> > Have fun!

>> >

>> > Batch file examples

>> > http://www.robvanderwoude.com/batexamples_p.html

>> >

>> >

>> > ju.c

>> >

>> >

>> > "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

>> > news:3CD26F4C-9159-4EE8-AE60-3E7B1E48EB89@microsoft.com...

>> >> I have a .gif file which, when "dragged", to a printer prints correctly as an

>> >> image.

>> >>

>> >> When I attempt to get the same result from a batch file using:

>> >>

>> >> "print /d:printername file."

>> >>

>> >> I get garbage output. When I omit the printer name argument I get a dialog

>> >> asking several irrelevant things.

>> >>

>> >> What I want to do is accomplish the same result as the drag-and-drop

>> >> operation did in a batch file (i.e. the correct printing of the .gif file as

>> >> the image it represents).

>> >

>>

Posted

Re: How to Print a .gif file From a Batch File

 

The command for mspaint is:

C:\WINDOWS\system32\MSPAINT.EXE "%1" /p

 

 

ju.c

 

 

"ju.c" <bibidybubidyboop@mailnator.com> wrote in message

news:OwYAWWHAJHA.4528@TK2MSFTNGP05.phx.gbl...

> Restore gif association:

>

> Info: http://www.dougknox.com/xp/file_assoc.htm

> Download: http://www.dougknox.com/xp/fileassoc/xp_giffile_fix.zip

>

>

> ju.c

>

>

> "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

> news:E150A692-A1C6-45E2-8B99-1EFC21FF1785@microsoft.com...

>> Thanks very much for the response.

>>

>> Unfortunately the .gif file type as**no** "Print" association.

>>

>> Along the way I have learned that the drag-and-drop method actually invokes

>> mspaint.exe to do the printing!

>>

>> Unfortunately, I have not been able to discover which command line switches

>> are employed in this process.

>>

>> Searching the Web I have found that there are at least two switches /P and

>> /PT however, neither of the these produce the same result as does the

>> drag-and-drop.

>>

>> The search continues!

>>

>> "ju.c" wrote:

>>

>>> I recommend the PrintAny.vbs file, no console window!

>>>

>>> Usage: PrintAny.vbs "C:\Path To\filename.ext"

>>>

>>>

>>> Let me know if you need more help tweaking your command.

>>>

>>>

>>> ju.c

>>>

>>>

>>> "ju.c" <bibidybubidyboop@mailnator.com> wrote in message

>>> news:#1utI25$IHA.1180@TK2MSFTNGP04.phx.gbl...

>>> > Have fun!

>>> >

>>> > Batch file examples

>>> > http://www.robvanderwoude.com/batexamples_p.html

>>> >

>>> >

>>> > ju.c

>>> >

>>> >

>>> > "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

>>> > news:3CD26F4C-9159-4EE8-AE60-3E7B1E48EB89@microsoft.com...

>>> >> I have a .gif file which, when "dragged", to a printer prints correctly as an

>>> >> image.

>>> >>

>>> >> When I attempt to get the same result from a batch file using:

>>> >>

>>> >> "print /d:printername file."

>>> >>

>>> >> I get garbage output. When I omit the printer name argument I get a dialog

>>> >> asking several irrelevant things.

>>> >>

>>> >> What I want to do is accomplish the same result as the drag-and-drop

>>> >> operation did in a batch file (i.e. the correct printing of the .gif file as

>>> >> the image it represents).

>>> >

>>>

Guest Steve Behman
Posted

Re: How to Print a .gif file From a Batch File

 

Thanks again for your response,

 

The command you suggest is precisely the same one that produces garbage -- I

really don't understand why, but, that is the fact!

 

 

 

"ju.c" wrote:

> The command for mspaint is:

> C:\WINDOWS\system32\MSPAINT.EXE "%1" /p

>

>

> ju.c

>

>

> "ju.c" <bibidybubidyboop@mailnator.com> wrote in message

> news:OwYAWWHAJHA.4528@TK2MSFTNGP05.phx.gbl...

> > Restore gif association:

> >

> > Info: http://www.dougknox.com/xp/file_assoc.htm

> > Download: http://www.dougknox.com/xp/fileassoc/xp_giffile_fix.zip

> >

> >

> > ju.c

> >

> >

> > "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

> > news:E150A692-A1C6-45E2-8B99-1EFC21FF1785@microsoft.com...

> >> Thanks very much for the response.

> >>

> >> Unfortunately the .gif file type as**no** "Print" association.

> >>

> >> Along the way I have learned that the drag-and-drop method actually invokes

> >> mspaint.exe to do the printing!

> >>

> >> Unfortunately, I have not been able to discover which command line switches

> >> are employed in this process.

> >>

> >> Searching the Web I have found that there are at least two switches /P and

> >> /PT however, neither of the these produce the same result as does the

> >> drag-and-drop.

> >>

> >> The search continues!

> >>

> >> "ju.c" wrote:

> >>

> >>> I recommend the PrintAny.vbs file, no console window!

> >>>

> >>> Usage: PrintAny.vbs "C:\Path To\filename.ext"

> >>>

> >>>

> >>> Let me know if you need more help tweaking your command.

> >>>

> >>>

> >>> ju.c

> >>>

> >>>

> >>> "ju.c" <bibidybubidyboop@mailnator.com> wrote in message

> >>> news:#1utI25$IHA.1180@TK2MSFTNGP04.phx.gbl...

> >>> > Have fun!

> >>> >

> >>> > Batch file examples

> >>> > http://www.robvanderwoude.com/batexamples_p.html

> >>> >

> >>> >

> >>> > ju.c

> >>> >

> >>> >

> >>> > "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

> >>> > news:3CD26F4C-9159-4EE8-AE60-3E7B1E48EB89@microsoft.com...

> >>> >> I have a .gif file which, when "dragged", to a printer prints correctly as an

> >>> >> image.

> >>> >>

> >>> >> When I attempt to get the same result from a batch file using:

> >>> >>

> >>> >> "print /d:printername file."

> >>> >>

> >>> >> I get garbage output. When I omit the printer name argument I get a dialog

> >>> >> asking several irrelevant things.

> >>> >>

> >>> >> What I want to do is accomplish the same result as the drag-and-drop

> >>> >> operation did in a batch file (i.e. the correct printing of the .gif file as

> >>> >> the image it represents).

> >>> >

> >>>

>

Posted

Re: How to Print a .gif file From a Batch File

 

Did you restore gif association?

And, if so, did it work?

 

Commands must be exact. Even the pros make mistakes. Post an example, (test in the Run

box) like:

 

C:\WINDOWS\system32\MSPAINT.EXE "C:\Documents and Settings\User Name\My Documents\My

Pictures\Pisture.gif" /p

 

 

ju.c

 

 

"Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

news:F908D454-FFBD-4205-AABA-F2A5AA0FFB2A@microsoft.com...

> Thanks again for your response,

>

> The command you suggest is precisely the same one that produces garbage -- I

> really don't understand why, but, that is the fact!

>

>

>

> "ju.c" wrote:

>

>> The command for mspaint is:

>> C:\WINDOWS\system32\MSPAINT.EXE "%1" /p

>>

>>

>> ju.c

>>

>>

>> "ju.c" <bibidybubidyboop@mailnator.com> wrote in message

>> news:OwYAWWHAJHA.4528@TK2MSFTNGP05.phx.gbl...

>> > Restore gif association:

>> >

>> > Info: http://www.dougknox.com/xp/file_assoc.htm

>> > Download: http://www.dougknox.com/xp/fileassoc/xp_giffile_fix.zip

>> >

>> >

>> > ju.c

>> >

>> >

>> > "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

>> > news:E150A692-A1C6-45E2-8B99-1EFC21FF1785@microsoft.com...

>> >> Thanks very much for the response.

>> >>

>> >> Unfortunately the .gif file type as**no** "Print" association.

>> >>

>> >> Along the way I have learned that the drag-and-drop method actually invokes

>> >> mspaint.exe to do the printing!

>> >>

>> >> Unfortunately, I have not been able to discover which command line switches

>> >> are employed in this process.

>> >>

>> >> Searching the Web I have found that there are at least two switches /P and

>> >> /PT however, neither of the these produce the same result as does the

>> >> drag-and-drop.

>> >>

>> >> The search continues!

>> >>

>> >> "ju.c" wrote:

>> >>

>> >>> I recommend the PrintAny.vbs file, no console window!

>> >>>

>> >>> Usage: PrintAny.vbs "C:\Path To\filename.ext"

>> >>>

>> >>>

>> >>> Let me know if you need more help tweaking your command.

>> >>>

>> >>>

>> >>> ju.c

>> >>>

>> >>>

>> >>> "ju.c" <bibidybubidyboop@mailnator.com> wrote in message

>> >>> news:#1utI25$IHA.1180@TK2MSFTNGP04.phx.gbl...

>> >>> > Have fun!

>> >>> >

>> >>> > Batch file examples

>> >>> > http://www.robvanderwoude.com/batexamples_p.html

>> >>> >

>> >>> >

>> >>> > ju.c

>> >>> >

>> >>> >

>> >>> > "Steve Behman" <SteveBehman@discussions.microsoft.com> wrote in message

>> >>> > news:3CD26F4C-9159-4EE8-AE60-3E7B1E48EB89@microsoft.com...

>> >>> >> I have a .gif file which, when "dragged", to a printer prints correctly as an

>> >>> >> image.

>> >>> >>

>> >>> >> When I attempt to get the same result from a batch file using:

>> >>> >>

>> >>> >> "print /d:printername file."

>> >>> >>

>> >>> >> I get garbage output. When I omit the printer name argument I get a dialog

>> >>> >> asking several irrelevant things.

>> >>> >>

>> >>> >> What I want to do is accomplish the same result as the drag-and-drop

>> >>> >> operation did in a batch file (i.e. the correct printing of the .gif file as

>> >>> >> the image it represents).

>> >>> >

>> >>>

>>

×
×
  • Create New...