lunedì 27 giugno 2011

Command Line Switches

A collection of

Command Line Switches

and arguments to control some program executables

On this page I will collect command line switches for some program executables.
This will make it easier to create reliable "quick-and-dirty" batch files to perform common tasks like printing, file conversion, etcetera without the need to dig into the program's COM object details.
Most programs open a file if its full path is specified on the command line without any switches.
Most files' "Open", "Print" and "PrintTo" commands can be found in the registry under HKEY_CLASSES_ROOT, or by examining file associations, the others may require some web searching, or even reading software manuals. 

Command line switches for:

Microsoft Access

Open a Microsoft Access database:
msaccess.exe Database
Open an Access database for exclusive access:
msaccess.exe Database /excl
Open an Access database for read-only access:
msaccess.exe Database /ro
Compact and repair an Access database:
msaccess.exe OriginalDatabase /compact [ CompactedDatabase ]
If no CompactedDatabase is specified, the OriginalDatabase will be overwritten.
Convert a database from a previous Access version to the current version:
msaccess.exe OldDatabase /convert NewDatabase
Sources with more details:
Not tested

Adobe Reader

Get Adobe Reader
Open a PDF file:
AcroRd32.exe PdfFile
Open a PDF file in a new instance of Adobe Reader:
AcroRd32.exe /N PdfFile
Open a PDF file at page 7:
AcroRd32.exe /A "page=7=OpenActions" PdfFile
Open a PDF file with navigation pane active, zoom out to 50%, and search for and highlight the word "batch":
AcroRd32.exe /A "zoom=50&navpanes=1=OpenActions&search=batch" PdfFile
Print a PDF file with dialog:
AcroRd32.exe /P PdfFile
Print a PDF file silently:
AcroRd32.exe /N /T PdfFile PrinterName [ PrinterDriver [ PrinterPort ] ]
The last command will open a new Adobe Reader window, print the PDF file and then terminate its window unless that window happens to be the only Adobe Reader window left: at least one Adobe Reader window will be left open.
Sources with more details:
Tested with Adobe Reader 8.1.2 on Microsoft Windows XP Professional SP2 (5.1.2600)

AVG Antivirus

Scan and clean a file (scan inside archives and alternate data streams too):
avgscanx.exe /scan=file /ext=* /arc /ads /clean
Thoroughly scan and clean the entire computer:
avgscanx.exe /comp /ext=* /reg /boot /proc /macrow /pup /arc /ads /clean
Run a high priority quick test on the computer, take no action, and report the results including password protected archives:
avgscanx.exe /comp /qt /priority=high /pwdw /report=d:\avgreport.txt
Scan all files in directory d:\datadir, move infected files to the virus vault, report the results:
avgscanx.exe /scan=d:\datadir /ext=* /trash /report=d:\avgreport.txt
Update virus definitions:
avgupd.exe
Notes: (1) Use avgscana.exe for Intel 64 bits processors.
(2) Return codes:
0: everything is o.k.
1: user cancelled/interrupted test
2: any error during the test - cannot open file etc.
3: change identified
4: suspicion detected by heuristic analysis
5: virus found by heuristic analysis
6: specific virus detected
7: active virus in memory detected
8: AVG corrupted
9: double extension
10: archive contains password protected files
Sources with more details:
Tested with AVG Antivirus version 8.0.145 (engine 8.0.0) on Microsoft Windows XP Professional SP3 (5.1.2600)

CDBurnerXP

Get CDBurnerXP
Open a CDBurnerXP compilation file:
cdbxp.exe /od CdbxpCompilationFile
List all CD/DVD writers:
cdbxpcmd.exe --list-drives
Eject the disk in the first CD/DVD writer (device 0):
cdbxpcmd.exe --eject [ -device:0 ]
Load the disk in the first CD/DVD writer (device 0):
cdbxpcmd.exe --load [ -device:0 ]
Erase the disk in the first CD/DVD writer (device 0):
cdbxpcmd.exe --erase [ -device:0 ]
Unfortunately, so far, I haven't been able to burn a CD with cdbxpcmd.exe yet.
Source with more details:
Tested with CDBurnerXP Pro 4.1.1.660 on Microsoft Windows XP Professional SP2 (5.1.2600)

Digital Photo Professional

Open the d:\photos folder in DPP, and display directory tree:
DPPViewer.exe /path d:\photos /tree:on
Open the last used folder in DPP, do not display directory tree:
DPPViewer.exe /tree:off
Tested with Canon's Digital Photo Professional 3.7.2.0 on Microsoft Windows XP Professional SP3 (5.1.2600) and Microsoft Windows 7 Ultimate RC (6.1.7100)

Excel

Open an Excel spreadsheet:
excel.exe ExcelSpreadsheet
Open an Excel spreadsheet in read-only mode:
excel.exe /r ExcelSpreadsheet
Open an Excel spreadsheet in safe mode:
excel.exe /s ExcelSpreadsheet
or:
excel.exe /safemode ExcelSpreadsheet
Sources with more details:
Not tested

Mozilla Firefox

Get Firefox
Open an url in the browser:
firefox.exe -url www.mozilla.com
or:
firefox.exe www.mozilla.com
Open Firefox in safe mode (all add-ons disabled for this session only):
firefox.exe -safe-mode www.mozilla.com
Note: Won't work if another instance of Firefox is running.
Open an url in a new tab in the browser:
firefox.exe -new-tab www.mozilla.com
Open an url in a new browser window:
firefox.exe -new-window www.mozilla.com
Search using Firefox' default search engine:
firefox.exe -search "batch files"
Make Firefox the default browser:
firefox.exe -setDefaultBrowser
Sources with more details:
Note: You may want to experiment with these switches. On some systems, besides opening a specified URL, I couldn't get any of these switches working. This may have be caused by one or more add-ons, or it may not...
Tested with Mozilla Firefox 3.0.4 on Microsoft Windows XP Professional SP3 (5.1.2600)

