|
Home > Archive > FoxPro Setup > April 2005 > Deternining path to user desktop?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Deternining path to user desktop?
|
|
|
| I know there must be an easy answer to this, but I can't find it. How can I
determine the path to the current Windows user desktop? For instance, if I
want to put a file on a user's desktop programatically (in a .PRG), is there
a way to get a path to the current user's desktop without knowing and going
through the full path c:\documents and settings\<user>\etc.
Seth
| |
| Rick Bean 2005-04-07, 8:05 pm |
| Seth,
Using WSH, it can be as simple as:
oShell =3D CREATEOBJECT('WScrip
t.Shell')
lcdesktop =3D oShell. SpecialFolders('Desk
top')
If you need to use an API call, I'll look that up. (I have it somewhere! =
<g> )
Rick
"Seth" <seth@equimax.com> wrote in message =
news:%23fQ7BlzHFHA.3472@TK2MSFTNGP09.phx.gbl...
>I know there must be an easy answer to this, but I can't find it. How =
can I
> determine the path to the current Windows user desktop? For instance, =
if I
> want to put a file on a user's desktop programatically (in a .PRG), is =
there
> a way to get a path to the current user's desktop without knowing and =
going
> through the full path c:\documents and settings\<user>\etc.
>=20
> Seth
>=20
>
| |
| Mike Pratt 2005-04-07, 8:05 pm |
| Hi Seth,
GETENV("USERPROFILE") + "\DESKTOP"
Regards,
Mike
On Wed, 2 Mar 2005 09:04:46 -0600, "Seth" <seth@equimax.com> wrote:
>I know there must be an easy answer to this, but I can't find it. How can I
>determine the path to the current Windows user desktop? For instance, if I
>want to put a file on a user's desktop programatically (in a .PRG), is there
>a way to get a path to the current user's desktop without knowing and going
>through the full path c:\documents and settings\<user>\etc.
>
>Seth
>
| |
|
| Thanks Mike. That's even cleaner. I'll give it a whirl.
Seth
"Mike Pratt" <mspratt@losethis.xmission.com> wrote in message
news:4227e680.3144020@207.46.248.16...
> Hi Seth,
>
> GETENV("USERPROFILE") + "\DESKTOP"
>
> Regards,
>
> Mike
>
> On Wed, 2 Mar 2005 09:04:46 -0600, "Seth" <seth@equimax.com> wrote:
>
I[color=darkred]
I[color=darkred]
there[color=darkred]
going[color=darkred]
>
| |
|
| Thanks Rick. A little more to it than I thought, but very clean.
Seth
"Rick Bean" < rgbean@unrealmelange
-inc.com> wrote in message
news:OLsTIxzHFHA.2700@TK2MSFTNGP09.phx.gbl...
Seth,
Using WSH, it can be as simple as:
oShell = CREATEOBJECT('WScrip
t.Shell')
lcdesktop = oShell. SpecialFolders('Desk
top')
If you need to use an API call, I'll look that up. (I have it somewhere!
<g> )
Rick
"Seth" <seth@equimax.com> wrote in message
news:%23fQ7BlzHFHA.3472@TK2MSFTNGP09.phx.gbl...
>I know there must be an easy answer to this, but I can't find it. How can I
> determine the path to the current Windows user desktop? For instance, if
I
> want to put a file on a user's desktop programatically (in a .PRG), is
there
> a way to get a path to the current user's desktop without knowing and
going
> through the full path c:\documents and settings\<user>\etc.
>
> Seth
>
>
|
|
|
|
|