Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Task Scheduler

14 Feb 2010   #1
boston62

windows 7 ultimate 64
 
 
Task Scheduler

I am trying to setup a Task to print a tif file. When I go to run it, it drops to a dos box and says purge6.tif is printing, but nothing starts. Anyone have this running as a task. This is what I have setup. Thank you for the help.

Action: print
Arguments: purge6.tif
Startin: c:\temp


My System SpecsSystem Spec
.
14 Feb 2010   #2
CyberZeus

Windows 7 Ultimate x64 SP1 clean install
 
 

Hi and welcome to Seven Forums!

Have you correctly set up user name and password for that task? If yes, does that user have permissions on that file?
My System SpecsSystem Spec
14 Feb 2010   #3
boston62

windows 7 ultimate 64
 
 

Quote   Quote: Originally Posted by CyberZeus View Post
Hi and welcome to Seven Forums!

Have you correctly set up user name and password for that task? If yes, does that user have permissions on that file?
Didn't ask for a password, the task does run, but the printer doesn't start, I see where it drops to dos and calls the print command and the file to print, but like I said the printer doesn't start, tried two printers epson r340 wired & epson Artisan 810 wireless. I tried it from dos myself, and it doesn't start the printer.
My System SpecsSystem Spec
.

14 Feb 2010   #4
CyberZeus

Windows 7 Ultimate x64 SP1 clean install
 
 

When you create a new task, Windows always asks for a username and password. It's strange if your Windows didn't...
Anyway, what is the DOS command you run to print?
My System SpecsSystem Spec
14 Feb 2010   #5
ManyBeers

Windows 7 32bit
 
 

Quote   Quote: Originally Posted by boston62 View Post
I am trying to setup a Task to print a tif file. When I go to run it, it drops to a dos box and says purge6.tif is printing, but nothing starts. Anyone have this running as a task. This is what I have setup. Thank you for the help.

Action: print
Arguments: purge6.tif
Startin: c:\temp
I don't think you can just say print in the Action dialog. You need to specify a program that can load a tif file and then use the programs command line switch for printing. For instance I have a scheduled task print job which prints out a .jpg file once a week( to keep ink from drying out from disuse) and I use Irfanview with it's command line switch /print.
My System SpecsSystem Spec
15 Feb 2010   #6
boston62

windows 7 ultimate 64
 
 

Quote   Quote: Originally Posted by ManyBeers View Post
Quote   Quote: Originally Posted by boston62 View Post
I am trying to setup a Task to print a tif file. When I go to run it, it drops to a dos box and says purge6.tif is printing, but nothing starts. Anyone have this running as a task. This is what I have setup. Thank you for the help.

Action: print
Arguments: purge6.tif
Startin: c:\temp
I don't think you can just say print in the Action dialog. You need to specify a program that can load a tif file and then use the programs command line switch for printing. For instance I have a scheduled task print job which prints out a .jpg file once a week( to keep ink from drying out from disuse) and I use Irfanview with it's command line switch /print.
I am trying to do the same thing, to keep my CIS from drying out when I'm away. There was a program called AutoPrint, I used before Win 7, but doesn't work with Win 7.
My System SpecsSystem Spec
15 Feb 2010   #7
WindowsStar

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

Try using:

%SystemDrive%\Windows\System32\mspaint.exe /p filename

In your case:

%SystemDrive%\Windows\System32\mspaint.exe /p %SystemDrive%\temp\purge6.tif
My System SpecsSystem Spec
15 Feb 2010   #8
boston62

windows 7 ultimate 64
 
 

Quote   Quote: Originally Posted by ManyBeers View Post
Quote   Quote: Originally Posted by boston62 View Post
I am trying to setup a Task to print a tif file. When I go to run it, it drops to a dos box and says purge6.tif is printing, but nothing starts. Anyone have this running as a task. This is what I have setup. Thank you for the help.

