How I can get the path of the programs folder?

Just starting out? Need help? Post your questions and find answers here.
Forest Dreams
User
User
Posts: 13
Joined: Sat Jan 01, 2005 4:47 am
Location: Cockeysville, MD

Post by Forest Dreams »

(Ignorence spilling out all over me here )
Do you mean ignorance? :roll:
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Yep, nice code, GPI.

I guess I'm a Randy-kind of programmer: the less lines, the better... ;)
El_Choni
Randy Walker
Addict
Addict
Posts: 991
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: How I can get the path of the programs folder?

Post by Randy Walker »

gnozal wrote: English is a foreign language for most people in the world :twisted:
English is a foreign language here too. I think only the British speak English. Nobody really know what language we speak over here.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy Walker
Addict
Addict
Posts: 991
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Post by Randy Walker »

Forest Dreams wrote:
(Ignorence spilling out all over me here )
Do you mean ignorance? :roll:
Its my ingorence and I'll spill it however I like :oops:
... and get it all over me too if I want... and sometines when I don't want.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy Walker
Addict
Addict
Posts: 991
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Post by Randy Walker »

El_Choni wrote:Yep, nice code, GPI.

I guess I'm a Randy-kind of programmer: the less lines, the better... ;)
STOP CALLING ME PROGRAMMER :lol:
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

:D
Fred - AlphaSND
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Hi :shock:
Thanks for all your help :)

PEACE AND LOVE! :D
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

P.S.
I'm ITALIAN :D
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Procedure.s ExpandEnv (env$)
sizerequired = ExpandEnvironmentStrings_ (env$, dest$, 0)
If (sizerequired)
dest$ = Space (sizerequired)
result = ExpandEnvironmentStrings_ (env$, dest$, 159)
EndIf
ProcedureReturn dest$
EndProcedure

Debug "%SystemDrive%: "+ExpandEnv ("%SystemDrive%")
Debug "%SystemRoot%: "+ExpandEnv ("%Systemroot%")
Debug "%OS%: "+ExpandEnv ("%OS%")
Debug "%Temp%: "+ExpandEnv ("%Temp%")
Debug "%HomePath%: "+ExpandEnv ("%HomePath%")
Debug "%Path%: "+ExpandEnv ("%Path%")
Debug "%Programfiles%: "+ExpandEnv ("%Programfiles%")

:)
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

lol
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

path is empty. BTW: does this work with 9x/2000?
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Hi
In my system WindowsXP Pro path isn't empty.
I don't know if it works on 9.x
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Would this not work for you ??

Code: Select all

#CSIDL_BITBUCKET=$30
#CSIDL_DESKTOP=$10
#CSIDL_FAVORITES=$06
#CSIDL_FONTS=$14
#CSIDL_HISTORY=$22
#CSIDL_MYPICTURES=$27
#CSIDL_PROGRAM_FILES=$26
#CSIDL_STARTMENU=$0B
#CSIDL_SYSTEM=$25
#CSIDL_WINDOWS=$24

buffer.l=0
folder.s=Space(255)
SHGetSpecialFolderLocation_(0, #CSIDL_PROGRAM_FILES, @buffer)
SHGetPathFromIDList_(buffer, @folder)


MessageRequester("Program Files",folder,0)

Enjoy! :)
Image Image
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Hi
Thanks again.

P.S.
Paul thanks for your "PureVisionXP" I'm an happy user of your program.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Re: How I can get the path of the programs folder?

Post by Shannara »

gnozal wrote:
Randy Walker wrote:Who'd of thought anyone would install Windows in some foreign language?
English is a foreign language for most people in the world :twisted:
That is actually true, English is not the most popular language, it is #3, with American as #2, and Spanish as #1 :)
Post Reply