"Karsten" <(E-Mail Removed)> wrote in message
news:3B4A7ECD-9D55-48C0-AC85-(E-Mail Removed)...
> Hello,
> due to incompatibilities I've installed 2 versions of a software into
> different folders (on Win2000 server), which the user starts via shortcuts
> to
> batch files, which only overwrite the registry for the %path% user
> environment variable and start the software. Something like:
>
> start_V1.cmd:
> regedit /s c:\V1.reg
> C:\....exe
> with V1.reg:
> [HKEY_CURRENT_USER\Environment]
> "PATH"="C:\\...
>
> (OT: it's not the best solution, as %path% can change; usually it should
> be
> parsed, the old path removed and the new added... but it's a quick
> solution)
>
> Now it can happen, that the %path% on the command line doesn't update,
> while
> the env vars in registry and control panel are ok. It's consistent in new
> instances of cmd, and seems only a restart helps to overcome this
> deadlock.
> Qestion to the experts: is there a solution beside reboot/assembling the
> %path%?
>
> Thanks in advance, any idea is welcome
> Karsten
Not really sure what you're getting at. Does this mysterious software
actually retrieve PATH from the registry, or from the environment?
Could you simply set PATH to the appropriate value within the batch, then
execute whateveryourexecutablenameis?
Or, if you insist on changing the registry value, would a simple START /I
do the job (not sure whether this re-established PATH from the registry or
whether it inherits the original environment, as per a literal reading of
the documentation.)
|