Monday, 21 March 2011

Command-line switches for Microsoft Office Outlook 2007


The command that starts Microsoft Office Outlook 2007 is outlook.exe. A command-line switch is the addition of a forward slash followed by the command name and any parameters.
In this article

What are commands and switches?

Each time you start the program, you run the outlook.exe command, although you do not usually type the command or even see it. You can change certain aspects of how the program starts by adding subcommands called switches to the outlook.exe command.
A switch appears as a space after the main command, followed by a forward slash and the name of the switch, which provide further information about how to execute the command.
For example, the following command instructs Office Outlook 2007 to start with the Reading Pane turned off.

Outlook command line switches
Callout 1 The command outlook.exe starts Outlook.
Callout 2 The switch /nopreview starts Outlook with the Reading Pane turned off.

Use a switch once by adding it to the Run command

First, verify the location of the outlook.exe file on your computer. If you accepted the default folder locations when you installed Office Outlook 2007, the outlook.exe file is located at the following:
c:\program files\microsoft office\office12\outlook.exe
If you do not find the outlook.exe file at that location, search for the file and make a note of the full path.
  1. Do one of the following:
    • Windows Vista    
      • Click the Windows Start button Button image, point to All Programs, clickAccessories, and then click Run.
    • Microsoft Windows XP or Microsoft Windows Server 2003    
      • Click the Windows Start button, and then click Run.
  2. In the Run dialog box, type a quotation mark, enter the full path for the outlook.exe file, and then type another quotation mark. Alternatively, clickBrowse to locate and select the file. In this case, the quotation marks are supplied automatically.
  3. After the closing quotation mark, type a space, and then type the switch. For example, you might type:
"c:\program files\microsoft office\office12\outlook.exe" /nopreview
The next time that you start Office Outlook 2007, the program opens normally. To make your customized startup available for repeated uses, see the next section.
 NOTES 
  • Switches are not case-sensitive. For example, /NOPREVIEW functions the same as /nopreview.
  • Remember to include one blank space before the switch and one before each parameter.

Make a switch available for reuse by creating a shortcut

First, verify the location of the outlook.exe file on your computer. If you accepted the default folder locations when you installed Office Outlook 2007, the outlook.exe file is probably located at the following:
c:\program files\microsoft office\office12\outlook.exe
If you do not find the outlook.exe file at that location, search for the file and make a note of the full path.
  1. Right-click the Windows desktop, point to New, and then click Shortcut on the shortcut menu.
  2. In the Create Shortcut Wizard, in the Type the location of the item box, type a quotation mark, enter the full path for the outlook.exe file, and then type another quotation mark. Alternatively, click Browse to locate and select the file. In this case, the quotation marks are supplied automatically.
  3. After the closing quotation mark, type a space, and then type the switch and any parameters. For example, you might type:
"c:\program files\microsoft office\office12\outlook.exe" /nopreview
 NOTE   If the parameter is a path to a location on your computer, it also must be enclosed in double quotation marks.
  1. Click Next.
  2. In the Type a name for this shortcut box, type a name for the shortcut, and then click Finish.
The wizard creates the shortcut on the desktop.
  1. Whenever you want to start Office Outlook 2007 in this particular customized way, double-click the shortcut.
 TIP   To add the desktop shortcut to the Windows Start menu, right-click the shortcut, and then click Pin to Start menu on the shortcut menu.
You can create a variety of shortcuts, each of which applies different switches and parameters to the program at startup.
 NOTES 
  • Switches are not case-sensitive. For example, /NOPREVIEW functions the same as /nopreview.
  • Remember to include one blank space before the switch and one before each parameter.

Available switches

SWITCHDESCRIPTION
/a
Creates an item with the specified file as an attachment.
Example:
  • "c:\program files\microsoft office\office12\outlook.exe" /a "c:\my documents\labels.doc"
If no item type is specified, IPM.Note is assumed. Cannot be used with message classes that are not based on Outlook.
/altvba otmfilenameOpens the VBA program specified in otmfilename, rather than %appdata%\microsoft\outlook\vbaproject.otm.
/c messageclass
Creates a new item of the specified message class (Outlook forms or any other valid MAPI form).
Examples:
  • /c ipm.activity creates a Journal entry
  • /c ipm.appointment creates an appointment
  • /c ipm.contact creates a contact
  • /c ipm.note creates an e-mail message
  • /c ipm.stickynote creates a note
  • /c ipm.task creates a task
