DO and environment variables

Hi,

I'm using DO version 10.0.0.0.4137 on Windows 7 (32 bits).
Either I run DO in normal mode or as an administrator I get environment variable PATH set only as system variable and not as a combination of system and user variables.

I.e. when system variable is set to:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
and user variable is set to:
%ProgramFiles%\Sysinternals
then calling echo %PATH% from batch file we should get:
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Sysinternals
But when I'm calling this script from DO I get:
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem

This restricted environment is transfered to all programs called from DO (via CLI command or double click) - so some aplication cannot run properly.

Is there some way to force using of complete PATH variable in DO?

(Related FAQ: Why NOT to run Opus as Administrator in Vista / Windows 7)

I added a user path env-var:


Command Prompts opened via Opus pick it up fine and merge it with the system path env-var


Same with an Opus DOS batch button which echos the path:



Check that you are setting the env-var under the same account that you are running Opus under and creating the command prompt with. In particular, if you are running on a Standard User account then when you elevate to Administrator to open the System control panel you will be setting env-vars for the Administrator account, not the user account.

Also check what happens in a Command Prompt opened via the Start Menu.

Thank you for your answer.
I think my settings are OK: my account type is Administrator, other variables set up for my user are visible in programs called from DOpus but full PATH is not.
I noticed that my problems appear only when I connect to my local server via Novell client and when Novell adds its search paths (i.e. X:.;Y:.;Z:.) to my PATH variable.
When I unmount this disks everything comes back to normal state.
This issue concerns only DOpus - in command prompt opened from explorer or Total^W... other commander everything is OK.

Once more, thanks a lot for your detailed reply and help. :slight_smile:

[quote="Lupus"]I noticed that my problems appear only when I connect to my local server via Novell client and when Novell adds its search paths (i.e. X:.;Y:.;Z:.) to my PATH variable.
When I unmount this disks everything comes back to normal state.[/quote]

Does it make a difference if you (re-)start Opus before or after mounting the Novell drives?

(Note that closing all Opus windows doesn't exit it by default. Use the exit option in the File menu or the taskbar jumplist.)

No. I don't have to close any lister nor main program (DOpus) from tray icon. I log in to local machine only, DOpus starts automatically with Windows, double click on script with echo %path% shows full PATH variable. Then I log in into Novell, using the same lister I call same script which now shows only system PATH variable with added Novell search paths. When I dismount this drives from DOpus tools menu or from explorer I call the same script from the same lister and path variable is properly merged.

It's very strange.

But if you do restart Opus after mounting the Novell drives, do you see the same thing even then?

Yes, I closed Opus from tray icon and logged in into Novell once more. Now I see only system path:

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\PC Connectivity Solution;C:\Program Files
Subversion\bin;C:\Program Files\TortoiseSVN\bin;Y:.;X:.

I've looked at the code which builds the list of environment variables and I think I see where the problem is.

A fix has been written for the next version.

Hello,

I can confirm that version 10.0.0.5 has fixed above issue.
Thank you very much.