Article View: borland.public.jbuilder.java.language
Article #236Re: System.getenv() problem - probably solved :)
From: Oliver
Date: Thu, 02 Mar 2006 15:31
Date: Thu, 02 Mar 2006 15:31
23 lines
1578 bytes
1578 bytes
Hi,
i think ive solved the issue. I dont use ShellExecute, but instead
Result:= Windows.CreateProcess(
nil, //AppName
PChar(anAppName+' '+aCmdLine), //CmdLine
nil, //ProcessSecurity
nil, //ThreadSecurity
False, //Handle Inheritance
NORMAL_PRIORITY_CLASS, //Creation Flags
nil, //Environment
PChar(ExtractFilePath(anAppName)), //Dir
lStartupInfo,
lProcessInfo
);
if Environment is passed as nil then the environment of the parent process is being passed (i suspect that ShellExecute uses an "empty environment"?!).
thanks for the hints (as you said Java was innocent here :) )
Oliver
Technical Details
Message-ID:
<44071df7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44070483$1@newsgroups.borland.com> <44070700$1@newsgroups.borland.com> <440715f2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,a9217b09f375ec94 X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Oliver" <o.maas@nospam_metrohm.de> Sender: "Oliver" <o.maas@nospam_metrohm.de> Reply-To: "Oliver" <o.maas@nospam_metrohm.de> Subject: Re: System.getenv() problem - probably solved :) Newsgroups: borland.public.jbuilder.java.language X-User-Info: 81.90.37.2 References: <44070483$1@newsgroups.borland.com> <44070700$1@newsgroups.borland.com> <440715f2$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <44071df7$1@newsgroups.borland.com> Date: 2 Mar 2006 08:31:51 -0700 X-Trace: newsgroups.borland.com 1141317111 207.105.83.66 (2 Mar 2006 08:31:51 -0700) Lines: 23 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail