- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I use Windows 7 x64 and Intel CPU.
When I use getenv or getenvqq to "read" enviromental variables I get the same answer if I use
iret=GETENVQQ('programfiles(x86)',line2)
and
iret=GETENVQQ('programfiles',line2)
but if I check my settings with "set" in the cmd.exe I see both
ProgramFiles=C:\\Program Files
ProgramFiles(x86)=C:\\Program Files (x86)
How do I find the 64 bit folder?
Cheers
Magnus
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is a exampel:
file foo.for
--
program foo
use ifport
integer length
parameter(length=100)
character*(length) line,line2
! check if programfiles set
line=' '
call getenv('ProgramFiles',line)
write(*,*)'ProgramFiles=',line
! check if programfiles(x86) set
line2=' '
call getenv('ProgramFiles(x86)',line2)
write(*,*)'ProgramFiles(x86)=',line2
end program foo
--
I compile like this:
cmd.exe->"c:\Program Files (x86)\Intel\Compiler\11.0\075\fortran\bin\IA32\ifort" foo.for /out:foo.exe
my output running this program.
cmd.exe>foo.exe
ProgramFiles=
C:\Program Files (x86)
ProgramFiles(x86)=
C:\Program Files (x86)
Cheers/Magnus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve. I compiled for intel64 and got what I expected.
cmd.exe->foo.exe
ProgramFiles=
C:\Program Files
ProgramFiles(x86)=
C:\Program Files (x86)
What is the rationale behind this I wonder. Making it harder to call/find/run 64bit programs from 32bit ones.
Cheers/Magnus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page