Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to get Desktop path of the current user

12 posts in Powerscript Last posting was on 2009-11-30 06:52:12.0Z
Ranjith Posted on 2009-11-12 06:41:19.0Z
From: Ranjith <ranjithpremkumar@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: How to get Desktop path of the current user
Date: Wed, 11 Nov 2009 22:41:19 -0800 (PST)
Organization: http://groups.google.com
Lines: 8
Message-ID: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com>
NNTP-Posting-Host: 86.96.160.7
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1258008079 8740 127.0.0.1 (12 Nov 2009 06:41:19 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 12 Nov 2009 06:41:19 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 2g2000prl.googlegroups.com; posting-host=86.96.160.7; posting-account=R53KSgoAAAAuXOIrb-Y2IAsg9cqvv8jN
User-Agent: G2/1.0
X-HTTP-Via: 1.1 ISA
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; AskTB5.5),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!newsfeed.news2me.com!nx01.iad01.newshosting.com!newshosting.com!216.196.98.140.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!2g2000prl.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27157
Article PK: 793595

Hello,

Is there any API call by which I will able to get current user desktop
path. Thanks in advance for any help.

Regards,

Ranjith T


Chris Pollach Posted on 2009-11-12 14:26:10.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com>
Subject: Re: How to get Desktop path of the current user
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4afc1b02$1@forums-1-dub>
Date: 12 Nov 2009 06:26:10 -0800
X-Trace: forums-1-dub 1258035970 10.22.241.152 (12 Nov 2009 06:26:10 -0800)
X-Original-Trace: 12 Nov 2009 06:26:10 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27163
Article PK: 761744

Hi Ranjith;

Just use PB's built-in GetContextXxxxx ( ) methods.

For example:

String ls_keyword, ls_values []
ContextKeyword lcx_key

this.GetContextService ("ContextKeyword", lcx_key)
ls_keyword = "path"
lcx_key.GetContextKeywords (ls_keyword, ls_values)
MessageBox (ls_keyword, ls_values[1])


HTH

--
Regards ... Chris
ISUG - NA RUG Director
Blog: http://chrispollach.pbdjmagazine.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Ranjith" <ranjithpremkumar@gmail.com> wrote in message
news:c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com...
> Hello,
>
> Is there any API call by which I will able to get current user desktop
> path. Thanks in advance for any help.
>
> Regards,
>
> Ranjith T


Bruce Armstrong Posted on 2009-11-13 01:48:24.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How to get Desktop path of the current user
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <sdepf5luc5igmljkhi7hnpee7l9f8lg365@4ax.com>
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com> <4afc1b02$1@forums-1-dub>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 12 Nov 2009 17:48:24 -0800
X-Trace: forums-1-dub 1258076904 10.22.241.152 (12 Nov 2009 17:48:24 -0800)
X-Original-Trace: 12 Nov 2009 17:48:24 -0800, vip152.sybase.com
Lines: 46
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27166
Article PK: 761743

That would work for the system path. I think the OP was asking about
the desktop.

If that is the case, I'd recommend the SHGetFolderPath function

http://msdn.microsoft.com/en-us/library/bb762181%28VS.85%29.aspx

I haven't specifically tried CSIDL_DESKTOP with that, but I don't see
why it wouldn't work. CSIDL_PERSONAL is supposed to work, and that's
a subdirectory of CSIDL_DESKTOP.

This seems it indicate that it does work for Desktop:

http://www.tek-tips.com/faqs.cfm?fid=4264


On 12 Nov 2009 06:26:10 -0800, "Chris Pollach"

<cpollach@travel-net.com> wrote:

>Hi Ranjith;
>
> Just use PB's built-in GetContextXxxxx ( ) methods.
>
>For example:
>
>String ls_keyword, ls_values []
>ContextKeyword lcx_key
>
>this.GetContextService ("ContextKeyword", lcx_key)
>ls_keyword = "path"
>lcx_key.GetContextKeywords (ls_keyword, ls_values)
>MessageBox (ls_keyword, ls_values[1])
>
>
>HTH

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