Action: print
Arguments: purge6.tif
Startin: c:\temp
I don't think you can just say print in the Action dialog. You need to specify a program that can load a tif file and then use the programs command line switch for printing. For instance I have a scheduled task print job which prints out a .jpg file once a week( to keep ink from drying out from disuse) and I use Irfanview with it's command line switch /print.
I took your advice and setup Irfanview and now it's working, but irfanview is printing only a small image, I want it to print the full page of 6 colors, any ideas, and thank you for the great info.
My System SpecsSystem Spec
15 Feb 2010   #9
WindowsStar

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

All of these will print a test page:

cscript.exe prnqctl.vbs -e -p PrinterName

rundll32 printui.dll,PrintUIEntry /k /n \\<ComputerName>\<PrinterName>

PRINTUI /k /n "<PrinterName>"
My System SpecsSystem Spec
15 Feb 2010   #10
WindowsStar

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

Code:
 
-------------------------------------------------------------------------------
File  : 'options.txt' - Command line options for IrfanView
Author: Irfan Skiljan
E-Mail: irfanview@gmx.net
WWW   : IrfanView - Official Homepage - one of the most popular viewers worldwide
-------------------------------------------------------------------------------
List of all command line options supported in IrfanView:
--------------------------------------------------------
  /one                  - force "Only one instance"
  /fs                   - force Full Screen display
  /bf                   - force "Fit images to desktop" display option
  /title=text           - set window title to "text"
  /pos=(x,y)            - move IrfanView window to x,y
  /convert=filename     - convert input file(s) to "filename" and CLOSE IrfanView
                          (Note: See pattern help file page for more options)
  /slideshow=txtfile    - play slideshow with the files from "txtfile"
  /slideshow=folder     - play slideshow with the files from "folder"
  /reloadonloop         - reload input source used in /slideshow when list finished
  /filelist=txtfile     - use filenames from "txtfile" as input, see examples below
  /thumbs               - open Thumbnails window
  /killmesoftly         - close all IrfanView instances (exit after command line)
  /closeslideshow       - close slideshow and IrfanView after the last image
  /page=X               - open page number X from a multipage input image
  /crop=(x,y,w,h)       - crop input image: x-start, y-start, width, height
  /print                - print to default printer and CLOSE IrfanView
  /print="Name"         - print to specific printer and CLOSE IrfanView
  /resize=(w,h)         - resize input image to w (width) and h (height)
  /resize_long=X        - resize input image: set long side to X
  /resize_short=X       - resize input image: set short side to X
  /resample             - for resize: use Resample option (better quality)
  /capture=X            - capture the screen or window (see examples below)
  /ini                  - use the Windows folder for INI/LST files (read/save)
  /ini="Folder"         - use the folder "Folder" for INI/LST files (read/save)
  /clippaste            - paste image from the clipboard
  /clipcopy             - copy image to the clipboard
  /silent               - don't show messages for command line read/save errors
  /invert               - invert input image (negative)
  /dpi=(x,y)            - change image DPI values, set DPIs for scanning
  /scan                 - acquire the image from the TWAIN device (show TWAIN dialog)
  /scanhidden           - acquire the image from the TWAIN device (hide TWAIN dialog)
  /batchscan=(options)  - simulate menu: File->Batch Scan, see examples below
  /bpp=BitsPerPixel     - change color depth of the input image to BitsPerPixel
  /swap_bw              - swap black and white color
  /gray                 - convert input image to grayscale
  /rotate_r             - rotate input image to right
  /rotate_l             - rotate input image to left
  /hflip                - horizontal flip
  /vflip                - vertical flip
  /filepattern="x"      - browse only specific files
  /sharpen=X            - open image and apply the sharpen filter value X
  /contrast=X           - open image and apply the contrast value X
  /bright=X             - open image and apply the brighntess value X
  /gamma=X              - open image and apply the gamma correction value X
  /advancedbatch        - apply Advanced Batch Dialog options to image (from INI file)
  /transpcolor=(r,g,b)  - set transparent color if saving as GIF/PNG/ICO
  /hide=X               - hide toolbar, status bar, menu and/or caption of the main window
  /aspectratio          - used for resizes: keep image proportions
  /info=txtfile         - write image infos to "txtfile"
  /fullinfo             - used for /info, write EXIF, IPTC and Comment data
  /append=tiffile       - append image as (TIF) page to "tiffile"
  /multitif=(tif,files) - create multipage TIF from input files
  /panorama=(X,files)   - create panorama image from input files; X = direction (1 or 2)
  /jpgq=X               - set JPG save quality
  /tifc=X               - set TIF save compression
  /wall=X               - set image as wallpaper
  /extract=(folder,ext) - extract all pages from a multipage file
  /import_pal=palfile   - import and apply a special palette to the image (PAL format)
  /jpg_rotate=(options) - JPG lossless rotation, see examples below
  /monitor=X            - start EXE-Slideshow on monitor X
  /window=(x,y,w,h)     - set EXE-Slideshow window position and size

