PDA

Click to See Complete Forum and Search --> : [RESOLVED] wordpad path


maxmax
Aug 18th, 2007, 05:06 AM
I want to shell "wordpad.exe" from my application. So, in my code I am going to the registry to find path to the "wordpad.exe" and get return from windowsXP as it is in registry:
%programfiles%\windowsnt\accessories\wordpad.exe



When I put this path into shell(...) I obviously get error "file not found" , because %programfiles% cannot be recognized.

So , now I am looking for some way to find in the windows system were this " environment variable" is decoded to transform it in the real path.

Appreciate your advise.

Maxmax

zeezee
Aug 18th, 2007, 10:56 AM
try this

Environ("programfiles")

:wave:

RhinoBull
Aug 19th, 2007, 11:23 AM
What programming language do you use?

maxmax
Aug 19th, 2007, 11:09 PM
yes, it's done. Thanks, zeezee.



I want to shell "wordpad.exe" from my application. So, in my code I am going to the registry to find path to the "wordpad.exe" and get return from windowsXP as it is in registry:
%programfiles%\windowsnt\accessories\wordpad.exe



When I put this path into shell(...) I obviously get error "file not found" , because %programfiles% cannot be recognized.

So , now I am looking for some way to find in the windows system were this " environment variable" is decoded to transform it in the real path.

Appreciate your advise.

Maxmax