Hi all:
I've got a question regarding retrieving a value from the Registry
within Vista that I hope someone here can help me answer.
Here's the situation. I've got an existing application that has been
working just fine under Windows XP Pro. At application startup, it queries
the Registry to retrieve the following key value:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon
User Name
This value is then used to check in a Security table for a match on the
name. (Yes, I know this is an odd logon situation; it's what the client
wanted.)
The thing is, now they're looking to move to Vista. And, for some
reason, this key value does not exist in Vista.
Can someone point me to a reference of registry keys for Vista? Or can
someone recommend to me a key value I could use that would return the Logon
User Name? Unfortunately, I don't have direct access to Vista, so I can't
just open up the Registry and browse around to find the appropriate key.
Any help you can send my way will be greatly appreciated.
Jon
Author: Jon Westcot
Posted: 2009-02-25 12:36:35 Link
Hi Dave:
Yes, the application is running on a network. I'll look into using
Sys(0) and see if that solves the problem. I'll let you -- and the list --
know either way.
Jon
----- Original Message -----
From: "Dave Crozier"
To: <profoxtech@leafe.com>
Sent: Wednesday, February 25, 2009 10:41 AM
Subject: RE: Question on Registry in Vista vs Windows XP
> John,
> Why not simply use Sys(0) that gives you the machine name and the Login
name
> and it is version independent.
>
> I assume you are running on a network.
>
> Dave Crozier
>
>
> -----Original Message-----
> From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf
> Of Jon Westcot
> Sent: 25 February 2009 16:45
> To: ProFox
> Subject: Question on Registry in Vista vs Windows XP
>
> Hi all:
>
> I've got a question regarding retrieving a value from the Registry
> within Vista that I hope someone here can help me answer.
>
> Here's the situation. I've got an existing application that has been
> working just fine under Windows XP Pro. At application startup, it
queries
> the Registry to retrieve the following key value:
>
>
> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon
> User Name
>
> This value is then used to check in a Security table for a match on
the
> name. (Yes, I know this is an odd logon situation; it's what the client
> wanted.)
>
> The thing is, now they're looking to move to Vista. And, for some
> reason, this key value does not exist in Vista.
>
> Can someone point me to a reference of registry keys for Vista? Or
can
> someone recommend to me a key value I could use that would return the
Logon
> User Name? Unfortunately, I don't have direct access to Vista, so I can't
> just open up the Registry and browse around to find the appropriate key.
>
> Any help you can send my way will be greatly appreciated.
>
> Jon
Author: Dave Crozier
Posted: 2009-02-25 12:41:35 Link
John,
Why not simply use Sys(0) that gives you the machine name and the Login name
and it is version independent.
I assume you are running on a network.
Dave Crozier
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf
Of Jon Westcot
Sent: 25 February 2009 16:45
To: ProFox
Subject: Question on Registry in Vista vs Windows XP
Hi all:
I've got a question regarding retrieving a value from the Registry
within Vista that I hope someone here can help me answer.
Here's the situation. I've got an existing application that has been
working just fine under Windows XP Pro. At application startup, it queries
the Registry to retrieve the following key value:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon
User Name
This value is then used to check in a Security table for a match on the
name. (Yes, I know this is an odd logon situation; it's what the client
wanted.)
The thing is, now they're looking to move to Vista. And, for some
reason, this key value does not exist in Vista.
Can someone point me to a reference of registry keys for Vista? Or can
someone recommend to me a key value I could use that would return the Logon
User Name? Unfortunately, I don't have direct access to Vista, so I can't
just open up the Registry and browse around to find the appropriate key.
Any help you can send my way will be greatly appreciated.
Jon
[excessive quoting removed by server]
Author: Tracy Pearson
Posted: 2009-02-25 13:25:18 Link
It might be this:
HKEY_CURRENT_USER\Volatile Environment\UserName
I searched the registry for things, I do not have a reference to say this is
what you are looking for.
As Dave said, SYS(0) or a complicated API call might be what you are looking
for.
GetEnv("UserName") can be dinked with.
When you start VFP with Run As... who the application is running as from
SYS(0), API, and direct Registry read are all the same.
Tracy
-----Original Message-----
From: Jon Westcot
Sent: Wednesday, February 25, 2009 11:45 AM
Hi all:
I've got a question regarding retrieving a value from the Registry
within Vista that I hope someone here can help me answer.
Here's the situation. I've got an existing application that has been
working just fine under Windows XP Pro. At application startup, it queries
the Registry to retrieve the following key value:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon
User Name
This value is then used to check in a Security table for a match on the
name. (Yes, I know this is an odd logon situation; it's what the client
wanted.)
The thing is, now they're looking to move to Vista. And, for some
reason, this key value does not exist in Vista.
Can someone point me to a reference of registry keys for Vista? Or can
someone recommend to me a key value I could use that would return the Logon
User Name? Unfortunately, I don't have direct access to Vista, so I can't
just open up the Registry and browse around to find the appropriate key.
Any help you can send my way will be greatly appreciated.
Jon
Author: Jon Westcot
Posted: 2009-02-25 14:33:55 Link
Hi Dave, Tracy, et al.:
Thanks for the suggestions. It seems that SYS(0) works like a champ.
HOWEVER....
Now I'm being asked to apparently "sign" the executable to avoid having
Vista ask if they really want to run the application. The user sent me the
following comment:
~~~~~~~~~~~~~~~~~
windows prompts me to run the software because of it being an unknown
publisher, but I think that is an easy fix? Can you change?
~~~~~~~~~~~~~~~~~
Well, I could, if I knew how to do this. Or even what to do to create
such a signature or certificate. Can someone enlighten me? This is
essentially an in-house application; I just happen to be maintaining it from
1800 or so miles away. ;)
Thanks for any help any of you can share. (Oh, I tried to search for
this on the ProFox search website but, without knowing exactly what it was I
was trying to find, I was having a lot of trouble finding anything useful
that wasn't talking about SSL Certificates for web pages.)
Jon
----- Original Message -----
From: "Tracy Pearson" <tracy@powerchurch.com>
To: <profoxtech@leafe.com>
Sent: Wednesday, February 25, 2009 11:25 AM
Subject: RE: Question on Registry in Vista vs Windows XP
> It might be this:
> HKEY_CURRENT_USER\Volatile Environment\UserName
>
> I searched the registry for things, I do not have a reference to say this
is
> what you are looking for.
>
> As Dave said, SYS(0) or a complicated API call might be what you are
looking
> for.
>
> GetEnv("UserName") can be dinked with.
>
> When you start VFP with Run As... who the application is running as from
> SYS(0), API, and direct Registry read are all the same.
>
> Tracy
>
> -----Original Message-----
> From: Jon Westcot
> Sent: Wednesday, February 25, 2009 11:45 AM
>
> Hi all:
>
> I've got a question regarding retrieving a value from the Registry
> within Vista that I hope someone here can help me answer.
>
> Here's the situation. I've got an existing application that has been
> working just fine under Windows XP Pro. At application startup, it
queries
> the Registry to retrieve the following key value:
>
>
> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon
> User Name
>
> This value is then used to check in a Security table for a match on
the
> name. (Yes, I know this is an odd logon situation; it's what the client
> wanted.)
>
> The thing is, now they're looking to move to Vista. And, for some
> reason, this key value does not exist in Vista.
>
> Can someone point me to a reference of registry keys for Vista? Or
can
> someone recommend to me a key value I could use that would return the
Logon
> User Name? Unfortunately, I don't have direct access to Vista, so I can't
> just open up the Registry and browse around to find the appropriate key.
>
> Any help you can send my way will be greatly appreciated.
>
> Jon
>
>
>
>
[excessive quoting removed by server]
Author: MB Software Solutions General Account
Posted: 2009-02-25 15:07:54 Link
On Wed, February 25, 2009 1:25 pm, Tracy Pearson wrote:
> It might be this:
> HKEY_CURRENT_USER\Volatile Environment\UserName
>
>
> I searched the registry for things, I do not have a reference to say this
> is what you are looking for.
>
> As Dave said, SYS(0) or a complicated API call might be what you are
> looking for.
>
> GetEnv("UserName") can be dinked with.
>
>
> When you start VFP with Run As... who the application is running as from
> SYS(0), API, and direct Registry read are all the same.
In that case, why *wouldn't* you use SYS(0)?
Author: Tracy Pearson
Posted: 2009-02-25 15:09:44 Link
You're welcome,
If it's in house, they can change the setting on the EXE from a Right Click
of the EXE directly. They should see at the bottom of the General tab:
Security: This file came from another computer and might be blocked to help
protect this computer.
With an Unblock button next to it.
If the EXE resides on the server and runs on the workstation, the server
needs to be added to trusted sites. Trusted sites can be added in the IE 7
Options dialog.
Digital Signatures cost money, and require an internet connection to verify
it.
-----Original Message-----
From: Jon Westcot
Sent: Wednesday, February 25, 2009 2:34 PM
Hi Dave, Tracy, et al.:
Thanks for the suggestions. It seems that SYS(0) works like a champ.
HOWEVER....
Now I'm being asked to apparently "sign" the executable to avoid having
Vista ask if they really want to run the application. The user sent me the
following comment:
~~~~~~~~~~~~~~~~~
windows prompts me to run the software because of it being an unknown
publisher, but I think that is an easy fix? Can you change?
~~~~~~~~~~~~~~~~~
Well, I could, if I knew how to do this. Or even what to do to create
such a signature or certificate. Can someone enlighten me? This is
essentially an in-house application; I just happen to be maintaining it from
1800 or so miles away. ;)
Thanks for any help any of you can share. (Oh, I tried to search for
this on the ProFox search website but, without knowing exactly what it was I
was trying to find, I was having a lot of trouble finding anything useful
that wasn't talking about SSL Certificates for web pages.)
Jon
Author: Dave Crozier
Posted: 2009-02-25 15:15:54 Link
Jon,
When you run the application from the local "C" drive, it is treated as 1
security zone.
However , wn you run it via a UNC (or any other external location) on the
network it is a different, untrusted security zone.
To fix this, open the IE settings from Tools, Internet Options. On the
Security tab select Local Internet and click Sites. Clear the checkbox for
"Automatically detect intranet" and check the other 3 boxes. Click the
Advanced button on that same dialog box and add file://ServerName to the
list of trusted sites.
Clear the checkbox to "Require server verification (https) for all sites in
this zone".
Dave Crozier
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf
Of Jon Westcot
Sent: 25 February 2009 19:34
To: profox@leafe.com
Subject: Re: Question on Registry in Vista vs Windows XP
Hi Dave, Tracy, et al.:
Thanks for the suggestions. It seems that SYS(0) works like a champ.
HOWEVER....
Now I'm being asked to apparently "sign" the executable to avoid having
Vista ask if they really want to run the application. The user sent me the
following comment:
~~~~~~~~~~~~~~~~~
windows prompts me to run the software because of it being an unknown
publisher, but I think that is an easy fix? Can you change?
~~~~~~~~~~~~~~~~~
Well, I could, if I knew how to do this. Or even what to do to create
such a signature or certificate. Can someone enlighten me? This is
essentially an in-house application; I just happen to be maintaining it from
1800 or so miles away. ;)
Thanks for any help any of you can share. (Oh, I tried to search for
this on the ProFox search website but, without knowing exactly what it was I
was trying to find, I was having a lot of trouble finding anything useful
that wasn't talking about SSL Certificates for web pages.)
Jon
----- Original Message -----
From: "Tracy Pearson" <tracy@powerchurch.com>
To: <profoxtech@leafe.com>
Sent: Wednesday, February 25, 2009 11:25 AM
Subject: RE: Question on Registry in Vista vs Windows XP
> It might be this:
> HKEY_CURRENT_USER\Volatile Environment\UserName
>
> I searched the registry for things, I do not have a reference to say this
is
> what you are looking for.
>
> As Dave said, SYS(0) or a complicated API call might be what you are
looking
> for.
>
> GetEnv("UserName") can be dinked with.
>
> When you start VFP with Run As... who the application is running as from
> SYS(0), API, and direct Registry read are all the same.
>
> Tracy
>
> -----Original Message-----
> From: Jon Westcot
> Sent: Wednesday, February 25, 2009 11:45 AM
>
> Hi all:
>
> I've got a question regarding retrieving a value from the Registry
> within Vista that I hope someone here can help me answer.
>
> Here's the situation. I've got an existing application that has been
> working just fine under Windows XP Pro. At application startup, it
queries
> the Registry to retrieve the following key value:
>
>
> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Logon
> User Name
>
> This value is then used to check in a Security table for a match on
the
> name. (Yes, I know this is an odd logon situation; it's what the client
> wanted.)
>
> The thing is, now they're looking to move to Vista. And, for some
> reason, this key value does not exist in Vista.
>
> Can someone point me to a reference of registry keys for Vista? Or
can
> someone recommend to me a key value I could use that would return the
Logon
> User Name? Unfortunately, I don't have direct access to Vista, so I can't
> just open up the Registry and browse around to find the appropriate key.
>
> Any help you can send my way will be greatly appreciated.
>
> Jon
>
>
>
>
[excessive quoting removed by server]
Author: MB Software Solutions General Account
Posted: 2009-02-25 15:54:49 Link
On Wed, February 25, 2009 2:33 pm, Jon Westcot wrote:
> Hi Dave, Tracy, et al.:
>
>
> Thanks for the suggestions. It seems that SYS(0) works like a champ.
>
>
> HOWEVER....
>
>
> Now I'm being asked to apparently "sign" the executable to avoid having
> Vista ask if they really want to run the application. The user sent me
> the following comment:
>
> ~~~~~~~~~~~~~~~~~
> windows prompts me to run the software because of it being an unknown
> publisher, but I think that is an easy fix? Can you change?
> ~~~~~~~~~~~~~~~~~
>
>
> Well, I could, if I knew how to do this. Or even what to do to create
> such a signature or certificate. Can someone enlighten me? This is
> essentially an in-house application; I just happen to be maintaining it
> from 1800 or so miles away. ;)
>
>
> Thanks for any help any of you can share. (Oh, I tried to search for
> this on the ProFox search website but, without knowing exactly what it was
> I
> was trying to find, I was having a lot of trouble finding anything useful
> that wasn't talking about SSL Certificates for web pages.)
Tell them to just ignore that and proceed. That is the EASIEST and
CHEAPEST solution. To go the route of getting it "signed" is expensive
and not worth it, imo, if I understand the process.
Author: Matt Jarvis
Posted: 2009-02-25 15:59:18 Link
> -----Original Message-----
> From: profoxtech-bounces@leafe.com
[mailto:profoxtech-bounces@leafe.com]
> On Behalf Of MB Software Solutions General Account
> Sent: Wednesday, February 25, 2009 12:55 PM
> To: profoxtech@leafe.com
> Subject: Re: Question on Registry in Vista vs Windows XP
>
> Tell them to just ignore that and proceed. That is the EASIEST and
> CHEAPEST solution. To go the route of getting it "signed" is
expensive
> and not worth it, imo, if I understand the process.
Agreed.... having a digi sig means it needs to be on EVERY machine that
will use the app, EVERY time you have to refresh from an image (and
forget about the digi sign), and a hassle.... plus the digi sig expires
and you get to do it all over again..........
At least that's been my experience...
Matt Jarvis
Programmer/DBA
King | Retail Solutions
Electronic Privacy Notice. This e-mail, and any attachments, contains inf=
ormation that is, or may be, covered by electronic communications privacy l=
aws, and is also confidential and proprietary in nature. If you are not the=
intended recipient, please be advised that you are legally prohibited from=
retaining, using, copying, distributing, or otherwise disclosing this info=
rmation in any manner. Instead, please reply to the sender that you have re=
ceived this communication in error, and then immediately delete it. Thank y=
ou in advance for your cooperation.