/checkclientPrompts for the default manager of e-mail, news, and contacts.
/cleancategoriesDeletes any custom category names that you have created. Restores categories to the default names.
/cleanclientrulesStarts Outlook and deletes client-based rules.
/cleandmrecordsDeletes the logging records saved when a manager or a delegate declines a meeting.
/cleanfindersResets all Search Folders in the Microsoft Exchange mailbox for only the first profile opened.
/cleanfreebusyClears and regenerates free/busy information. This switch can be used only when you are able to connect to the server running Exchange.
/cleanprofileRemoves invalid profile keys and re-creates default registry keys where applicable.
/cleanremindersClears and regenerates reminders.
/cleanroamedprefsAll previous roamed preferences are deleted and copied again from the local settings on the computer where this switch is used. This includes the roaming settings for reminders, free/busy grid, working hours, calendar publishing, and RSS rules.
/cleanrulesStarts Outlook and deletes client-based and server-based rules.
/cleanserverrulesStarts Outlook and deletes server-based rules.
/cleansharingRemoves all RSS, Internet Calendar, and SharePoint subscriptions from Account Settings, but leaves all the previously downloaded content on your computer. This is useful if you are unable to delete one of these subscriptions within Office Outlook 2007.
/cleansniffOverrides the programmatic lockout that determines which of your computers (when running Outlook simultaneously) processes meeting items. The lockout process helps prevent duplicate reminder messages. This switch clears the lockout on the computer it is used, enabling Outlook to process meeting items.
/cleansubscriptionsDeletes the subscription messages and properties for subscription features.
/cleanviewsRestores default views. All custom views that you created are lost.
/embeddingUsed without command-line parameters for standard OLE co-create.
/f msgfilenameOpens the specified message file (.msg) or Microsoft Office saved search (.oss).
/finderOpens the Advanced Find dialog box.
/firstrunStarts Outlook as if it were run for the first time.
/hol holfilenameOpens the specified .hol file.
/ical icsfilenameOpens the specified .ics file.
/importprfprffilenameStarts Outlook and opens/imports the defined MAPI profile (*.prf). If Outlook is already open, queues the profile to be imported on the next clean start.
/launchtraininghelpassetidOpens a Help window with the Help topic specified in assetiddisplayed.
/m emailname
Provides a way for the user to add an e-mail name to the item. Only works in conjunction with the /c command-line parameter.
Example:
  • Outlook.exe /c ipm.note /m emailname
/nocustomizeStarts Outlook without loading outcmd.dat (customized toolbars).
/noextensionsStarts Outlook with extensions turned off, but listed in the Add-In Manager.
/nopreviewStarts Outlook with the Reading Pane off.
/p msgfilenamePrints the specified message (.msg).
/profile profilenameLoads the specified profile. If your profile name contains a space, enclose the profile name in quotation marks (" ").
/profilesOpens the Choose Profile dialog box regardless of the Optionssetting on the Tools menu.
/recycleStarts Outlook by using an existing Outlook window, if one exists. Used in combination with /explorer or /folder.
/remigratecategories
Starts Outlook and and initiates the following commands on the default mailbox:
  • Upgrades colored For Follow Up flags to Office Outlook 2007 color categories.
  • Upgrades calendar labels to Office Outlook 2007 color categories.
  • Adds all categories used on non-mail items into the Master Category List.
 NOTE   This is the same command as Upgrade to Color Categories in each Outlook mailbox properties dialog box.
/resetfoldersRestores missing folders at the default delivery location.
/resetfoldernames
Resets default folder names (such as Inbox or Sent Items) to default names in the current Office user interface language.
For example, if you first connect to your mailbox in Outlook by using a Russian user interface, the Russian default folder names cannot be renamed. To change the default folder names to another language, such as Japanese or English, you can use this switch to reset the default folder names after you change the user interface language or install a different language version of Outlook.
/resetformregionsEmpties the form regions cache and reloads the form region definitions from the Windows registry.
/resetnavpaneClears and regenerates the Navigation Pane for the current profile.
/resetsearchcriteriaResets all Instant Search criteria so that the default set of criteria is shown in each module.
/resetsharedfoldersRemoves all shared folders from the Navigation Pane.
/resettodobarClears and regenerates the To-Do Bar task list for the current profile. The To-Do Bar search folder is deleted and re-created.
/rpcdiagOpens Outlook and displays the remote procedure call (RPC) connection status dialog box.
/safeStarts Outlook without Microsoft Exchange Client Extensions (ECE), the Reading Pane, or toolbar customizations. Component Object Model (COM) add-ins are turned off.
/safe:1Starts Outlook with the Reading Pane off.
/safe:3Starts Outlook with Microsoft Exchange Client Extensions (ECE) turned off, but listed in the Add-In Manager. Component Object Model (COM) add-ins are turned off.
/safe:4Starts Outlook without loading outcmd.dat (customized toolbars).
/select foldernameStarts Outlook and opens the specified folder in a new window. For example, to open Outlook and display the default calendar, use: "c:\program files\microsoft office\office12\outlook.exe" /select outlook:calendar.
/share feed://URL/filename
/share stssync://URL
/share web://URL/filename
Specifies a sharing URL to connect to Outlook. For example, use stssync://URL to connect a Windows SharePoint Services 3.0 list to Outlook.
/sniffStarts Outlook, forces a detection of new meeting requests in theInbox, and then adds them to the calendar.
/t oftfilenameOpens the specified .oft file.
/v vcffilenameOpens the specified .vcf file.
/vcal vcsfilenameOpens the specified .vcs file.
/x xnkfilenameOpens the specified .xnk file.

