Jump to content











Photo
- - - - -

Environment variables,BS-Explorer, and winpeshl.ini/autorun.cmd


  • Please log in to reply
2 replies to this topic

#1 gomjh

gomjh

    Newbie

  • Members
  • 18 posts
  •  
    United States

Posted 13 September 2007 - 12:55 AM

So I do a bunch of custom things in autorun.cmd that previously would be put into the environment and be available for use, however, I recently began using BS-Explorer as the shell instead of the autorun.cmd window. This causes a problem as all cmd windows that are opened from BS-Explorer do not have my environment variables that I set in autorun.cmd.
How would I go about getting the environment variables I need, which are set dynamically, available in the cmd windows of BS-Explorer? Is there a way to do an autorun of a cmd file in BS-Explorer when it loads? I'm somewhat lost on how to proceed. Also, it seems that if I open a cmd prompt in BS-Explorer and set variables there, then close the window and open a new one that those variables again are no longer available. I understand that BS-Explorer is not windows explorer, but I really need to find a way to not lose all my environment variables.

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,098 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 13 September 2007 - 01:23 PM

Yes, the "SET" command works on a "per session" aka "per open window" basis.
(volatile environment variables)

You will need to experiment with SETX:
http://www.ss64.com/nt/setx.html
or
SETENV:
http://barnyard.syr....efatica/#SETENV

or (maybe, not sure) XSET:
http://xset.tripod.com/

to create "persistant" environment variables

jaclaz

#3 gomjh

gomjh

    Newbie

  • Members
  • 18 posts
  •  
    United States

Posted 14 September 2007 - 10:34 PM

I tried setenv.exe and it appears that bs-explorer ignores what it does :loleverybody: I haven't tried xset or setx, but I found another way around the issue. I'm actually launching a custom exe as the shell and I have it call startnet.cmd which then calls peshell...which then opens bs-explorer. At this point all my variables I've set during startnet.cmd are passed all the way through to bs-explorer's cmd windows.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users