Outlook.exe /Importprf only run once via logon script
Posted on 2014-03-24
I have Win7 users located in DomainB Active Directory who access their mailbox which is located in DomainA. The mailboxes are getting migrated onto an exchange server in DomainB. Therefore I needed to run the outlook.exe /importprf for the existing users to update the outlook profile (these are not users who haven't logged on before). I did this by using a small vbs script execute at user logon via Group Policy (user policy):
Dim objShell : Set objShell = CreateObject("Wscript.Shell")
strProgramPath = "Outlook.exe /importprf \\server.domain.local\share\new.prf"
This works really well & the user is then pointed to the mailbox on DomainB. My only problem is that this script runs on every user logon, but I only need this to run once for all the users.
Is anyone aware of the syntax I need to add into my script so that this updates the FirstRun / First-Run reg key so that it won't run again after initial execution?
Sorry - I'm not a scripter so you may have to tell me the actual lines I need to add.