Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

outlook 2010 .nk2 or rename script

Posted on 2011-09-13
3
957 Views
Last Modified: 2012-05-12
So i found the following information added as code saying about nk2 files not existing anymore, bla bla bla.  Fine.

Now my task was to backup our users .nk2 file on logoff and restore on login. We don't use roaming profiles and will not. But I was hoping to make outlook act like it was roaming, at least the contacts dropdown.  Now if this was still using .nk2 files it would be easy.

But now with random GUID's in the filename, how can I do this.  When a user logs onto anther PC with outlook, the file is created but with a diffrent filename. So i can't just replace the DAT file.


Any idea's or can someone write a script to find the current name and then copy/rename the backup file as that name. I guess thats the answer..
The Outlook 2003/2007 default NK2 file location is the same in Windows 7 x64 and x86 -- C:\Users\{username}\AppData\Roaming\Microsoft\Outlook\zzzzzzz.NK2 (z = Outlook profile name). This also applies to Vista and Server 2008.
 
The Outlook 2010 NK2 file is actually a DAT file and is located, on the above operating systems, at C:\Users\{username}\AppData\Local\Microsoft\Outlook\RoamCache\Stream_Autocomplete_y_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dat (y = file index, x = random 16-byte key in hex form).
 
 
 
If you haven't unchecked 'Hide extensions for known file types' under Tools > Folder Options > View, then the file will just be called "Outlook" or "Default" (whatever your Outlook profile is named), instead of Outlook.NK2 or Default.NK2. Also, Windows 7 classifies it as an "Office Data File" in the 'Type' column.
 
If this file is not present, Outlook will create a new one when you open the program. Hope this helps!

Open in new window

0
Comment
Question by:myhc
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
tharstern earned 500 total points
ID: 36533252
The nk2 file gets imported once in Outlook 2010, then is always there for that user, no matter where they log on from, as it is stored in their mailbox in exchange.



0
 
LVL 7

Author Comment

by:myhc
ID: 36534857
tharstern,

Thank you for that information. I have tested and you are kinda correct. Just a little note, If you are running an Exchange 2003 server the data is not imported into the server.

Only when running Exchange 2010 or older i guess (might work with exchange 2007 but we missed this version)

We are moving from 2003 -> 2010 so we can wait.

Thanks for saving me some time...
0
 
LVL 7

Author Closing Comment

by:myhc
ID: 36534859
Exchange 2010 and above
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
Read this checklist to learn more about the 15 things you should never include in an email signature.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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