Foxit Reader

Open a PDF file:
"Foxit Reader.exe" PdfFile
Open a PDF file at page 7:
"Foxit Reader.exe" PdfFile -n 7
Make Foxit Reader the default PDF reader:
"Foxit Reader.exe" -Register
Print a PDF file silently to the default printer:
"Foxit Reader.exe" /p PdfFile
Print a PDF file silently to an alternative printer:
"Foxit Reader.exe" /t PdfFile PrinterName
The next 2 undocumented switches were discovered by Wolfgang Eitel with the aid of SysInternals' ProcessMonitor:
Force Internet Explorer and Firefox to open PDF files inside the browser window:
"Foxit Reader.exe" -displayinbrowser
Force Internet Explorer and Firefox to open PDF files outside the browser window:
"Foxit Reader.exe" -undisplayinbrowser
Notes: (1) The /p and /t switches are case sensitive, the -n switch is not.
(2) Though the Foxit Reader 3.0 Manual suggests otherwise, in version 3.0 the /p and /t switches must be placed at the beginning of the command line, before the file name.
Source with more details:
Tested with Foxit Reader 2.3 Build 2923 on Microsoft Windows XP Professional SP2 (5.1.2600), Foxit Reader 3.0 Build 1817 on Microsoft Windows XP Professional SP3 (5.1.2600) and Microsoft Windows 7 RC (64-bits) (6.1.7100), and Foxit Reader 4.3.1.0218 on Microsoft Windows 7 SP1 (64-bits) (6.1.7601)

Internet Explorer

Get Internet Explorer
Open an URL in Internet Explorer:
iexplore.exe url
Open Internet Explorer without add-ons (IE 7 and later versions only):
iexplore.exe -extoff [ url ]
Open Internet Explorer in Windows Explorer mode (IE 7 and earlier versions only):
iexplore.exe -e Folder
It is not possible to start a Windows Explorer window with alternate credentials.
That is where Internet Explorer's "Explorer mode" comes to the rescue:
use RUNAS and IE's -E switch to start an Explorer look-alike window with alternate credentials.
Folder can be in "drive:\path" or UNC format.
As of IE 7 this workaround may no longer work, as the -e switch became obsolete (though it still does work on my Windows 7 (64-bits) system).
You may want to try this "direct" approach first:
explorer.exe /separate[,Folder]
This works in Windows 7 (64-bits), not sure about other Windows versions though.
Open Internet Explorer in kiosk mode:
iexplore.exe -k [ url ]
Source with more details:
Tested with Internet Explorer 5..7 on Microsoft Windows 2000 & XP Professional, and with Internet Explorer 8 on Microsoft Windows 7 RC (64-bits)

IrfanView

