Jump to content



Photo

EnvSet() under Win9x


  • Please log in to reply
3 replies to this topic

#1 nitro322

nitro322

    Adventurer

  • Active Members
  • PipPip
  • 120 posts

Posted 27 November 2006 - 03:22 AM

I'm having an issue with EnvSet() under Windows 9x. Take the following code as an example:

$pathold = envget('path') envset('path', @scriptdir & ';' & envget('path')) $pathnew = envget('path') msgbox(0, 'Test', 'pathold = ' & $pathold & @CRLF & 'pathnew = ' & $pathnew) runwait(@comspec & ' /k echo %path%')

Now, under Windows 9x the msgbox() that displays $pathold and $pathnew shows the correct information: $pathnew = $pathold with the @scriptdir prepended to it. However, the @compspec command that displays %path% is incorrect: it shows the the value of $pathold. Under Windows XP, @comspec shows the correct %path% value.

I understand that EnvSet() creates temporary variables and that it's only valid for programs spawned directly by the script, but in this case it doesn't seem to be working. As far as I can tell, I'm doing exactly what I'm supposed to (running command.com from the AutoIt script), but it will not use the correct path. I also tried adding an EnvUpdate() call just before RunOnce(), but that had no effect.

Is this a bug, or am I just doing something wrong?







#2 herewasplato

herewasplato

    Most Senile Poster

  • Active Members
  • PipPipPipPipPipPip
  • 4,426 posts

Posted 27 November 2006 - 03:49 AM

I'm having an issue with EnvSet() under Windows 9x...

You might want to request that an admin change the thread title from SetEnv (which is an AutoIt v2 function) to EnvSet for v3.

Take a look at this thread - maybe add your code to it:
http://www.autoitscript.com/forum/index.ph...showtopic=15053
..

#3 nitro322

nitro322

    Adventurer

  • Active Members
  • PipPip
  • 120 posts

Posted 27 November 2006 - 06:01 AM

Yeah, that should be EnvSet(). My bad. If any admin reading this could change the title please, that'd be great.

As for the link you posted, I had actually read that earlier, but I wasn't sure if it was related to this, and had dismissed it since it's >1 year old and didn't seem to ever be addressed. Is it still being investigated?

#4 herewasplato

herewasplato

    Most Senile Poster

  • Active Members
  • PipPipPipPipPipPip
  • 4,426 posts

Posted 27 November 2006 - 03:08 PM

...but I wasn't sure if it was related to this, and had dismissed it since it's >1 year old and didn't seem to ever be addressed. Is it still being investigated?

I was (am) not sure if it applied either... maybe just post a link to this thread into that thread and see what happens.

I would think that all items in the "v3 Bug Reports (Open)" forum are still on some burner, just maybe the very back one.
..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users