Write protect for Pendrives


Steps to make your drive Write Protected:
1.    Open Registry Editor by typing regedit in Run dialog.
2.    Navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
3.    Find a sub key inside it named “StorageDevicePolicies”. If it does not exist there then we need to make it. Right click on “Control” key -> New -> Key. Name it “StorageDevicePolicies” without quotes.


http://techsalsa.com/wp-content/uploads/2008/10/write_protect_1-300x275.jpg
4.    Now right click on this newly created key and then click New -> DWORD value and name it as “WriteProtect”.



5.    Modify this key and give it a value 1.

6.    Click OK, and remember to restart the PC.
Now no more data can be transferred to the drive but to start using the drive again just give the “WriteProtect” key a value of 0 instead of 1 and restart the PC.

This seems to be the problem of most of us these days and some of our readers who wanted to know the methods how they can remove the Write Protected error from their USB drives like Pen Drives and memory cards.

What is Write Protected error and why it happens?
In the Write Protected error, we can’t write or copy any data in our flash drives and even can’t format the drive.
There are many reasons that cause this problem, let’s see solutions of them.
Solutions:
•    First of all try to locate a small switch (if any, that you may have not noticed) at some place on the drive or memory card reader. This is the prime reason for this error. If there is one, switch it to the other side to turn the protection off.
•    Yes I know this problem is also occurring these days without this switch but not to worry. Just download this helpful software from here and run it to execute a “low-level format” on the drive. This software is quite handy and may take few attempts to actually remove the error.
•    The problem can also be caused by some virus activity so just get it scanned by some updated good anti virus which may solve your problem.
•    BUT if none of the methods listed above solves your problem then your pen drive might have gone corrupted, so just get it replaced.
Hope any of the methods listed above solves your problem.
Update 1:
After the low level format, you may need to “Partition the drive“. Dont worry, partitioning a pen drive means allocating it its File System and Cluster Size that was lost after the Low Level Format.
For that:
  1. Run diskmgmt.msc in Run.
  2. In the disk management window, select the pen drive, right click on it and click on Format.
  3. Now choose the File System and Allocation Unit Size and do not check the boxes below.

Click OK and the drive will be reusable after this.
Update 2 (Better Solution):
Follow the steps in this post and just put the value 0 (zero) in step 5.
This will surely solve your problem now.
Update 3 (Solution Working):
Thanks to one of our readers Jim, who let us know about the tool called Neo 9, using which we can easily this write protection problem.
For transcend drive users, try the tool at this link, it has been found to work.
This solution has been found working for many users (see the comments below).


*****************************************************



1. Open Start Menu >> Run, type regedit and press Enter, this will open the registry editor.
2. Navigate to the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
Note: If the registry key StorageDevicePolicies key does not exist, you will need to create it
Download this batch file called add.bat from here, and double click after download the key will be automatically added to registry.

3. Double click the key WriteProtect in the right pane and set the value to 0 in the Value Data Box and press OK button

command here install in windows server


Through the Registry
  1. Navigate in your Registry to
HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell
and create a key called "Command Prompt" without the quotes.
  1. Set the default string to whatever text you want to appear in the right-click menu.
  2. Create a new key within your newly created command prompt named "command," and set the default string to
cmd.exe /k pushd %1
You may need to add %SystemRoot%\system32\ before the cmd.exe if the executable can't be found.
  1. The changes should take place immediately. Right click a folder and your new menu item should appear.

Bypass reboot in sqlserver 2008 installation


·  Start regedit.exe
·  Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
·  Locate PendingFileRenameOperations
·  Remove any data associated with the value (you may want to export the value for later review)
·  Reboot and rerun installation, check should pass

windows-server-2008-ftp-user-authentication




User Authentication
In our first article on FTP, I showed you how to install and then configure an anonymous public site. This allowed anyone to get the files located in those directories.
While this is great for a certain type of site, if you require greater security you can setup authentication for your FTP site. We are going to look at two types of user authentication, one using Windows users and another using IIS Manager authentications.

Windows Users FTP Authentication
This type of user authentication allows the FTP site to use the local Server user accounts/groups for access to the FTP site.
This example assumes you already have a user created for this purpose and given the account access to the FTP directory; we are using the account FTPUser.


1. Start by opening IIS Manager

2. Right click on Sites, and then click on Add FTP Site …


How to Setup User Authentication in FTP 7 on IIS 7.0 - 1

