Script to run Outlooke.exe /importnk2

Posted on 2011-10-11
Last Modified: 2012-05-12
We recently upgraded our version of Office to 2010.  I need to write a script that my end users can click on to import the nk2 files into the new Outlook 2010 format.

The reason for a script is we are in a Xenapp environment and I don't want my users to have to access a command prompt on their own.
Question by:tolsonkra
    LVL 9

    Accepted Solution

    Would something like this do you? Straight forward enough - I haven't tried it in a server environment, but appears fine on a Windows 7 PC.

    set objShell = CreateObject ("WScript.Shell")
    objShell.Run "outlook /importNK2"

    Open in new window

    Just save it as a VBS and create the relevant shortcut!

    Hopefully this helps!
    LVL 3

    Author Comment

    My office is located at D:\Program Files (x86)\Microsoft Office\Office14

    How do I make the script know that.

    Sorry I am not great at scripting.

    Right now when I run the above cmd I get a run window open.
    LVL 3

    Author Closing Comment

    I didn't realize I needed to put the vbs in each Office directory on each server.  But once I did that it worked like a charm thanks.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now