Hi 

I am trying to create a windows first response IR script for Windows 2000
Pro using binaries that do not touch the file system, but am having problems
making the environment variables stick.

In order to do this, I use filemon to note which DLLs are used by the
programs, copy these off the original test system onto a CD (in this case
into d:\IR\2k\system32). Then I need to set the environment variables. Using
the model of Helix 1.7 cmdenv.bat, ir.bat and ir2.bat I changed the path
variables in cmdenv.bat to point to the CD or to a USB stick, on d: or e: 

REM Set environment variables
set comspec=d:\cmd.exe
set systemroot=d:\
REM %systemdrive% cant be altered once system is running...
set systemdrive=d:\
set path:d:\IR\...; etc...
set temp=d:\
set tmp=d:\
set homedrive=d:\
set windir=d:\IR\2k
set USERPROFILE=d:\
set programfiles=d:\IR

...

REM change to root of cdrom or usb stick
d:

REM do stuff
...


PROBLEM

It does not matter whether I run this from CD or from the writable USB
stick, as user or as Administrator (runas /user:Administrator
e:\cmdenv.bat), the environment variables appear to be set OK (tested with
"set".) But when I run the ir batch script on a second test system, filemon
shows that the program DLLs are still taken from the system32 directory.
There is no searching for DLLs in the CDROM / USB stick, the environment
variables appear to have been ignored. It does not look like a permissions
problem.

Does anyone know how to force the DLL paths within a batch script / cmd
shell?

Thanks 

L.

-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

Reply via email to