3. Fill in the site name and path to the directory that will hold the files. We are using WindowsFTPuser.com and C:\inetpub\privateftp for our example. Click Next when done.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 2
4. Choose an IP for this FTP site to use, and change the radio button to Allow SSL. Leave the rest of the setting alone for now.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 3
5. In this window we will specify what users are allowed access and Read/Write permissions will be assigned to those users.
Check the box next to Basic, set the dropdown to Specified users, under that type in the user name (in our case FTPUser), and check Read & Write. Click Next after you enter all the information.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 4
6. That ends the FTP site wizard, if you want to add or remove users after the initial setup, in the IIS Manager click on the site you want to manage and then click on FTP Authorization Rules.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 5
7. In this pane you can select to Add Allow Rule …, Add Deny Rule …, and Remove. This allows you to manage access to your ftp site through basic Windows authorization.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 6
With this configuration only those users assigned to the FTP site will be allowed access. Please note that you can also use Group permissions the same way.

IIS Manager Authentication
For a long time compared to *nix implementations of FTP, Windows was sorely lacking. One of the biggest hurdles was the fact that if you had site managers who wanted to give access to certain users there would have to be a corresponding account setup for them on the local server. Not the best situation from a security or administration standpoint.
With the release of FTP 7 and IIS 7 this has been corrected by the use of IIS 7 Management Service. In this example, I’m going to setup the service and apply the users to the domain we setup earlier.


1. We have to grant special permissions to the Network Service to be able to use this Service so open up a command prompt.
2. Type the following:
CACLS “%SystemDrive%\Windows\System32\inetsrv\config” /G “Network Service”:R /E
CACLS “%SystemDrive%\Windows\System32\inetsrv\config\administration.config” /G “Network Service”:R /E
CACLS “%SystemDrive%\Windows\System32\inetsrv\config\redirection.config” /G “Network Service”:R /E
Now we have to give rights to the Network Service to the root FTP folder, in our instance this is C:\inetpub\privateftp. When you run this command replace the directory with your own.
3. Open Command Prompt
4. Type the following:
CACLS “%SystemDrive%\inetpub\privateftp” /G “Network Service”:C /T /E
Next we need to install the IIS 7.0 management service on the server.
5. Open Server Manager
6. Open the Roles, find the Web Server (IIS) role, and click on Add Role Services.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 7
7. In the Select Role Services window scroll down till you find Management Service, if it is unchecked then place a check mark next to it and click Next.
If there are any required features that also need to be installed you will be prompted to install those also.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 8
8. Next you will have a summary screen of everything that is going to be installed, click Install to start the process.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 9
9. The next window will show you the progress of the installation process.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 10
10. Installation Results window will appear when the installation is finished, click on Close when done.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 11
11. Open IIS Manager
Select the server in IIS Manager; in our case, TSTEST, and scroll down in the center pane to Management Service and click on it.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 12
12. In the Management Service pane, look for the Identity Credentials box and select Windows credentials or IIS Manager credentials, then click Apply.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 13
13. In the connections pane select the server you are working on, and double click on IIS Manager Users.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 14
14. Click on Add User … in the Actions pane.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 15
15. Now you will create a user account that can be used, in our case I am going to add Gomer and enter a password for that user.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 16
16. You will now see that the user is created and you can do some limited administration in this panel for those users, including Disable User and Change Password.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 17
17. Now click the site you want to configure to use IIS 7 Manager Authentication in the connections pane, choose FTP Authentication in the center pane


How to Setup User Authentication in FTP 7 on IIS 7.0 - 18
18. Click on Custom Providers in the action pane.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 19
19. In the Custom Providers dialog window place a check next to IisManagerAuth, then click Ok.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 20
20. Now let’s add the user we created earlier by selecting the FTP site in the connections pane and then select IIS Manager Permissions in the center panel.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 21
21. Click on Allow User … in the Actions pane


How to Setup User Authentication in FTP 7 on IIS 7.0 - 22
22. The Allow User … dialog box now shows both types of users, Windows & IIS Manager. In our case we are going to click the Select … button.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 23
23. In the Users dialog select the user, (Gomer in our case) and click OK.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 24
24. Click Ok to continue and add the user to IIS Manager Permissions.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 25
25. Now we have to add an authorization rule, so let’s choose the site again in the connection pane, then FTP Authorization Rules, in the central pane.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 26
26. Select Add Allow Rule … in the actions pane.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 27
27. The Add Allow Authorization Rule dialog box is next, so select Specified users and type the users’ names in, separated by commas. Place a check next to either or both Read/Write permissions, and click OK.


How to Setup User Authentication in FTP 7 on IIS 7.0 - 28
We have now setup this site to use both types of users Windows and IIS Manager Users. You can use these in conjunction with each other or completely independent of the other — all depending on the needs of your organization.