forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

store fix parameters for a program

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Bartl



Joined: 16 Oct 2009
Posts: 58
Location: München

PostPosted: Tue Jul 13, 2010 8:16 am    Post subject: store fix parameters for a program Reply with quote

Paul,
i want to use the nodepad.exe in a program with "start_process@", that works fine.
But therefor i need the path, were nodepad.exe is to be find.
Because this can be different on each computer i tried to set a environment variable but i am not able to read this variable with getenv@.

Can you give me a short example how to do this?

Or is there a better way to solve my problem?
Thanks
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Tue Jul 13, 2010 8:46 am    Post subject: Reply with quote

If you use start_process@ or better start_pprocess@ then the PATH environment variable is copied to environment of the process.

On most machines notepad.exe will already be on the PATH. This being the case, you should be able to launch notepad.exe without supplying its full path.

If you still need a sample, here it is...

Code:
character*256 getenv@, path
path=getenv@("PATH")
print*, path
end
Back to top
View user's profile Send private message AIM Address
Bartl



Joined: 16 Oct 2009
Posts: 58
Location: München

PostPosted: Wed Jul 14, 2010 2:46 pm    Post subject: Reply with quote

Hello Paul,
now I understand the function, it works fine, thanks for your prompt response.

But I have still another question:
If I use the %ss code for save settings to a ini file, the storage path is different between XP und VISTA/Windows7.
in XP: c:\windows\??.ini
in VISTA: c:\Users\Media\AppData\Local\VirtualStore\Windows\??.ini

although the path %systemroot% is equal on both machines with c:\windows.

Is it possible to read out the correct storage path with fortran under XP and VISTA/Windows7?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group