Chris Pollach Posted on 2009-11-13 15:17:03.0Z
From: "Chris Pollach" <cpollach@travel-net.com>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com> <4afc1b02$1@forums-1-dub> <sdepf5luc5igmljkhi7hnpee7l9f8lg365@4ax.com>
Subject: Re: How to get Desktop path of the current user
Lines: 240
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4afd786f$1@forums-1-dub>
Date: 13 Nov 2009 07:17:03 -0800
X-Trace: forums-1-dub 1258125423 10.22.241.152 (13 Nov 2009 07:17:03 -0800)
X-Original-Trace: 13 Nov 2009 07:17:03 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27167
Article PK: 761742

Hi Bruce;


Yes, thanks for the refinement - I missed that.

However the code I use is basically the same (just change the keyword) ....

String ls_keyword, ls_values [], ls_desktop
ContextKeyword lcx_key

GetContextService ("ContextKeyword", lcx_key)
ls_keyword = "UserProfile" // <=
note
lcx_key.GetContextKeywords (ls_keyword, ls_values)
String ls_keyword, ls_values []
ContextKeyword lcx_key
ls_desktop = ls_values[1] + "\desktop" // New


Note: Using the keyword "UserProfile" plus concatenating the value "desktop"
to the retrieved path should get you to the actual desktop folder and
contents. I use this on W2K through to W 7 and it works perfectly (see
attached). :-)


--
Regards ... Chris
ISUG - NA RUG Director
Blog: http://chrispollach.pbdjmagazine.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Bruce Armstrong" <NOCANSPAM_bruce.armstrong@yahoo.com> wrote in message
news:sdepf5luc5igmljkhi7hnpee7l9f8lg365@4ax.com...
>
> That would work for the system path. I think the OP was asking about
> the desktop.
>
> If that is the case, I'd recommend the SHGetFolderPath function
>
> http://msdn.microsoft.com/en-us/library/bb762181%28VS.85%29.aspx
>
> I haven't specifically tried CSIDL_DESKTOP with that, but I don't see
> why it wouldn't work. CSIDL_PERSONAL is supposed to work, and that's
> a subdirectory of CSIDL_DESKTOP.
>
> This seems it indicate that it does work for Desktop:
>
> http://www.tek-tips.com/faqs.cfm?fid=4264
>
>
> On 12 Nov 2009 06:26:10 -0800, "Chris Pollach"
> <cpollach@travel-net.com> wrote:
>
>>Hi Ranjith;
>>
>> Just use PB's built-in GetContextXxxxx ( ) methods.
>>
>>For example:
>>
>>String ls_keyword, ls_values []
>>ContextKeyword lcx_key
>>
>>this.GetContextService ("ContextKeyword", lcx_key)
>>ls_keyword = "path"
>>lcx_key.GetContextKeywords (ls_keyword, ls_values)
>>MessageBox (ls_keyword, ls_values[1])
>>
>>
>>HTH
> -----------------------------------
>
> My Web 2.0 Stuff
>
> Blog: http://bruce.pbdjmagazine.com/
> Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
> Fotki: http://public.fotki.com/brucearmstrong/
> LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
> Twitter: http://twitter.com/bruce_armstrong
> YouTube: http://www.youtube.com/user/brucearmstrong

User_DeskTop.JPG

Ranjith Posted on 2009-11-16 17:47:50.0Z
From: Ranjith <ranjithpremkumar@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How to get Desktop path of the current user
Date: Mon, 16 Nov 2009 09:47:50 -0800 (PST)
Organization: http://groups.google.com
Lines: 74
Message-ID: <0ad50310-2c9f-48ce-8ae8-c1eb1dce26eb@y28g2000prd.googlegroups.com>
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com> <4afc1b02$1@forums-1-dub> <sdepf5luc5igmljkhi7hnpee7l9f8lg365@4ax.com>
NNTP-Posting-Host: 86.96.161.9
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1258393670 9879 127.0.0.1 (16 Nov 2009 17:47:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 16 Nov 2009 17:47:50 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: y28g2000prd.googlegroups.com; posting-host=86.96.161.9; posting-account=R53KSgoAAAAuXOIrb-Y2IAsg9cqvv8jN
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; yie8),gzip(gfe),gzip(gfe)
X-Original-Bytes: 3614
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!y28g2000prd.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27173
Article PK: 793603