Important notes:
- Only lower case options are supported (don't type any UPPERCASE letters) !
- Input file name (if required) is always the first parameter!
- Use "" for file names with spaces, example: "c:\images\dummy test file.jpg"
- Write always the FULL paths for file names (incl. drive letter)
- You can combine several options in one command
- Wildcards supported only for /convert, /print, /info and /jpg_rotate
- Maximal command line length is limited by Windows, so use shorter names/paths.
- Most settings are loaded from the INI file. Using prepared INIs and /ini option, you can extend the possibilities.
- IrfanView exit code is 0. If /convert or /print is used, there is 1 or 2 also possible, for load/save error.

Example for conversion: 
  i_view32.exe c:\test.bmp /convert=c:\giftest.gif
  => Convert file: 'c:\test.bmp' to 'c:\giftest.gif' without GUI ;-)
  i_view32.exe c:\*.jpg /convert=d:\temp\*.gif
  i_view32.exe c:\*.jpg /resize=(500,300) /aspectratio /resample /convert=d:\temp\*.png
  i_view32.exe /filelist=c:\mypics.txt /resize=(500,300) /aspectratio /resample /convert=d:\temp\*.png
  i_view32.exe c:\test.bmp /convert=c:\test_$Wx$H.jpg
  i_view32.exe c:\test.bmp /resize=(100,100) /resample /aspectratio /convert=d:\$N_thumb.jpg
  i_view32.exe c:\*.jpg /advancedbatch /convert=c:\temp\*.jpg
  i_view32.exe c:\test.bmp /transpcolor=(255,255,255) /convert=c:\giftest.gif
  (Note: supported are all IrfanView read/save formats except audio/video)
Example for slideshow: 
  i_view32.exe /slideshow=c:\mypics.txt
  (Note: The file 'c:\mypics.txt' contains, in each line, a name of an image file,
         including the full path OR path relative to "i_view32.exe") 
  i_view32.exe /slideshow=c:\mypics.txt /reloadonloop
  i_view32.exe /slideshow=c:\images\
  i_view32.exe /slideshow=c:\images\ /reloadonloop
  i_view32.exe /slideshow=c:\images\*.jpg
  i_view32.exe /slideshow=c:\images\test*.jpg
  Note: you have to close IrfanView after the last image from the TXT file, if no /closeslideshow is used.
Example for closeslideshow: 
  i_view32.exe /slideshow=c:\mypics.txt /closeslideshow
  => IrfanView will be closed after the last image from 'c:\mypics.txt'
Example for thumbnails: 
  i_view32.exe c:\test\image1.jpg /thumbs
  => open 'image1.jpg' and display thumbnails from directory 'c:\test'
  i_view32.exe c:\test /thumbs
  => display thumbnails from directory 'c:\test'
  i_view32.exe /filelist=c:\mypics.txt /thumbs
  => load filenames from TXT file and display as thumbnails
