Click to See Complete Forum and Search --> : Creating an Outlook 97 User profile programmaticly


tcompe
February 29th, 2000, 04:11 PM
Can someone tell me how I could go about creating a Outlook User profile on a machine that has had Outlook just installed.

My objective is to place code in a vb logon script which would detected if a users has had outlook installed and indicate whether or not the Outlook user profile has been setup. I understand how to check for the existence of Outlook what I am looking for is what MAPI's are being called so that I can create the users profile programmaticly???


Any suggestions would be greatly appreciated

tcompe

Kyle Burns
March 1st, 2000, 09:42 AM
Outlook profiles are set up in .prf files. The default profile is <<windows directory>>\outlook.prf. A possible solution for you would be have your code write a new .prf file based on the logon user information (use WNetGetUserA, but this will only work if Exchange mailbox names are the same as the user's name) and then shell out to NEWPROF.EXE (use the -P and -X switches). To see how the .prf needs to be written, view Outlook.prf in notepad.

tcompe
March 1st, 2000, 09:51 AM
Thats what I ended up doing... It works just fine although, I was just trying to do it via API's rather than shelling out to NEWPROF.EXE

Oh Well... this way works too.

Thanks
tcompe