On Nov 13, 5:48 am, Bruce Armstrong

<NOCANSPAM_bruce.armstr...@yahoo.com> wrote:
> That would work for the system path.  I think the OP was asking about
> the desktop.
>
> If that is the case, I'd recommend the SHGetFolderPath function
>
> http://msdn.microsoft.com/en-us/library/bb762181%28VS.85%29.aspx
>
> I haven't specifically tried CSIDL_DESKTOP with that, but I don't see
> why it wouldn't work.  CSIDL_PERSONAL is supposed to work, and that's
> a subdirectory of CSIDL_DESKTOP.
>
> This seems it indicate that it does work for Desktop:
>
> http://www.tek-tips.com/faqs.cfm?fid=4264
>
> On 12 Nov 2009 06:26:10 -0800, "Chris Pollach"
>
>
>
>
>
> <cpoll...@travel-net.com> wrote:
> >Hi Ranjith;
>
> >   Just use PB's built-in GetContextXxxxx ( ) methods.
>
> >For example:
>
> >String   ls_keyword, ls_values []
> >ContextKeyword  lcx_key
>
> >this.GetContextService ("ContextKeyword", lcx_key)
> >ls_keyword = "path"
> >lcx_key.GetContextKeywords  (ls_keyword, ls_values)
> >MessageBox (ls_keyword, ls_values[1])
>
> >HTH
>
> -----------------------------------
>
> My Web 2.0 Stuff
>
> Blog:      http://bruce.pbdjmagazine.com/
> Facebook:  http://www.facebook.com/people/Bruce-Armstrong/1600223798
> Fotki:    http://public.fotki.com/brucearmstrong/
> LinkedIn:  http://www.linkedin.com/in/bruceaarmstrong
> Twitter:  http://twitter.com/bruce_armstrong
> YouTube:  http://www.youtube.com/user/brucearmstrong- Hide quoted text -
>
> - Show quoted text -

Hello Bruce,

I have tried the same thing but doesnt given me an output. Please
check the below given code

Public Function Long SHGetSpecialFolderLocation (Long
hwndOwner,long nFolder, long ppidl ) library "shell32.dll"
Public Function long SHGetPathFromIDList(long pidl, String pszPath)
library "shell32.dll"

Long pidl,lngret
string strlocation

lngRet = SHGetSpecialFolderLocation(Handle(this), 16, pidl)

strLocation = Space(260)
lngRet = SHGetPathFromIDList(pidl, strLocation)
Messagebox('s',strlocation)

Thanks in advance for any help.


Bruce Armstrong Posted on 2009-11-17 04:10:28.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How to get Desktop path of the current user
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <le84g5hgbsvaokjp1oee7f55c60uljuoip@4ax.com>
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com> <4afc1b02$1@forums-1-dub> <sdepf5luc5igmljkhi7hnpee7l9f8lg365@4ax.com> <0ad50310-2c9f-48ce-8ae8-c1eb1dce26eb@y28g2000prd.googlegroups.com>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 16 Nov 2009 20:10:28 -0800
X-Trace: forums-1-dub 1258431028 10.22.241.152 (16 Nov 2009 20:10:28 -0800)
X-Original-Trace: 16 Nov 2009 20:10:28 -0800, vip152.sybase.com
Lines: 91
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27174
Article PK: 761748

I didn't recommend you use the SHGetSpecialFolderLocation method. I
recommended the SHGetFolderLocation method, available in all Windows
OSes since Windows 2000.

