Windows XP Hacks Free Open Book

Windows XP Hacks

Previous Section Next Section

Hack 83 Launch Applications with Command-Line Shortcuts

figs/moderate.giffigs/hack83.gif

Launch applications quickly and customize what they do when they run, by using command-line shortcuts, parameters, and switches.

Windows is a graphical operating system, but a lot of times all these pretty icons, menus, and clicking get in the way of getting work done. That's particularly true when you want to launch applications.

I started computing in the days of DOS, when real men and women didn't use mice and icons. (Sometimes because it wasn't an option.) So, I look for any chance I can get to use the command line, particularly when doing so saves me time and lets me take more control of my computer.

That's why I frequently launch applications using command-line shortcuts, along with parameters and switches. Parameters and switches let you customize the way programs launch. They're usually specific to each individual program, though some work on many or all programs.

An even bigger time-saver is to use the command line along with keyboard shortcuts. That way, you can press a key combination—such as Ctrl-Alt-W, for example—and launch Microsoft Word with a new document open, based on a specific template.

9.5.1 Create Keyboard Shortcuts for Running Applications

You'll first, create a desktop shortcut to the application, and then you'll customize the shortcut so that it launches when you use a specific key combination. Right-click on the Desktop and choose New Shortcut. Enter or browse to the filename of the application for which you want to create a shortcut, including its path and surrounding it by quotation marks, such as "C:\Program Files\Microsoft Office\Office10\WINWORD.EXE". Click Next; then, in the "Select a name for the shortcut box," type the name of your new shortcut (such as Basic Word), and click Finish. Right-click on the shortcut you just created and choose Properties. In the Shortcut Tab, shown in Figure 9-5, put your cursor in the "Shortcut key" box and press the key combination you want to use to start the program. It has to be a combination of Ctrl-Alt, Shift-Alt, or Shift-Ctrl, plus a letter key, such as Ctrl-Alt-A, Shift-Alt-A, or Shift-Ctrl-A. In our instance, we're using Ctrl-Shift-W. Click OK. The program will now launch whenever you press the shortcut key combination.

Figure 9-5. The Shortcut Properties dialog box
figs/xph_0905.gif

There are a variety of entries on the Shortcut tab that let you customize how the program launches when you use the shortcut. The Run drop-down list lets you start the program minimized, maximized, or in a normal window. The "Start in" box lets you determine the start location for the application. You can even customize the ScreenTip that appears when you hover the mouse over the shortcut. In the Comment box, type the text you want to appear as a ScreenTip. Figure 9-6 shows how such a customized ScreenTip looks like when a mouse hovers over it.

Figure 9-6. A customized ScreenTip
figs/xph_0906.gif

9.5.2 Customizing Shortcuts with Switches and Parameters

Launching applications with a keyboard shortcut is a time-saver, but there's still a lot you can do to customize those shortcuts. For example, you can set up a number of separate keyboard shortcuts for Word—for example, to launch Word with new documents based on a different templates, or to open Word to specific already-created documents.

For example, let's say you want to launch Word and have it automatically open a specific document, one called chapter 9.doc in the C:\Hacks directory. Type this (all on one line) in the Target box displayed in Figure 9-5:

"C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" "C:\Hacks\chapter 9.doc"

Doing this gives you much more control that double-clicking on the document or creating a shortcut to the document, because, in addition to launching individual files, you can use a variety of switches to customize how you launch those files. For example, let's say you want to launch Word without the splash screen. Use the /q switch, like this:

"C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" /q

You can then combine switches with opening individual files, like this:

"C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" /q "C:\Hacks\chapter 9.doc"

This command opens the file and bypasses the splash screen. Use keyboard shortcuts along with these switches and syntax to create as many customized versions of Office applications as you like. Tables Table 9-1, Table 9-2, and Table 9-3 list switches for Microsoft applications Word, Excel, and PowerPoint, respectively.

Table 9-1. Switches for starting Word

Switch

What it does

/a

Stops add-ins and global templates, including the Normal template, from being loaded automatically. It also locks Word's settings so that they cannot be read or modified.

/l addinpath

Loads a specific Word add-in.

/m

Starts a new instance of Word without running AutoExec macros.

/m filen

Opens the file specified by number on the File menu's Most Recently Used list.

/m macroname

Runs a specific macro and prevents Word from running any AutoExec macros.

/n

Starts a new instance of Word without opening a document. Documents opened will not appear as choices in the Window menu of other Word instances.

/t templatename

Starts Word with a new document based on the specified template.

/w

Starts a new instance of Word with a blank document. Documents opened will not appear as choices in the Window menu of other Word instances.

/r

Opens Word, reregisters it in the Registry, and then quits. Use this switch if there have been problems with Word's settings and you want to reregister it. At times, certain Registry keys associated with Word can get corrupted. If you use this switch, you'll delete the corrupt Registry keys and recreate them from scratch. Your problems should then go away.

/q

Starts Word without the splash screen.

Table 9-2. Switches for starting Excel

Switch

What it does

/r workbook path/file name

Opens the specified workbook as read-only.

/e

Opens Excel without a startup screen and without a new blank workbook.

/m

Opens Excel with a new workbook that contains a single macro sheet.

/p workbook path

Opens Excel and uses the specified path as the active path instead of the default path

/o

Opens Excel and then reregisters it in the Registry. Use this switch if there have been problems with Excel's settings and you want to reregister it.

/regserver

Opens Excel, reregisters it, and then quits.

/unregserver

Opens Excel, unregisters it, and then quits.

Table 9-3. Switches for starting PowerPoint

Switch

What it does

/s

Opens a presentation into the slide show window.

/p

Prints the presentation.

/n template_name.pot.

Creates a new presentation based on the specified template.

9.5.3 See Also

    Previous Section Next Section
    Index: [SYMBOL][A][B][C][D][E][F][G][H][I][J][L][M][N][O][P][Q][R][S][T][U][V][W][X][Z]


         Main Menu
    Main Page
    Table of content
    Copyright
    Credits
    Preface
    Chapter 1. Startup and Shutdown
    Chapter 2. The User Interface
    Chapter 3. Windows Explorer
    Chapter 4. The Web
    Chapter 5. Networking
    Chapter 6. Email
    Chapter 7. The Registry
    Chapter 8. Basic Utilities
    Chapter 9. Applications
    9.1 Hacks #80-85
    Hack 80 Remove Unruly Applications and Uninstall Entries
    Hack 81 Force XP-Incompatible Applications to Run
    Hack 82 Force Older Programs to Use XP Common Controls
    Hack 83 Launch Applications with Command-Line Shortcuts
    Hack 84 Open and Create Microsoft Documents without Microsoft Office
    Hack 85 Stop Hidden Fields in Word from Stealing Your Files and Information
    Chapter 10. Graphics and Multimedia
    Chapter 11. System Performance
    Chapter 12. Hardware
    Colophon
    Index


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele