Sign in to follow this  
Followers 0
nitro322

EnvSet() under Win9x

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



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


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

...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.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0