I've tried the code there and it seems to die right at the FUNCTION OUTLOOK() statement. I've updated the code to match our primary exchange server name and I have copied the outlook.prf file to the specified location on our server and in the %temp% directory as well.
I know there is probably something stupid I am missing since I'm a newbie with scripting just thought I'd check to see if anyone had any thoughts.
#192783 - 2009-03-1004:00 PMRe: Outlook Exchange Mailbox Add
[Re: aacajo]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
If you "Call Outlook.kix". you are simply loading the function into your script, you are not executing the function.
You need to either place the UDF into a file and Call "function.udf" early in your script to load it, or simply paste the function into your script directly.
THEN - you can call the function via "Outlook(arg, arg, arg..)" (if args are not needed, then simply call "Outlook()" directly.)
Glenn
_________________________ Actually I am a Rocket Scientist!
Ah guess I should have read his comments...to call function just use "outlook" in the script. I apologize. Feel free to delete this post based on my stupidity
I actually have ran in to another road block. When a user logs in on the computer the outlook needs to be prepaired by windows installer so the script hangs for a second. With that code found in the FAQ the outlook goes to the "Outlook 2003 Startup" screen without applying the PRF file. After I click cancel and log in and check the PRF file, I notice it has been changed...all that needs to happen is for the PRF file to be run to apply the settings.
Is there a way to change it so that the startup screen doesn't load up and it just applies the PRF file with no prompts? If you have any suggestions for a starting point that'd be appreciated. Thanks again!
The 11.0 part should be changed to fit your needs.
9.0 = Office/Outlook 2000 (could also be 09.0 not sure. I do not have Office2K anymore) 10.0 = Office/Outlook XP (2002) 11.0 = Office/Outlook 2003 12.0 = Office/Outlook 2007
[edit] Using Glenn's code below might be best to get the office/outlook version when you have several versions installed. [/edit]
Edited by Mart (2009-03-1005:47 PM) Edit Reason: Added a comment.
Thanks a bunch for the replies! Those functions will come in handy for sure especially if I'm removing values from the registry. We have a range of versions here as it is a very large company. We're trying to phase out 2000 but are mostly all on 2003 right now.
I've added the registry deletion of the first run and it removes it fine however the windows installer still runs. At the bottom of the Outlook() function he also specifies the removal of this key. He also adds the key to apply the file which it doesn't seem to be doing.
Also even when I run through the windows installer process and run the script again it still pops up with the Outlook 2003 Startup screen. It still doesn't seem to be applying the PRF file to Outlook.
#192813 - 2009-03-1109:49 AMRe: Outlook Exchange Mailbox Add
[Re: aacajo]
MartMart KiX Supporter
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
You cannot prevent the installer from running. This will happen the first time a user logs on.
We have just two registry writes to let outlook startup with a profile and skip the first run wizard. Al you need to do is create a default profile and change Path_goes_here to the actual path. In the default profile you can even use variables like %username%. It depends on your situation but it worked for me for several years now.
Awesome...it seems to work great now. He actually had those lines in his Outlook function. He had the path set to a variable declared at the top. I just changed the path to %temp%\outlook.prf for importing the prf file just to make sure it was going to the right place where he was sending the file in his copy.
Microsoft also mentions to remove the "FirstRun" from that same key. Which I added to the function.