Re: How to print from a script
- From: Jeffery Hicks <"jhicks[at]SAPIEN.com">
- Date: Wed, 14 Feb 2007 12:12:03 -0500
On Wed, 14 Feb 2007 08:05:31 -0800, Jrex7 wrote:
I would like to know if there is a way to Print from a script.
I already have a script that looks for specific session names running on
servers. At the end of the script I use the "wscript.echo" method to display
a window showing the results of the script, this window only has an ok
button. What I would like to do is add more code at the end of the scirpt to
come up with another window to give the users the option to print the results
to their default printer or to just exit the script.
Any help on this would be greatly appreciated.
For Each item In objShell.Environment("System")
s=s & item & VbCrLf
rc=MsgBox("Do you want to print the
If rc=vbYes Then
'make sure you wait for the print to finish before deleting the file
objShell.Run "cmd /c Print /d:\\jdhit-dc01\hplaser5 " & strTemp,0,True
I specify a printer but it should accept the default, unless it is a USB
SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com
VBScript & Windows PowerShell Training -
Windows PowerShell? - www.SAPIENPress.com/powershell.asp
- Prev by Date: Re: Login script loging a user out based on day and time...
- Next by Date: Re: Login script loging a user out based on day and time...
- Previous by thread: Re: How to print from a script