Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Script to Open and Close Outlook

Status
Not open for further replies.

erinallen

Programmer
May 13, 2002
66
US
I need to setup a user's profile in Outlook on a terminal server. We are using the prf method to do this, but when this script runs:

set oExec= oShell.Exec(strOutlook & "/importprf Outlook2003CitrixProfile.PRF")

oExec.Terminate

it opens outlook and then I try to terminate. The problem is the termination is happening before Outlook is completely open. Is there anyway t ohave the exec wait until it is completely loaded before running the next step?
 
You really won't be able to determine if it is still "busy" but you can use WSCRIPT.SLEEP to introduce a delay before the script proceeds to the next command.

wscript.sleep 3000 will give you a 3 second delay. 5000 is 5 seconds. You get the idea.

I hope you find this post helpful.

Regards,

Mark
 
You don't need to run the outlook client to apply a PRF. use modprof from the ODK, or one of its predecessors, newprof or profgen.

 
Unfortunately, the modprof and other tools don't work with Outlook 2003.
 
The Office Profile Wizard/Customization Wisard combination from ORK 2003. All of these tools use a PRF file to create or update an outlook profile.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top