Creating Outlook Profiles for RemoteApps

Posted by beakersoft | Posted in Enterprise | Posted on 15-08-2012

4

The Problem

Recently I have been involved in a project to roll out Microsoft RemoteApps, so users can launch applications on a terminal server via a website or shortcut. One of the issues we had was with a business application that was trying to send email out via Outlook.

The application was trying to open a new outlook email, but as outlook had never been launched before the application just hit an error as soon as it tried to send the email. I came across a few articles that pointed at adding a entry to the registry at HKCU\Software\Microsoft\Office\14.0\Outlook\Setup\ImportPRF that contains a path to a prf file. When you set this path when Outlook first opens it will use this entry to create the profile based on the settings in the PRF file.

The problem I had was because Outlook was not actually being opened by the user, then the profile was never created, so they got an error. So in order to get around this, I decided to write a VB script that would create a Outlook object then launch the application. I would then use this as the application path in RemoteApp Manager to start the application.

The Solution

This is the script I wrote to launch my application:

Set objRegistry = CreateObject("Wscript.shell")
objRegistry.RegWrite "HKCU\Software\Microsoft\Office\14.0\Outlook\Setup\ImportPRF", "\\server\share\settings.prf", "REG_SZ"

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objFolder = objNamespace.GetDefaultFolder(6)
objRegistry.Run "%SYSTEMDRIVE%\Progam Files\App1\App1.exe"

So, what is the script doing. First of all we create a shell object so we can write to the registry. Then we write the key to point at our prf file (obviously you need to change this to your relevant path, and if you are not running Outlook 2010 the reg path will be different).

Now we have that setting in the reg, we create an object pointing at Outlook. As we do this Outlook essentially ‘runs’ and sets its self up based on the info in the prf. We then just shell out to the application we want to run, and an Outlook profile should be available for the application to use!

Life without email

Posted by beakersoft | Posted in Enterprise | Posted on 25-09-2007

0

Due to the fact that a Dell engineer managed to corrupt our exchange database yesterday, we have been without email all day, and its not looking good for getting it back any time soon.

We have tried restoring from a backup but that appears to be corrupt as well as it wont mount, so we are running Eseutil in the fix mode. The database is about 60gig we set the fix running at about 10 this morning, and at 5:30 I dont think its finished yet. Then we have to run a defrag as well, so that’s going to take another 7 hours or so. People are going to be pissed.

It got me to thinking I might start to research collaboration software, it’s amazing how much of the Business has been effected by having no email. The amount of people that distribute documents, use shared calenders, plan meeting etc with Exchange means its no longer a case of email/exchange being classed as a non business critical system, witch we kind of do now.

Using something like sharepoint might be the way to go, that uses calenders, blogs, Wiki’s and file stores and is fully updatable by the users.

Problem is going to be weaning them off the Outlook/Exchange way of working.

I cant believe we pay these people

Posted by beakersoft | Posted in Enterprise | Posted on 24-09-2007

0

We have had a problem with our mail server losing disks, even after new ones have been put it. The disks just went to error as soon as we put them into the server, so we had a Dell engineer out to replace the backplane.

He turned up, replaced it and put a new disk in but the disk didn’t come up and start to re-build right away. Instead of thinking why it didn’t start to re-build the array onto it, he seamed to take a wild guess and click the online option. The disk then said it was re-initialising, witch didn’t seam right but he insisted it was. He then left.

We came to bring all the mail stores back online, and lo and behold we got tons of errors about checksums, invalid data etc, so we rang Dell tech support again. The bloke told my boss that he should not have on-lined the disk, as that just brings it straight into the raid5 array without putting the data on it first. There is a re-build option he should have used.

So, we are now going to have to blow the whole virtual disk away, and restore the data from this afternoon when we took a backup.

If i went round blowing peoples data away I would get sacked, so I hope the bloke who came on site and did this gets a good ass kicking!!

Auditors (why would you do that job)

Posted by beakersoft | Posted in Enterprise | Posted on 10-09-2007

0

Joy of joys, last week we had the auditors in, for 3 days no less. Now call me uneducated, but why would anyone want to do that job. One of them said to me (while looking for paperwork about a user account that never existed) that he ‘didn’t enjoy doing this’, problem was he had a big grin on his face when he said it. Hmmm, i’m sure he wasn’t lying at all.

The good thing was we had covered most of the things they wanted, so they started to get desperate (they aren’t doing there jobs if they cant find anything wrong). One of the ‘problems’ was apparently the windows on the server rooms were a security risk, we’re not sure why though. We found the best thing to do was to give them something small to get there teeth into and then leave them alone. The were chewing over ‘missing documentation’ for a small software version change for about 4 hours!

Because we knew they were coming, we tried to go round as many as the servers as we could and make sure they were fully service packed and patched. Just for a change, I managed to hit a couple of problems, this time it was with SQL reporting services not starting when I rebooted the server.

The first thing I noticed in the event log was a shed load of errors in the system log looking something like this:

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

{GUID-Numb}

to the user \mossService SID (S-1-5-21-). This security permission can be modified using the Component Services administrative tool.

I hunted the net, and this article solved this problem:
http://geekswithblogs.net/mhamilton/archive/2006/12/19/101568.aspx

After a doing as suggested in this article, the DCOM errors stopped, but the SQL reporting service still wouldn’t start, all i was getting was the usual ‘did not respond in a timely fashion’ type of error in the system log.

So another search led me to this article:
http://geekswithblogs.net/etiennetremblay/archive/2005/11/03/58989.aspx

Applying this reg key and rebooting then brought the service back to life. Reading more about this it seams that its just a timing issue. Why should applying a couple of patches cause a server without any problems to run its services up slower than it used to? Most of the things I found said this should only happen on slow servers, not after dodgy patches.