Re: Determine programmatically whether or not an email client is installed

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Mar 24, 2:19 pm, Dan Mitchell <djmitche...@xxxxxxxxx> wrote:
dpier...@xxxxxxxxxx wrote innews:c1ca6b7c-bde4-4ada-a07e-3531468af3cc@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

What I'm banking on is that in the hosted environment, I can control
the mere presence of anything under the HKLM\SOFTWARE\Clients\Mail
registry key. In systems I don't control, it becomes a tech support
call on the (hopefully) rare occasions where a user invokes the email
feature without having first set up their client.

[and in a previous message]:

Since, in the case of a hosted environment, I control the OS, my
thought is to just clear out the HKLM\SOFTWARE\Clients\Mail key and
then have the software check that. If there is no client, the user
gets no email. If the software is deployed in a client-server
environment, the software is running on the client machine and, so, I'm
OK with kicking off the wizard if that's what happens.

Okay, that all makes sense. That said -- if you own the OS in the
hosted environment, and you know that in the hosted environment there's
no way to mail out, couldn't you just bypass the Clients\Mail key
entirely?

Rather than having the setup clear out Clients\Mail, add a new registry
entry somewhere called DontUseMailItsInAHostedEnvironment, and use
_that_ key to disable mail in your app.

I've considered that. We have a big "push" to reduce the amount of
configuration needed to set up the product. So if we're installing
into an environment we don't control, we want it to "just work".
That's why I've been looking for ways to detect the environment at the
OS level rather than introducing my own hooks.

I'm not sure if that is or isn't tidier, but it seems like a more
'direct' solution. (alternative 2: see if there's any other way to
detect running in the hosted environment, and use that to disable things
-- some sort of, say, GetAmIRunningInVMWare() call or whatever).

CW in our shop is that we try to avoid coding to special flags like
"AmIInHostedEnvironment". We may get there eventually but, for now,
mine is the only situation that has come up so I'm being "encouraged"
to find other means.

Secondary bonus: if there's any other thing you want to do differently
in the hosted environment, you have a way to change those things.

-- dan

Thanks again. Your comments are really helping me to solidify my
understanding of the problem and possible solutions.
dp
.



Relevant Pages