Example for filelist: 
  i_view32.exe /filelist=c:\mypics.txt
  i_view32.exe /filelist=c:\mypics.txt /convert=d:\test\*.jpg
  i_view32.exe /filelist=c:\mypics.txt /thumbs
Example for close: 
  i_view32.exe /killmesoftly
  => close IrfanView and terminate all instances
Example for page:
  i_view32.exe c:\test.tif /page=3
  => Open page number 3 from the multipage image 'c:\test.tif'
Example for crop:
  i_view32.exe c:\test.jpg /crop=(10,10,300,300)
  i_view32.exe c:\test.jpg /crop=(10,10,300,300) /convert=c:\giftest.gif
  => Open 'c:\test.jpg' and crop: x-start=10, y-start=10, width=300, height=300
Example for print:
  i_view32.exe c:\test.jpg /print
  => Open 'c:\test.jpg', print the image to default printer and close IrfanView
  i_view32.exe c:\test.jpg /print="Printer Name"
  => Open 'c:\test.jpg', print the image to specific printer and close IrfanView
  i_view32.exe c:\*.jpg /print
  => Print all JPGs from "C:\" and close IrfanView
  Note: the current settings from the INI file are used.
Example for resize:
  i_view32.exe c:\test.jpg /resize=(300,300) /resample
  => Open 'c:\test.jpg' and resample: width=300, height=300
  (Note: Resample uses the the active resample filter from the INI file)
  i_view32.exe c:\test.jpg /resize=(300,300) /aspectratio
  => Open 'c:\test.jpg' and resize: width = max. 300, height = max. 300, proportional
  i_view32.exe c:\test.jpg /resize=(300,0) /aspectratio
  => Open 'c:\test.jpg' and resize: width=300, height=proportional
  i_view32.exe c:\test.jpg /resize_long=300 /aspectratio /resample
  => Open 'c:\test.jpg' and resample: long side=300, short side=proportional
  i_view32.exe c:\test.jpg /resize=(300,0)
  => Open 'c:\test.jpg' and resize: width=300, height=original
  i_view32 c:\test.jpg /resize=(150p,150p)
  => Open 'c:\test.jpg' and resize: width=150%, height=150%
