I have looked around, trying to improve my auto-configuration for a new roaming profile in our Citrix-environment.

The auto-generation of the primary account to our exchange-server works perfect.

However: a few users need to set up an additional mailbox (or two).

I have "snapped" some code from one of the forums, and moderated it into norwegian, putting in some check in my primary script so that the right users run this script.

The script for this code is called by the call-command in kix.

Break on 

$hklms = 'HKEY_LOCAL_MACHINE\Software'
$exe=ReadValue($hklms+"\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE","")
Shell($exe) ; -- Start Outlook
 Sleep 5

SetFocus ("Microsoft Outlook")
Sleep 1
Sleep 1
$=SendKeys ("~V")
$=SendKeys ("n")

When Outlook already is open, this works perfectly, allthough it opens another window with outlook. This I can live with. But when I'm trying with my logon-script, it just freezes, nothing happens, exept outlook opens, and then the scripts doesn't work any more.

Have tried different ways to solve this, but not getting any further. Can somebody show me the light?

Regards /J
I was placed on earth to do a job. Right now I have so much to do, I will never die..