Open a graphics file:
i_view32.exe GraphicsFile
Print a graphics file to the default printer:
i_view32.exe GraphicsFile /print
Print a graphics file to any printer:
i_view32.exe GraphicsFile /print="PrinterName"
Convert a JPG file to TIFF:
i_view32.exe FileName.jpg /convert=FileName.tif
Convert a JPG file to TIFF, and resize it to 800x600 (but keep the aspect ration):
i_view32.exe FileName.jpg /resize=(800,600) /aspectratio /resample /convert=FileName.tif
Scan and print a page:
i_view32.exe /scanhidden /print
Play selected JPG files as a slideshow:
i_view32.exe /slideshow=drive\path\img*.jpg /closeslideshow
Capture the screen and save it as C:\TEST.JPG:
i_view32.exe /capture=0 /convert=c:\test.jpg
Note: All switches must be in lower case.
Sources with more details:
  • i_options.txt (in IrfanView's program directory)
  • IrfanView help file (HH.EXE "mk:@MSITStore:C:\Program%20Files\IrfanView\i_view32.chm::/hlp_command_line.htm")
Tested with IrfanView 4.10 on Microsoft Windows XP Professional SP2 (5.1.2600)

MagicISO

Get MagicISO
MagicISO.exe is the program's GUI executable, but in the same directory where MagicISO.exe is installed, MagicISO's command line tool miso.exe can be found.
List all available CD/DVD writers with their ID number and drive letter:
miso.exe NULL -cd
Quick erase the disk in the CD/DVD writer with ID number 1:
miso.exe NULL -e 1
Create and burn a new ISO file to the CD/DVD writer with ID number 2:
miso.exe ISOFileName.iso -c NewFolder -f NewFolder -a *.* -l3 -l VolumeLabel -be 2
Notes: The -c switch creates a folder NewFolder in the root directory of the ISO image, the -f switch makes this new folder the working directory.
-a *.* adds all files from the current directory, including subdirectories, to the ISO image's working directory.
-be 2 tells the program to quick erase the disk in the CD/DVD writer with ID number 2 if it isn't blank, and then burn the ISO image to the disk.
If ISOFileName.iso already existed, the files and folder(s) will be added to the existing ISO image.
Use -l1 instead of -l3 if you want to restrict file and folder names in the ISO image to their short "8.3 notation".
Delete files from an existing ISO image:
miso.exe ISOFileName.iso -f Folder -d FileSpec
Convert an existing ISO image to Nero's NRG format:
miso.exe NeroFileName.nrg -conv nrg ISOFileName.iso
Sources with more details:
Tested with MagicISO 3.1.113 on Microsoft Windows XP Professional SP2 (5.1.2600)

Nero Burning ROM

Get Nero 9
nero.exe is Nero Burning ROM's GUI executable, but when Nero is installed, the command line tool NeroCmd.exe will be installed too.
For Nero 8, NeroCmd.exe's location can be found in the registry value HKEY_LOCAL_MACHINE\SOFTWARE\Nero\Shared\Lib

Open dialogs

Open Nero Burning ROM in the "Create Bootable CD" dialog:
nero.exe /New:BootDisc /Media:CD
Open Nero Burning ROM in the "Burn Image to CD" dialog:
nero.exe NeroImageFile /Dialog:BurnImage /Media:CD
Open Nero Burning ROM in the "CD Copy" dialog:
nero.exe /Dialog:DiscCopy /Media:CD
Open Nero Burning ROM in the "DVD Copy" dialog:
nero.exe /Dialog:DiscCopy /Media:DVD
Note: A /W switch may be required when using Nero Express.

Unattended

List available CD/DVD writers:
NeroCmd.exe --listdrives
List drive properties for CD/DVD writer E:
NeroCmd.exe --driveinfo --drivename E
List disk properties for CD/DVD in drive E:
NeroCmd.exe --discinfo --drivename E
Eject the disk from drive E:
NeroCmd.exe --eject --drivename E
Load the disk in drive E:
NeroCmd.exe --load --drivename E
Quick erase disk in CD/DVD writer E:
NeroCmd.exe --erase --drivename E --real
Full erase disk in CD/DVD writer E:
NeroCmd.exe --erase --entire --drivename E --real
Write a Nero image to CD/DVD writer E:
NeroCmd.exe --write --drivename E --image NeroImageFile --force_erase_disc --real
Quick erase a rewritable disk in E: and then write "drive\path\*.*" to it at 4x speed:
NeroCmd.exe --write --drivename E --speed 4 --iso VolumeLabel
                --create_iso_fs "drive\path\*.*" --force_erase_disc --real
Note: The 2 lines in the command above should be typed as a single line.
Sources with more details:
Most commands were tested with NeroCmd version 1.9.0.1/Nero API version 6.6.0.19 on Microsoft Windows XP Professional SP2 (5.1.2600), the CD Copy and DVD Copy commands were tested with Nero version 8.0.0.0/Nero API version 8.3.2.1 on Windows XP Professional SP3 (5.1.2600)

Notepad

Open a text file in Notepad:
notepad.exe TextFileName
Force Notepad to open a text file as ASCII text:
notepad.exe /A TextFileName
Print a text file with Notepad (default printer):
notepad.exe /P TextFileName
Tested in Microsoft Windows XP Professional SP2 (5.1.2600)

OpenOffice

Get OpenOffice
Open a file in OpenOffice, don't show the splash screen:
soffice.exe -nologo OpenOfficeFile
Open a new text document in OpenOffice:
soffice.exe -writer
Note: Use -base for databases, -calc for spreadsheets, -draw for drawings, -impress for presentations, -math for formulas, -web for HTML pages, and -writer for text documents.
Open a document in view (read-only) mode:
soffice.exe -view OpenOfficeFile
Start a presentation:
soffice.exe -show OpenOfficeImpressFile
Print an OpenOffice file silently to any printer:
soffice.exe -pt "PrinterName" OpenOfficeFile
Print multiple OpenOffice text files silently to any printer:
soffice.exe -pt "PrinterName" *.odt
Sources:
Tested with OpenOffice.org 2.4.0 on Microsoft Windows XP Professional SP3 (5.1.2600)

PowerPoint

Open a PowerPoint file in Edit mode:
powerpnt.exe PowerPointFile
Open a PowerPoint file in Slideshow mode:
powerpnt.exe /S PowerPointFile
Open a print dialog:
powerpnt.exe /P PowerPointFile
Silently print a PowerPoint file to any printer:
powerpnt.exe /PT "PrinterName" "" "" "PowerPointFile"
Open a PowerPoint file and run an embedded macro:
powerpnt.exe /M PowerPointFile "MacroName"
Sources with more details:
Not tested

PowerPoint Viewer

Get PowerPoint Viewer 2007
Open a PowerPoint file in Slideshow mode:
pptview.exe PowerPointFile
Open a print dialog (without "splash screen"):
pptview.exe /S /P PowerPointFile
Sources with more details:
Tested with PowerPoint Viewer 2007 (12.0.6211) on Microsoft Windows XP Professional SP2 (5.1.2600)

Corel Presentations

Open an existing slideshow or drawing in Presentations:
Prwin12.exe PresentationsDrawingOrSlideshow
Open a copy of an existing slideshow or drawing as a new file:
Prwin12.exe /s PresentationsDrawingOrSlideshow
Open Presentations with a new drawing:
Prwin12.exe /bsd
Open Presentations with a new slideshow:
Prwin12.exe /bss
Source:
Tested with Corel WordPerfect Presentations 12.0.0.602 on Microsoft Windows XP Professional SP2 (5.1.2600)

Corel Quattro Pro

Open an existing spreadsheet in Quattro Pro, without showing the "splash screen":
qpw.exe Spreadsheet /n
Open a password protected spreadsheet without the password dialog:
qpw.exe Spreadsheet /spassword
Repair a damaged spreadsheet:
qpw.exe Spreadsheet /r1
Note: This will remove all objects from Spreadsheet.
If that doesn't fix the file, use the /r2 switch, which will also remove all formulas.
Source:
Except for the repair options, tested with Corel Quattro Pro 12.0.0.602 on Microsoft Windows XP Professional SP3 (5.1.2600); /n switch also tested with Corel Quattro Pro X4 on Microsoft Windows XP Professional SP3 (5.1.2600) and Microsoft Windows 7 Ultimate RC (6.1.7100)

Microsoft RAW Image Viewer

Get Microsoft RAW Image Viewer
Open a RAW image in the viewer:
RAWSupport.exe RawImageFile
Open the print wizard:
RAWSupport.exe /print RawImageFile
Open a RAW image in the associated editor, if configured:
RAWSupport.exe /edit RawImageFile
Note: A RAW image editor is not part of Microsoft's RAW Image Viewer package.
Open the RAW Image Viewer's configuration dialog:
RAWSupport.exe /configure
Source:
  • The RAWSupport.exe /? command
Tested with Microsoft RAW Image Viewer 1.1.50.0 on Microsoft Windows XP Professional SP2 (5.1.2600)

Mozilla Thunderbird

Get Thunderbird
Compose an e-mail message, including attachment:
SET Recipients=to="Recipient",cc="CcRecipient",bcc="BccRecipient"
    SET Message=subject="MessageSubject",body="MessageBody"
    thunderbird.exe -compose %Recipients%,%Message%,attachment="FileToBeAttached"
Notes: The SET commands have been used to split up the command, otherwise the full command line for thunderbird.exe wouldn't fit in the browser window.
Like the mailto: technique, you still need to press the "Send" button to actually send the message.
Open the address book:
thunderbird.exe -addressbook
Sources with more details:
Not all command line switches listed in these sources will work in every Thunderbird version.
Tested with Mozilla Thunderbird 2.0.0.14 (20080421) on Microsoft Windows XP Professional SP2 (5.1.2600)

Sunbelt VIPRE Antivirus + Antispyware

Get VIPRE Antivirus + Antispyware
Run a Quick Scan:
SBAMCommandLineScanner.exe /scannowquick
Run a Deep Scan:
SBAMCommandLineScanner.exe /scannowdeep
Enable active protection:
SBAMCommandLineScanner.exe /enableap
Update virus & spyware definitions:
SBAMCommandLineScanner.exe /updatedefs
Display VIPRE software version:
SBAMCommandLineScanner.exe /displayvipreversion
Display local virus & spyware definitions version:
SBAMCommandLineScanner.exe /displaylocaldefversion
Source with more details:
Tested with VIPRE 3.1.1606.1 on Microsoft Windows XP Professional SP3 (5.1.2600)

Visio

Open a Visio file without showing the "splash screen":
visio.exe VisioFile /nologo
Open the last opened file:
visio.exe /1
Open Visio's print dialog:
visio.exe /p VisioFile
Silently print a Visio file to any printer:
visio.exe /pt VisioFile PrinterName [ DriverName [ PortName ] ]
Sources with more details:
Not tested

Microsoft Word

Open a Word document without "splash screen":
winword.exe WordDocument /q
Open a Word document in safe mode:
winword.exe WordDocument /safe
Open a new Word document based on an existing file:
winword.exe /f WordDocument
Print a Word document:
Open Word and create a macro file with the following content (tested in Word 2007 English, you may need to tweak the code for other versions or languages):
Sub PrintDefault()
'
' PrintDefault Macro
' Print current document to Default Printer
'
    ActiveDocument.PrintOut
    ActiveDocument.Close
    Application.Quit
End Sub
Save the macro as "PrintDefault" in normal.dot. You only need to do this once.
Or download it here, and unzip and import it to normal.dot:
From now on, you can print a Word document using the following command:
winword.exe WordDocument /mPrintDefault /q /n
This command opens WordDocument in Word, prints the document, closes it and exits Word.
The /q switch suppresses the "splash screen", the /n switch opens a new instance of Word, so WordDocument won't show up in the list of documents in any other open instance.
Unfortunately, I haven't found a way yet to hide Word from view during the process.
Notes: It is possible to create a macro that prints to an alternative printer instead of the default.
Save this macro giving it a logical name, and use that macro in the command to print to that alternative printer.

Using macro's on the command line opens up other possibilities too, like saving a file in a different format.
Have a go at it!
Sources with more details:
Tested with Microsoft Word 2007 (12.0.6308.5000) on Microsoft Windows XP Professional SP3 (5.1.2600)

Wordpad

Open a text file (any supported format) in Wordpad:
write.exe TextFileName
Print a text file (any supported format) with Wordpad to the default printer:
write.exe /p TextFileName
Print a text file (any supported format) with Wordpad to any printer:
write.exe /pt TextFileName PrinterName [ DriverName [ PortName ] ]
Note: You may use either wordpad.exe or write.exe, both commands will start WordPad. The only difference is that write.exe is located in the %windir%\System32 directory, and hence doesn't need its fully qualified path specified.
Source:
  • The /p switch was an "educated guess", the /pt switch was found using the command STRINGS wordpad.exe
Tested in Microsoft Windows XP Professional SP2 and SP3 (5.1.2600) and in Microsoft Windows 7 RC (64-bits) (6.1.7100)

WordPerfect

Open a file in WordPerfect, without showing the "splash screen":
WPWin12.exe : WpFile
Print a WP file:
Open WordPerfect and create a macro file with the following content (tested in WordPerfect 12 English, you may need to tweak the code for other versions or languages):
Application (WordPerfect; "WordPerfect"; Default!; "EN")
PrintInColor (State: True!)
PrintGraphics (State: False!)
PrintWithDocumentSummary (State: False!)
PrintCopies (NumberOfCopies: 1)
PrintSortOrder (Order: Group!)
PrintDestination (Destination: DriverPort!)
PrintGraphically (State: False!)
PrintTwoSided (Option: LongEdge!)
PrintInReverseOrder (State: False!)
PrintBooklet (State: False!)
PrintAction (Action: FullDocument!)
Print ()
CloseNoSave ()
ExitWordPerfect ()
Save the macro as "PrintAndClose.wcm" in the default location. You only need to do this once.
Or download it here and unzip and save it in WordPerfect's default macro location:
From now on, you can print a WordPerfect file using the following command:
WPWin12.exe : WpFile /M-PrintAndClose.wcm
This command opens WPFile in WordPerfect, prints the document, closes it and exits WordPerfect.
Unfortunately, I haven't found a way yet to hide WordPerfect from view during the process.
Notes: It is possible to create a macro that prints to an alternative printer instead of the default.
Save this macro giving it a logical name, and use that macro in the command to print to that alternative printer.

Using macro's on the command line opens up other possibilities too, like saving a file in a different format, or converting ("publishing") it to PDF...
Have a go at it!
Sources with more details:
Tested with Corel WordPerfect 12.0.0.602 on Microsoft Windows XP Professional SP2 (5.1.2600)

Microsoft XPS Viewer

Get Microsoft XPS Viewer
Open a file in XPS Viewer:
XpsRchVw.exe XpsFile
Load a file in XPS Viewer and open the Print dialog:
XpsRchVw.exe XpsFile /p
Convert an XPS file to multipage TIFF:
XpsRchVw.exe XpsFile /o:TiffFile.tif
Convert an XPS file to multiple PNG files:
XpsRchVw.exe XpsFile /o:PngFile.png
Tested with Microsoft XPS Viewer 1.0.6000.16438 on Microsoft Windows XP Professional SP2 (5.1.2600)


Samples:
  • Capture.bat
    Use IrfanView to append a screen capture to a multi-page TIF file.
  • PrintDoc.bat
    Use Microsoft Word and CMCDDE to print Word documents unattendedly.
  • PrintPPT.bat
    Use PowerPoint or the PowerPoint Viewer to open a print dialog for a powerPoint file.
  • PrnPDF9.bat
    Use Foxit Reader 3 or Adobe Reader 9 to silently print a PDF file.
Command line switches I haven't been able to verify yet:
Alternatives in case a program just won't print from the command line:
  • Command line DDE
    Control programs that can act as DDE servers.
  • ClassExec
    A command line utility to execute any command, including DDE commands, associated with a file type or extension.
    Use it to open, print, view or edit files, whatever is registered for that file type in HKEY_CLASSES_ROOT.
  • GetPrint.vbs
    Lists non-DDE-based Print and PrintTo commands for all registered file types.
    Read the script's on-screen help to find out how to filter the print commands for a specific file type or extension.
  • PrintDoc.vbs
    Neither MS Word, nor the Word Viewer accept print commands from the command line. So that's where this script comes to the rescue.
    Based on a script by Arnout van der Vorst, this script prints a specified Word document on the default printer.
  • Print any file using the "Shell.Application" object

mercoledì 22 giugno 2011

Installazione JavaT

Installazione JavaTM SE Development Kit, v 6.0 per sistemi Windows

Requisiti:

  • circa 160Mb di spazio su disco per Typical Installation senza public JRE e 270 con Public JRE. L'opzione Public JRE non è necessaria per scrivere i programmi.
  • Sistema operativo consigliato: Windows XP (Home - Professional - Media Center), Windows 2003 Server, Windows 2000 (Professional - Server), Windows Vista. Utilizzare una versione precedente alla 5.0 in sistemi operativi Windows non elencati.
Installazione di Java
  1. Avviate Esplora risorse o Risorse del Computer in Windows.
  2. Localizzate il file di installazione di Java ( jdk-6-windows-i586.exe), selezionando la cartella in cui avete scaricato il file.
  3. fate doppio clic sul file per lanciare il programma di installazione.
  4. Verrete condotti attraverso una serie di passi da una installazione guidata.
  5. Nella finestra Welcome, fate clic su Next >.
  6. Nella finestra License Agreement, leggete le condizioni, quindi fate clic su Accept > per accettarle.
  7. Nella finestra Custom Setup:
    - selezionate i componenti da installare. L'unico componente essenziale è Development Tools. Installando Public JRE viene installato il supporto a Java all'interno dei browser web. Questo componente non è necessario per scrivere ed eseguire i programmi sviluppati per il corso.
    - Premere il pulsante Change... per cambiare la cartella in cui verrà installato il software. Se la cartella non viene cambiata il software verrà installato nella cartella indicata sotto "Install To:"  (C:\Programmi\Java\jdk1.6.0)
    - Fare clic su Next > per proseguire.
  8. Se si è deciso di installare il componente Public JRE verrà mostrata un'altra finestra Custom Setup relativa al JRE. Accettare le opzioni proposte e fare clic su Next >.
  9. Nella finestra Setup Complete fare clic su Finish.
  10. A questo punto è necessario creare una variabile d'ambiente PATH, che consente al sistema operativo di localizzare il compilatore Java e l'interprete Java sul disco rigido.
Impostazione delle variabili d'ambiente (PATH/CLASSPATH)
  1. Fate clic con il pulsante destro del mouse su Risorse del computer e scegliere Proprietà
  2. Andate a Avanzate.
  3. Fate clic sul bottone Variabili d'ambiente. Apparirà unascheda contenente due aree: Variabili di sistema e Variabili dell'utente.
  4. Nella sezione Variabili dell'utente, controllate se c'è una variabile PATH già definita (potreste dover far scorrere quella parte della finestra). Se non c'è, saltate al passo 7.
  5. Fate clic sulla variabile PATH. Compariranno PATH nel campo Variabile e la configurazione attuale di path nel campo Valore nella parte bassa della finestra.
  6. Fate doppio clic nel campo Valore e utilizzate il tasto freccia a destra per portarvi alla fine del testo contenuto in tale campo. Digitate il percorso completo in cui è stato installato Java, più la cartella bin.
    Importante per Windows Vista! La cartella "Programmi" viene vista nel prompt come "Program Files", quindi va utilizzato questo nome nella variabile d'ambiente.

    Ad esempio, se java è stato installato dentro la cartella C:\Programmi\Java\jdk1.6.0, scrivere
               ;C:\Programmi\Java\jdk1.6.0\bin (Windows XP/2000)
               ;C:\Program Files\Java\jdk1.6.0\bin
    (Windows Vista)
    (NOTA 1: se la vostra directory di installazione è diversa, inserite il vostro valore)
    (NOTA 2: Fate attenzione a inserire un punto e virgola alla fine del valore corrente)
    Il punto e virgola è richiesto solo se non ce n'è già uno.
  7. Se la variabile PATH non è definita, fate clic su Nuovo nella parte bassa della finestra. Fate clic sul campo Nome Variabile e digitate
                PATH
  8. Fate clic nel campo Valore e digitate il percorso completo in cui è stato installato Java, più la cartella bin.
    Importante per Windows Vista! La cartella "Programmi" viene vista nel prompt come "Program Files", quindi va cambiato il nome di questa cartella nella variabile d'ambiente.

    Ad esempio, se java è stato installato dentro la cartella C:\Programmi\Java\jdk1.6.0, scrivere
                C:\Programmi\Java\jdk1.6.0\bin (windows XP/2000)
                C:\Program Files\Java\jdk1.6.0\bin (Windows Vista)

    Premete OK per chiudere la finestra Modifica variabili di sistema.
  9. Ora siete pronti a utilizzare Java 2 SDK. Se avevate una qualche finestra Prompt di sistema aperta prima di impostare il PATH, dovrete chiuderla e riaprirla affinché la nuova impostazione PATH abbia effetto. Non è necessario riavviare il computer.

  1. Fate clic sul pulsante Start (nell'angolo in basso a sinistra sullo schermo).
  2. Selezionate Esegui...
  3. Digitate sysedit e premete OK. In questo modo vedrete l'Editor di configurazione di sistema che consente di modificare il file autoexec.bat (e numerosi altri file).
  4. Il file da modificare tra quelli aperti è C:\AUTOEXEC.BAT (la finestra contenente questo file dovrebbe essere in primo piano).
  5. Come ultime linee di questo file, aggiungete
            SET PATH=C:\Programmi\Java\jdk1.6.0\bin;%PATH%
            SET CLASSPATH=.
  6. Nel menu File, selezionate Salva.
  7. Nel menu File, selezionate Esci.
  8. Riavviate il computer affinché le modifiche abbiano effetto.
  1. Fate clic sul pulsante Start (nell'angolo in basso a sinistra dello schermo).
  2. Andate a Impostazioni.
  3. Selezionate Pannello di controllo.
  4. In Pannello di controllo, fate doppio clic su Sistema.
  5. Fate clic sulla scheda Ambiente. Questa scheda contiene due aree: Variabili di sistema e Variabili dell'utente.
  6. Nella sezione Variabili dell'utente, controllate se c'è una variabile PATH già definita (potreste dover far scorrere quella parte della finestra). Se non c'è, saltate al passo 10.
  7. Fate clic sulla variabile PATH. Compariranno PATH nel campo Variabile e la configurazione attuale di path nel campo Valore nella parte bassa della finestra.
  8. Fate clic nel campo Valore e utilizzate il tasto freccia a destra per portarvi alla fine del testo contenuto in tale campo. Digitate quanto segue (NOTA: Fate attenzione a inserire un punto e virgola alla fine del valore corrente):
               ;C:\Programmi\Java\jdk1.6.0\binIl punto e virgola è richiesto solo se non ce n'è già uno.
  9. Saltate al passo 12.
  10. Se la variabile PATH non è definita, fate clic nel campo Variabile nella parte bassa della finestra e digitate
                PATH
  11. Fate clic nel campo Valore e digitate
                C:\Programmi\Java\jdk1.6.0\bin
  12. Se la variabile CLASSPATH non è definita, fate clic nel campo Variabile nella parte bassa della finestra e digitate
                CLASSPATH
  13. Fate clic nel campo Valore e digitate
                .
  14. Fate clic sul pulsante Impostazioni e chiudete la finestra. è estremamente importante che facciate clic su Impostazioni prima, altrimenti le nuove impostazioni non verranno salvate.
  15. Ora siete pronti a utilizzare Java 2 SDK. Se avevate una qualche finestra Prompt di sistema aperta prima di impostare il PATH, dovrete chiuderla e riaprirla affinché la nuova impostazione PATH abbia effetto. Non è necessario riavviare il computer.

giovedì 2 giugno 2011

90 - sviluppo - Data Quality Management pattern Design

Data Quality Management  pattern Design 

Da MIKE2.0 Metodologia

Share/Save/Bookmark
Questo modello deliverable è usato per descrivere un campione di Metodologia MIKE2.0 (normalmente ad un livello di attività). Altri modelli sono ora aggiunti MIKE2.0 come questa è stata una richiesta aspetto spesso della metodologia. contribuenti sono vivamente incoraggiati a contribuire a questo sforzo.
Deliverable modelli sono illustrativo a differenza pienamente rappresentativo . Please help aggiungere esempi di questo modello che sono rappresentativi della produzione proposto.
Lo scopo della Data Quality Management compito può essere di 2 fasi:
  • Esso può essere descritto ad un livello abbastanza dettagliata di come i processi di dati re-engineering possono essere attuate in tutto l'ambiente per migliorare la qualità dei dati.
  • Essa può essere eseguita anche post-creazione dei processi di re-engineering per mostrare come possono essere resa operativa nell'ambiente di integrazione o di essere parte della strategia di migrazione dei dati

Contenuti

[ nascondi ]

Esempio di alto livello Soluzione Definizione per Data Quality Improvement

Di seguito sono elencati esempio di alto livello per la soluzione di definizione dei dati di qualità operativa e Reporting:

Panoramica

Questo documento è stato scritto principalmente per chiarire la portata e per ottenere un accordo su come i problemi di qualità dei dati devono essere gestiti all'interno dell'ambiente di Data Warehouse e di essere citati dalla Business Intelligence (BI) Solution. Esso fornirà anche una soluzione di alto livello che formeranno la base per la BI e sviluppo ETL teams'more lavoro dettagliato di progettazione.
La funzionalità per l'utente finale coperti da questa soluzione possono essere sintetizzati come segue:
  • metriche di pulizia saranno utilizzati per giudicare quanto bene i dati si attiene alle regole di validazione dei dati.
  • metriche Completezza sarà utilizzato per giudicare la quantità di dati di origine è stata caricata nel data warehouse.
  • metriche Tempestività sarà utilizzato per indicare quanto successo i carichi sono stati dati nel conseguimento degli obiettivi di tempestività per quel mese.
  • metrica del tempo di caricamento sarà utilizzato per confrontare i tempi di caricamento contro quella dei carichi precedenti.
  • modifiche ai dati dimensionali saranno monitorati nel tempo ed essere disponibili per l'analisi da parte degli utenti aziendali
  • Tutte le righe respinto saranno disponibili per analisi e reporting nel database di report ETL.
Questi requisiti avranno un impatto sui posti di lavoro di carico e CDR e Data Mart modello di dati e il risultato in 3 nuove relazioni:
  • Dati integrata Repository e Data Data Mart modelli . In aggiunta alle già esistenti Data Quality tavolo, un tavolo respinge e controllo batch tabella sarà necessario per il monitoraggio delle questioni relative alla qualità dei dati e le eccezioni.
  • ETL carico di lavoro . Verrà creato un record nella tabella di qualità dei dati in caso di eventuali inesattezze dei dati nonché compilare specifici campi di dati di qualità in ogni tabella di destinazione. In caso di scarti nel data warehouse, questi record saranno spostati nel data warehouse per l'analisi.
  • Rapporti operativi . Nuovi rapporti saranno tenuti a tenere traccia delle modifiche a dati di riferimento, misurare la qualità dei dati e monitorare l'efficacia dei posti di lavoro di carico e generazione di report.
Le modifiche sono descritte in dettaglio nel seguito di questo documento.

Data Warehouse e di job ETL

Records caricato con i dati temi della Qualità

Le tabelle vengono caricati nel Data Repository integrato che hanno problemi di qualità dei dati verrà contrassegnato nella tabella di destinazione e hanno anche un record inseriti nella tabella i dati di qualità.
Center
La colonna DQ Indicatore identifica potenziali problemi di qualità dei dati con il record e si trova in ogni tabella di destinazione del CDR.
DQ Indicatore Definizione
C cambiare il livello di Colonna si è verificato
D Sistema ha generato record creato per Missing genitori
R Documenti di riferimento di almeno 1 genitore mancante Record
Nessun errore

DQ colonna Indicatore di attenzione sulle questioni DQ
L'indicatore fornisce DQ tracciabilità tra i record incriminato essere caricata nella tabella e record della qualità dei dati tabella.
Il Data Quality tabella viene utilizzata per gli avvisi segnalando su dati caricati nella CDR e fornendo i dati di origine per la segnalazione metriche pulizia. Tutti i dati che sono stati caricati nel Data Quality Table è stato caricato in tabelle di destinazione del CDR.
Colonna Definizione
Nome tabella Il nome della tabella della tabella, la qualità dei dati di errore si è verificato il
Record Key Surrogato tasto assegnato al record
Nome colonna Colonna del nome che ha causato l'errore della qualità dei dati
Valore di dati Valore della colonna che ha causato l'errore della qualità dei dati
Codice di errore Errore codice assegnato dal processo di carico (se del caso)
Testo di errore Breve descrizione del motivo di errore DQ
Data Quality Indicator Data Quality indicatore sollevato
Fonte di sistema Fonte di sistema che ha sollevato la questione della qualità dei dati
Data di creazione Data di carico
Numero di partita Numero di lotto assegnato al processo
Data Quality Table

Rejects

Il progetto si avvarrà di una politica che riduce al minimo il rifiuto dei dati nel data warehouse, ma possono esserci casi in cui si verificano respingimenti (eccezioni per motivi tecnici, ad esempio, come la violazione di chiave o di trasmissione dati superiore a vincoli.). Questi dati saranno messi in respingere i file e poi si trasferisce da un processo di ETL in una tabella respinge nei dati integrata Repository in cui il record d'ingresso intero viene caricata in una singola colonna. La struttura della tabella proposta per la tabella respinge è il seguente:
Colonna Definizione
Numero di partita Numero di lotto assegnato al processo.
Nome tabella Target nome della tabella che lo scarto si è verificato il
Respinto Record Tutti i dati vengono confezionate in questa colonna VARCHAR 4.000
Codice di errore Errore codice assegnato dal processo di carico (se del caso)
Testo di errore Breve descrizione del motivo del rifiuto
Fonte di sistema Fonte di sistema che ha sollevato la questione della qualità dei dati
Data di creazione Data di carico
Numero di partita Numero di lotto assegnato al processo

Respinge Tabella Il processo batch per spostare gli scarti file nel data warehouse può essere sia un lavoro di ETL separato che muove tutti i file o respingere un ulteriore passaggio, alla fine di ogni processo ETL.
Center

Controllo batch

Il controllo batch tabella saranno utilizzati per misurare il numero totale di registrazioni caricate contro quelli che avevano problemi. E 'inoltre utilizzato per fornire dati transazionali per misurare le prestazioni dei processi ETL. Il Batch Control Table è popolato dalla sequenza di alto livello che esegue tutti i processi di ETL. Il numero di lotto viene incrementato l'inizio della sequenza; ogni riavvio nel mezzo di questa sequenza di alto livello comporta il numero di lotto stesso utilizzato. Tutti i processi ETL userà lo stesso numero di lotto per una corsa notturna.
Numero di lotto Incrementato per ogni gestito dalla sequenza di alto livello ETL
Business Data La data di business per cui estratti sono stati elaborati
Batch Data / ora di inizio Data e ora, quando l'esecuzione del lavoro iniziato
Batch Data di scadenza / ora Data e ora, quando il lavoro eseguito completato
Risultato Batch Flag che indica se la partita completata correttamente o è stata interrotta a causa di un errore
Batch Dettagli Eventuali ulteriori dettagli sulla partita

Batch Control Tabella A controllo batch Fact Table nel Data Mart sarà accessibile dalle relazioni per le statistiche dei processi di segnalazione. Questa tabella viene popolata con i dati transazionali dalla tabella di controllo batch nel Integrated Data Repository da un processo di ETL notte. Il controllo batch Fact Table link alla dimensione calendario nella data mart.
Numero di lotto Incrementato per ogni gestito dalla sequenza di alto livello ETL
Batch Data / ora di inizio Data e ora, quando l'esecuzione del lavoro iniziato
Batch Data di scadenza / ora Data e ora, quando il lavoro eseguito completato
Records w / o problemi di DQ Conte di record senza problemi di qualità dei dati
Records w / problemi DQ Conteggio di record con dati di un problema di qualità
Records respinto Conteggio di record con respinto
Batch Dettagli Eventuali ulteriori dettagli sulla partita
Batch Control Tabella dei fatti

Operative di Reporting

Data Quality Reporting

Questa relazione sarà utilizzato per fornire una misura della qualità dei dati, l'efficacia del job ETL contro SLA predefiniti e storia passata.
Qualità dei dati sarà misurata in termini di accuratezza dei dati e Data Completezza. I dati metriche di accuratezza mostrerà quanto bene il aderisce dati alle regole di convalida dei dati e può essere utilizzato per fornire una valutazione della quantità di dati che sono stati caricati nel data warehouse ha potenziali problemi di qualità dei dati. Completezza dei dati metriche mostrano quanto dei dati di origine è stata caricata nel data warehouse.
Misure di accuratezza dei dati e completezza dei dati e visualizza su una base quotidiana e per un mese della storia. Per calcolare la esattezza e completezza, le seguenti misure sono necessarie per Prism al CDR, Weblogs al CDR e CDR di Data Mart:
  1. Il numero totale di righe di dati caricati correttamente senza problemi di qualità
  1. Il numero totale di righe caricato con successo i problemi di qualità dei dati
  1. Numero totale di righe da prisma che è riuscito a caricare in CDR
  1. Numero di lotto
Righe caricato correttamente (senza dati i problemi di qualità) sono state determinate applicando la seguente logica:
  • Se un numero di righe per un numero di lotto specifico contro ogni tabella di destinazione dove DQ indicatore è O. Ciò sarà fatto contro l'Integrated Data Repository e Data Mart.
  • Righe caricato con successo (con dati i problemi di qualità) sono state determinate applicando la seguente logica:
  • Se un numero di righe per un numero di lotto specifico contro il tavolo di Data Quality
  • Utilizza il codice sorgente del sistema attributo per determinare l'origine del carico
  • Calcola i totali righe che è riuscito a caricare con successo sono state determinate applicando la seguente logica:
  • Se un numero di righe per un numero di lotto specifico contro il tavolo Rejects
L'accuratezza è dunque una misura di:
(Totale righe w / o problemi di DQ)
-------------------------------------------------- --------
(Totale righe w / o problemi di DQ
+ W totale righe / problemi DQ)
Completezza è dunque una misura di:
(Totale righe w / o problemi di DQ
+ W totale righe / problemi DQ)
-------------------------------------------------- --------
(Totale righe w / o problemi di DQ
+ Totale righe w / DQ questioni
+ W totale righe / problemi Failure)

ETL carico di prestazioni

L'efficacia dei processi di ETL è determinato utilizzando il controllo batch Fact Table di cercare la seguente:
  • Tempo necessario per caricare i dati di riferimento Prism in IDR
  • Tempo necessario per caricare i dati Weblog nel IDR
  • Tempo necessario per caricare i dati dal Data Mart IDRinto
Queste relazioni saranno indicate su base giornaliera e sarà mostrato per un mese della storia. Tempestività metriche sono mostrati misurando il tempo necessario per caricare i dati contro la SLA che è stato messo in atto per il caricamento di questi dati.

Segnala la generazione di report di prestazioni

La generazione di report relazione sulle prestazioni fornisce una misura di come molte delle relazioni sono state create con successo durante il processo di generazione. Esso fornisce una misura di:
  • Numero di relazioni creato con successo
  • Numero di errori nella creazione di relazioni
  • Tempo necessario per generare i report
Si legge queste informazioni da tabelle di controllo di popolazione come parte del processo di generazione della cartella.