Example for capture:
  i_view32.exe /capture=0
  => Capture the whole screen
  i_view32.exe /capture=5
  => start in Capture mode, use last used capture dialog settings
  capture values: 
  0 = whole screen
  1 = current monitor
  2 = foreground window
  3 = foreground window - client area
  4 = rectangle selection
  5 = start in capture mode (can't be combined with other options)
  Advanced examples:
  i_view32.exe /capture=2 /convert=c:\test.jpg
  Capture foreground window and save result as file.
  i_view32.exe /capture=2 /convert=c:\capture_$U(%d%m%Y_%H%M%S).jpg
  Capture foreground window and save result as file; file name contains time stamp.
Example for ini:
  i_view32.exe /ini
  i_view32.exe c:\test.jpg /ini
  i_view32.exe c:\test.jpg /ini="c:\temp\"
Example for clipboard paste:
  i_view32.exe /clippaste
  i_view32.exe /clippaste /convert=c:\test.gif
Example for clipboard copy:
  i_view32.exe c:\test.jpg /clipcopy
  i_view32.exe c:\test.jpg /clipcopy /killmesoftly
Example for /invert:
  i_view32.exe c:\test.jpg /invert
Example for /dpi:
  i_view32.exe c:\test.jpg /dpi=(72,72)
Example for /scan:
  With the scan command, you can only combine: /print, /dpi, /gray and /convert.
  i_view32.exe /scan
  i_view32.exe /scanhidden
  i_view32.exe /scanhidden /dpi=(150,150)
  i_view32.exe /scan /convert=c:\test.gif
  i_view32.exe /scanhidden /convert=c:\test.gif
  i_view32.exe /scanhidden /gray /convert=c:\test.gif
  i_view32.exe /print /scan
Example for /batchscan=(options):
  options = 8 options from the batch scan dialog:
  filename, index, increment, digits, skip, dest-folder, save-extension, multi-tif
  i_view32.exe /batchscan=(scanfile,1,1,2,1,c:\temp,bmp,0)
  i_view32.exe /batchscan=(scanfile,1,1,2,1,c:\temp,bmp,0) /dpi=(150,150)
  i_view32.exe /batchscan=(scanfile,1,1,2,0,c:\temp,tif,1)
  i_view32.exe /batchscan=(scanfile,1,1,2,1,c:\temp,bmp,0) /scanhidden
Example for /bpp:
  i_view32.exe c:\test.jpg /bpp=8
  Supported BPP-values: 1, 4, 8 and 24 (decrease/increase color depth)
  => Open 'c:\test.jpg' and reduce to 256 colors
Example for /filepattern:
  i_view32.exe c:\images\ /thumbs /filepattern="*.jpg"
  => Go to folder "c:\images\" and show JPG thumbnails only 
  i_view32.exe c:\images\ /thumbs /filepattern="123*.jpg"
  => Go to folder "c:\images\" and show JPG with names "123*" as thumbnails
Example for /sharpen:
  i_view32.exe c:\test.jpg /sharpen=33
Examples for /hide:
  Values (can be combined (add values)):
    Toolbar     1
    Status bar  2
    Menu bar    4
    Caption     8
  i_view32.exe c:\test.jpg /hide=1
  => Open 'c:\test.jpg', hide toolbar only
  i_view32.exe c:\test.jpg /hide=3
  => Open 'c:\test.jpg', hide toolbar and status bar
  i_view32.exe c:\test.jpg /hide=12
  => Open 'c:\test.jpg', hide caption and menu bar
  i_view32.exe c:\test.jpg /hide=15
  => Open 'c:\test.jpg', hide all
Examples for /info:
  i_view32.exe c:\test.jpg /info=c:\test.txt
  i_view32.exe c:\*.jpg /info=c:\jpgs.txt
  i_view32.exe c:\test.jpg /info=c:\test.txt /fullinfo
Example for /append:
  i_view32.exe c:\test.jpg /append=c:\test.tif
  => Open 'c:\test.jpg' and append it as page to 'c:\test.tif'
Example for /multitif:
  Syntax: /multitif=(tifname,file1,...,fileN)
  First file is the name of the result TIF file.
  i_view32.exe /multitif=(c:\test.tif,c:\test1.bmp,c:\dummy.jpg)
  => Create multipage TIF (c:\test.tif) from 2 other files
Example for /panorama:
  Syntax: /panorama=(X,file1,...,fileN)
  First parameter (X) is the direction: 1 = horizontal, 2 = vertical.
  i_view32.exe /panorama=(1,c:\test1.bmp,c:\dummy.jpg)
  => Create horizontal panorama image from 2 other files
Example for /jpgq:
  i_view32.exe c:\test.jpg /jpgq=75 /convert=c:\new.jpg
  => Open 'c:\test.jpg' and save it as c:\new.jpg, quality = 75
  Quality range: 1 - 100.
Example for /tifc:
  i_view32.exe c:\test.jpg /tifc=4 /convert=c:\new.tif
  => Open 'c:\test.jpg' and save it as c:\new.tif, compression = Fax4
  Compressions: 0 = None, 1 = LZW, 2 = Packbits, 3 = Fax3, 4 = Fax4, 5 = Huffman, 
  6 = JPG, 7 = ZIP
Example for wallpaper:
  i_view32.exe c:\test.jpg /wall=0
  => Open 'c:\test.jpg' and set is as wallpaper (centered)
  wall values: 0 (centered), 1 (tiled), 2 (stretched), 3 (proportional)
Example for /extract:
  i_view32.exe c:\multipage.tif /extract=(c:\temp,jpg)
  => Open 'c:\multipage.tif' and save all pages to folder 'c:\temp' as JPGs
Examples for EXE slideshow:
  MySlideshow.exe /monitor=2
  => Start standalone slideshow on monitor 2
  MySlideshow.exe /window=(0,0,800,600)
  => Start standalone slideshow in top left corner, window size 800x600
Example for /advancedbatch:
  i_view32.exe c:\test.jpg /advancedbatch /convert=c:\image.jpg
  (some Misc. Advanced Batch options are not supported: overwrite, delete, subfolders, all pages)
  => Open 'c:\test.jpg', apply Advanced Batch options from the INI file and save as new file
Example for /jpg_rotate=(options):
  options = all 8 options from the JPG lossless dialog:
  transformation, optimize, EXIF date, current date, set DPI, DPI value, marker option, custom markers
  Note: this option will overwrite the original file(s)!
  Values:
  Transformation   : None (0), Vertical (1) ... Auto rotate (6)
  Optimize         : 0 or 1
  Set EXIF date    : 0 or 1
  Keep current date: 0 or 1
  Set DPI          : 0 or 1
  DPI value        : number
  Marker option    : Keep all (0), Clean all (1), Custom (2)
  Custom markers values (can be combined (add values)):
    Keep Comment 1
    Keep EXIF    2
    Keep IPTC    4
    Keep others  8
  i_view32.exe c:\test.jpg /jpg_rotate=(6,1,1,0,1,300,0,0)
  => Auto rotate, optimize, set EXIF date as file date, set DPI to 300, keep all markers
  i_view32.exe c:\test.jpg /jpg_rotate=(6,1,1,0,0,0,2,6)
  => Auto rotate, optimize, set EXIF date as file date, keep EXIF and IPTC markers
  i_view32.exe c:\test.jpg /jpg_rotate=(3,1,0,1,0,0,1,0)
  => Rotate 90, optimize, use current file date, clean all markers
  i_view32.exe c:\images\*.jpg /jpg_rotate=(6,1,1,0,0,0,0,0)
  => For all JPGs: Auto rotate, optimize, set EXIF date as file date, keep all markers
My System SpecsSystem Spec
Reply

 Task Scheduler




Thread Tools




Similar help and support threads
Thread Forum
Need help creating a task scheduler task to move files over a network.
Hello everyone, I need to have a task run that will move the contents of a folder from one computer to another over my home LAN. Files get downloaded during the night on one computer and then need to be transfered to another. Usually I am doing this by hand, but then though maybe I could get...
General Discussion
Task Scheduler - Create Task to Display a Message Reminder
How to Display a Message Reminder in Windows with Task Scheduler This will show you how to create yourself, or another user or group, a message reminder scheduled to display for when and how often you like in Windows 7 or Vista using Task Scheduler. All users on the computer will be able to...
Tutorials
Task Scheduler : Create Shut Down PC Automatically Task
How to Create a Task that will Shut Down the PC Automatically This will show a very easy way to create a task in the Task Scheduler that will shut down the PC whenever you like. This will work for Windows 7 and Windows Vista. Let's get started! 1) In the Windows start menu search box type...
Tutorials
simple task scheduler question: changing a task name
Hello, I scheduled some tasks in the task scheduler. One of the tasks has a typo and another I would like to change its name. There doesn't seem to be a way of doing this short of resetting up the tasks from scratch and deleting the original tasks. Would anyone know how to rename tasks in the...
Performance & Maintenance
Task scheduler unable to load task status/active tasks at startup.
My task manager is unable to load task status/active tasks at startup. I get the message: "The selected task "{0}" no longer exists. To see the current tasks, click Refresh." When I refresh I get the same message. I checked and found that under Microsoft the problem was in the defrag...
Performance & Maintenance
Task Scheduler failing to start task with merged network locations
I have two routers I usually connect to (work and home) and each have wireless access. That means there are essentially 4 network locations I have listed. I have merged each respective network location (wired and wireless) into their own singular network location - "Work" and "Home". I also...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 06:00.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App