On Mon, 16 Nov 2009 09:47:50 -0800 (PST), Ranjith

<ranjithpremkumar@gmail.com> wrote:

>On Nov 13, 5:48 am, Bruce Armstrong
><NOCANSPAM_bruce.armstr...@yahoo.com> wrote:
>> That would work for the system path.  I think the OP was asking about
>> the desktop.
>>
>> If that is the case, I'd recommend the SHGetFolderPath function
>>
>> http://msdn.microsoft.com/en-us/library/bb762181%28VS.85%29.aspx
>>
>> I haven't specifically tried CSIDL_DESKTOP with that, but I don't see
>> why it wouldn't work.  CSIDL_PERSONAL is supposed to work, and that's
>> a subdirectory of CSIDL_DESKTOP.
>>
>> This seems it indicate that it does work for Desktop:
>>
>> http://www.tek-tips.com/faqs.cfm?fid=4264
>>
>> On 12 Nov 2009 06:26:10 -0800, "Chris Pollach"
>>
>>
>>
>>
>>
>> <cpoll...@travel-net.com> wrote:
>> >Hi Ranjith;
>>
>> >   Just use PB's built-in GetContextXxxxx ( ) methods.
>>
>> >For example:
>>
>> >String   ls_keyword, ls_values []
>> >ContextKeyword  lcx_key
>>
>> >this.GetContextService ("ContextKeyword", lcx_key)
>> >ls_keyword = "path"
>> >lcx_key.GetContextKeywords  (ls_keyword, ls_values)
>> >MessageBox (ls_keyword, ls_values[1])
>>
>> >HTH
>>
>> -----------------------------------
>>
>> My Web 2.0 Stuff
>>
>> Blog:      http://bruce.pbdjmagazine.com/
>> Facebook:  http://www.facebook.com/people/Bruce-Armstrong/1600223798
>> Fotki:    http://public.fotki.com/brucearmstrong/
>> LinkedIn:  http://www.linkedin.com/in/bruceaarmstrong
>> Twitter:  http://twitter.com/bruce_armstrong
>> YouTube:  http://www.youtube.com/user/brucearmstrong- Hide quoted text -
>>
>> - Show quoted text -
>
>Hello Bruce,
>
>I have tried the same thing but doesnt given me an output. Please
>check the below given code
>
>Public Function Long SHGetSpecialFolderLocation (Long
>hwndOwner,long nFolder, long ppidl ) library "shell32.dll"
>Public Function long SHGetPathFromIDList(long pidl, String pszPath)
>library "shell32.dll"
>
>Long pidl,lngret
>string strlocation
>
>lngRet = SHGetSpecialFolderLocation(Handle(this), 16, pidl)
>
> strLocation = Space(260)
> lngRet = SHGetPathFromIDList(pidl, strLocation)
>Messagebox('s',strlocation)
>
>Thanks in advance for any help.

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong


jason Posted on 2009-11-23 18:42:43.0Z
From: "Jason" <jbays@wynalda.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Organization: 12.164.15.4
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com> <4afc1b02$1@forums-1-dub> <sdepf5luc5igmljkhi7hnpee7l9f8lg365@4ax.com> <0ad50310-2c9f-48ce-8ae8-c1eb1dce26eb@y28g2000prd.googlegroups.com> <le84g5hgbsvaokjp1oee7f55c60uljuoip@4ax.com>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: How to get Desktop path of the current user
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b0ad7a3$1@forums-1-dub>
Date: 23 Nov 2009 10:42:43 -0800
X-Trace: forums-1-dub 1259001763 10.22.241.152 (23 Nov 2009 10:42:43 -0800)
X-Original-Trace: 23 Nov 2009 10:42:43 -0800, vip152.sybase.com
Lines: 16
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27176
Article PK: 761749

This works for me:

String ls_path

