Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Launching an application in its own process space (windows XP)

0 views
Skip to first unread message

Stef

unread,
Oct 29, 2004, 7:10:35 AM10/29/04
to
Hi,

I wonder if anybody has a solution. I want to run a windows application
but to set up a different environment space at start up; i.e. have
different PATH settings when I start the app for example.

I suppose I am looking to launching a process in its own memory space
being able to set that up on a per launch basis - perhaps through a
batch for PIF file?

Does anybody know if this is possible in Windows XP?

Thanks in advance,

Stef

@ptd.net Jeremy Boschen

unread,
Oct 29, 2004, 8:56:25 AM10/29/04
to
"Stef" <stef...@comsine.co.uk> wrote in message
news:clt8fb$ls2$1...@titan.btinternet.com...

> Hi,
>
> I wonder if anybody has a solution. I want to run a windows application
> but to set up a different environment space at start up; i.e. have
> different PATH settings when I start the app for example.
>

The CreateProcess function has an lpEnvironment parameter for this purpose.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp

- Jeremy


Gary Chanson

unread,
Oct 29, 2004, 2:21:12 PM10/29/04
to

"Stef" <stef...@comsine.co.uk> wrote in message
news:clt8fb$ls2$1...@titan.btinternet.com...
> Hi,
>
> I wonder if anybody has a solution. I want to run a windows application
> but to set up a different environment space at start up; i.e. have
> different PATH settings when I start the app for example.
>
> I suppose I am looking to launching a process in its own memory space
> being able to set that up on a per launch basis - perhaps through a
> batch for PIF file?

Assumung that you're not talking about Win16 programs, Windows programs
are always run in their own memory space.

If all you need to do is set up environment variables for each
invocation of your program, batch files could be a suitable answer. If you
are executing these programs from within another program, CreateProcess
allows you to specify any environment you choose.

--
-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.mvps.org/ArcaneIncantations/consulting.htm
-gcha...@mvps.org

Pavel A.

unread,
Oct 29, 2004, 7:39:38 AM10/29/04
to
Look up MSDL about AppPath.

--PA

"Stef" <stef...@comsine.co.uk> wrote in message news:clt8fb$ls2$1...@titan.btinternet.com...

0 new messages