RegistryGet("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explore
r\Shell Folders", "Desktop", RegString!, ls_path )

If IsNull(ls_path) then
ls_path = ""
End If

If ls_path = "" then
ls_path = "C:\Documents and Settings\" + g_s_userid + "\Desktop"
End If

Return ls_path


Ranjith Posted on 2009-11-30 06:52:12.0Z
From: Ranjith <ranjithpremkumar@gmail.com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How to get Desktop path of the current user
Date: Sun, 29 Nov 2009 22:52:12 -0800 (PST)
Organization: http://groups.google.com
Lines: 31
Message-ID: <9000730d-1751-4280-9bd6-00e747aefbcc@h14g2000pri.googlegroups.com>
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com> <4afc1b02$1@forums-1-dub> <sdepf5luc5igmljkhi7hnpee7l9f8lg365@4ax.com> <0ad50310-2c9f-48ce-8ae8-c1eb1dce26eb@y28g2000prd.googlegroups.com> <le84g5hgbsvaokjp1oee7f55c60uljuoip@4ax.com> <4b0ad7a3$1@forums-1-dub>
NNTP-Posting-Host: 86.96.160.9
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1259563932 987 127.0.0.1 (30 Nov 2009 06:52:12 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 30 Nov 2009 06:52:12 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: h14g2000pri.googlegroups.com; posting-host=86.96.160.9; posting-account=R53KSgoAAAAuXOIrb-Y2IAsg9cqvv8jN
User-Agent: G2/1.0
X-HTTP-Via: 1.1 ISA
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!newsfeed.news2me.com!nx01.iad01.newshosting.com!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!h14g2000pri.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27185
Article PK: 793608


On Nov 23, 10:42 pm, "Jason" <jb...@wynalda.com> wrote:
> This works for me:
>
> String ls_path
>
> RegistryGet("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ex­plore
> r\Shell Folders", "Desktop", RegString!, ls_path )      
>
> If IsNull(ls_path) then
>         ls_path = ""
> End If
>
> If ls_path = "" then
>         ls_path = "C:\Documents and Settings\" + g_s_userid + "\Desktop"
> End If
>
> Return ls_path

Hello All,

We can get the desktop path using the following registry key.

RegistryGet("HKEY_CURRENT_USER\Software\Microsoft\Windows
\CurrentVersion\Explorer\Shell Folders", "Desktop", RegString!,
ls_path )

regards,

Ranjith T


fisher Posted on 2009-11-12 08:40:48.0Z
From: "fisher" <fisherNOatwckp.SPAM.lodz.PLEASE.pl>
Newsgroups: sybase.public.powerbuilder.powerscript
Organization: 193.121.160.69
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com>
X-Newsreader: AspNNTP 1.50 (JodoHost)
Subject: Re: How to get Desktop path of the current user
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4afbca10$1@forums-1-dub>
Date: 12 Nov 2009 00:40:48 -0800
X-Trace: forums-1-dub 1258015248 10.22.241.152 (12 Nov 2009 00:40:48 -0800)
X-Original-Trace: 12 Nov 2009 00:40:48 -0800, vip152.sybase.com
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27158
Article PK: 793593

API functions
SHGetSpecialFolderLocation
SHGetPathFromIDList
would do the thing, check links below for examples.

http://www.mvps.org/access/api/api0054.htm
http://msdn.microsoft.com/en-us/library/aa140088%28office.10%29.aspx
On Wed, 11 Nov 2009 22:41:19 -0800 (PST),
in sybase.public.powerbuilder.powerscript

Ranjith <ranjithpremkumar@gmail.com> wrote:
>Hello,
>
>Is there any API call by which I will able to get current user desktop
>path. Thanks in advance for any help.
>
>Regards,
>
>Ranjith T


Ranjith Posted on 2009-11-12 08:49:08.0Z
Sender: 33cc.4afa8d4d.1804289383@sybase.com
From: Ranjith
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How to get Desktop path of the current user
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4afbcc03.62e8.1681692777@sybase.com>
References: <4afbca10$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Nov 2009 00:49:08 -0800
X-Trace: forums-1-dub 1258015748 10.22.241.41 (12 Nov 2009 00:49:08 -0800)
X-Original-Trace: 12 Nov 2009 00:49:08 -0800, 10.22.241.41
Lines: 28
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27159
Article PK: 793597

Hi Fisher,

Thanks for your help. I have one doubt, I can see one
constant with the value "Public Const CSIDL_DESKTOPDIRECTORY
= &H10
" how to change &H10 to PowerBuilder equivalent.

Thanks in advance for any help.

> API functions
> SHGetSpecialFolderLocation
> SHGetPathFromIDList
> would do the thing, check links below for examples.
>
> http://www.mvps.org/access/api/api0054.htm
>
http://msdn.microsoft.com/en-us/library/aa140088(office.10).aspx
> On Wed, 11 Nov 2009 22:41:19 -0800 (PST),
> in sybase.public.powerbuilder.powerscript
> Ranjith <ranjithpremkumar@gmail.com> wrote:
> >Hello,
> >
> >Is there any API call by which I will able to get current
> user desktop >path. Thanks in advance for any help.
> >
> >Regards,
> >
> >Ranjith T


fisher <fisher_NO Posted on 2009-11-12 16:44:24.0Z
From: fisher <fisher_NO@SPAM_star.wckp.lodz.pl_PLEASE>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How to get Desktop path of the current user
References: <4afbca10$1@forums-1-dub> <4afbcc03.62e8.1681692777@sybase.com>
In-Reply-To: <4afbcc03.62e8.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 091112-0, 11/12/2009), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4afc3b68$1@forums-1-dub>
Date: 12 Nov 2009 08:44:24 -0800
X-Trace: forums-1-dub 1258044264 10.22.241.152 (12 Nov 2009 08:44:24 -0800)
X-Original-Trace: 12 Nov 2009 08:44:24 -0800, vip152.sybase.com
Lines: 31
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27165
Article PK: 793601

Hi,
I bet it's hexadecimal...

Ranjith wrote:
> Hi Fisher,
>
> Thanks for your help. I have one doubt, I can see one
> constant with the value "Public Const CSIDL_DESKTOPDIRECTORY
> = &H10
> " how to change &H10 to PowerBuilder equivalent.
>
> Thanks in advance for any help.
>
>> API functions
>> SHGetSpecialFolderLocation
>> SHGetPathFromIDList
>> would do the thing, check links below for examples.
>>
>> http://www.mvps.org/access/api/api0054.htm
>>
> http://msdn.microsoft.com/en-us/library/aa140088(office.10).aspx
>> On Wed, 11 Nov 2009 22:41:19 -0800 (PST),
>> in sybase.public.powerbuilder.powerscript
>> Ranjith <ranjithpremkumar@gmail.com> wrote:
>>> Hello,
>>>
>>> Is there any API call by which I will able to get current
>> user desktop >path. Thanks in advance for any help.
>>> Regards,
>>>
>>> Ranjith T


Real Gagnon Posted on 2009-11-14 15:47:41.0Z
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: How to get Desktop path of the current user
From: Real Gagnon <realgag+usenet@geocities.com>
References: <c92d141e-9171-44e1-b489-05e16effada1@2g2000prl.googlegroups.com>
Message-ID: <Xns9CC36ECD9EFDCrgagnoncom@192.138.151.106>
User-Agent: Xnews/2006.08.24
X-Face: '>{u/e[@wCYV$e!T!j^qB%wU,7sGB<j\$2x+m&b<L:qzZ;x8EJMzD|$^
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 14 Nov 2009 07:47:41 -0800
X-Trace: forums-1-dub 1258213661 10.22.241.152 (14 Nov 2009 07:47:41 -0800)
X-Original-Trace: 14 Nov 2009 07:47:41 -0800, vip152.sybase.com
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27169
Article PK: 793598


> Is there any API call by which I will able to get current user desktop
> path. Thanks in advance for any help.

It is stored in the registry.

Key :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders

Value : Desktop

Bye.

--
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html