Setting Win 95 Environment via script ??? 
Author Message
 Setting Win 95 Environment via script ???

I need to set up some global environment variables (inluding PATH) during
logon process (Win 95 stations) ...
I use something like that
WshShell.Run "winset var=valeur"
WshShell.Run "winset PATH=o:\someMore " & strPreviousPath

The problem is though those modifications are effective if I open a dos box,
It doesn't work on a Windows level ...
If I try to execute a program that is in the new added path with Start
Execute, the program won't be found... Any other Windows applications won't
find any programs in that path ...

Also, if I display the environment variables using a script like

  For Each strVarName In Wshenv
    MsgBox strVarName
  Next

I won't get the variables added via Winset (I can see them via a set command
in a Dos Box).

The various KB and informations I could read are telling about the Global
environment... Is the global environment not so global?? Has anybody got any
ideas about how to deal with this problem?? Isn't it possible to dynamically
change the environment except for Dos apps?

Thanks in advance ...



Fri, 06 Apr 2001 03:00:00 GMT  
 Setting Win 95 Environment via script ???
I'm not sure if this works with WSH but when using winset in a batch file
you must set the variable twice.  Once for the current window and once for
the global.

    set var=value
    winset var=value

I hope this helps.


Quote:
>I need to set up some global environment variables (inluding PATH) during
>logon process (Win 95 stations) ...
>I use something like that
>WshShell.Run "winset var=valeur"
>WshShell.Run "winset PATH=o:\someMore " & strPreviousPath

>The problem is though those modifications are effective if I open a dos
box,
>It doesn't work on a Windows level ...
>If I try to execute a program that is in the new added path with Start
>Execute, the program won't be found... Any other Windows applications won't
>find any programs in that path ...

>Also, if I display the environment variables using a script like

>  For Each strVarName In Wshenv
>    MsgBox strVarName
>  Next

>I won't get the variables added via Winset (I can see them via a set
command
>in a Dos Box).

>The various KB and informations I could read are telling about the Global
>environment... Is the global environment not so global?? Has anybody got
any
>ideas about how to deal with this problem?? Isn't it possible to
dynamically
>change the environment except for Dos apps?

>Thanks in advance ...



Sun, 08 Apr 2001 03:00:00 GMT  
 Setting Win 95 Environment via script ???
Maybe I was not so clear ...
My problem is more related to the fact that Winset seems to set the global
environment for Dos apps only. After executing Winset, the environment seen
by W95 is different from the one seen by Dos apps ...
Strange!!! This is really boring because it means that I can't change my W95
environnement at run time...  Maybe I am doing something wrong but I can't
find even a single document in the whole MSDN library being clear about
Win95 environment (there is one regarding NT, though there are mistakes in
it).

Any help would be appreciated ...

Erik Snell a crit dans le message ...

Quote:
>I'm not sure if this works with WSH but when using winset in a batch file
>you must set the variable twice.  Once for the current window and once for
>the global.

>    set var=value
>    winset var=value

>I hope this helps.



>>I need to set up some global environment variables (inluding PATH) during
>>logon process (Win 95 stations) ...
>>I use something like that
>>WshShell.Run "winset var=valeur"
>>WshShell.Run "winset PATH=o:\someMore " & strPreviousPath

>>The problem is though those modifications are effective if I open a dos
>box,
>>It doesn't work on a Windows level ...
>>If I try to execute a program that is in the new added path with Start
>>Execute, the program won't be found... Any other Windows applications
won't
>>find any programs in that path ...

>>Also, if I display the environment variables using a script like

>>  For Each strVarName In Wshenv
>>    MsgBox strVarName
>>  Next

>>I won't get the variables added via Winset (I can see them via a set
>command
>>in a Dos Box).

>>The various KB and informations I could read are telling about the Global
>>environment... Is the global environment not so global?? Has anybody got
>any
>>ideas about how to deal with this problem?? Isn't it possible to
>dynamically
>>change the environment except for Dos apps?

>>Thanks in advance ...



Mon, 09 Apr 2001 03:00:00 GMT  
 Setting Win 95 Environment via script ???
I could be wrong, but under Win95, each application has it's own
"environment" variables. I know when developing in Visual FoxPro - my
application has it's own set of environment variables (temp files location,
search path etc...) that I set within the program.

--
William Fields
US Bankruptcy Court
Phoenix, AZ



Quote:
> Maybe I was not so clear ...
> My problem is more related to the fact that Winset seems to set the
global
> environment for Dos apps only. After executing Winset, the environment
seen
> by W95 is different from the one seen by Dos apps ...
> Strange!!! This is really boring because it means that I can't change my
W95
> environnement at run time...  Maybe I am doing something wrong but I
can't
> find even a single document in the whole MSDN library being clear about
> Win95 environment (there is one regarding NT, though there are mistakes
in
> it).

> Any help would be appreciated ...

> Erik Snell a crit dans le message ...
> >I'm not sure if this works with WSH but when using winset in a batch
file
> >you must set the variable twice.  Once for the current window and once
for
> >the global.

> >    set var=value
> >    winset var=value

> >I hope this helps.



> >>I need to set up some global environment variables (inluding PATH)
during
> >>logon process (Win 95 stations) ...
> >>I use something like that
> >>WshShell.Run "winset var=valeur"
> >>WshShell.Run "winset PATH=o:\someMore " & strPreviousPath

> >>The problem is though those modifications are effective if I open a dos
> >box,
> >>It doesn't work on a Windows level ...
> >>If I try to execute a program that is in the new added path with Start
> >>Execute, the program won't be found... Any other Windows applications
> won't
> >>find any programs in that path ...

> >>Also, if I display the environment variables using a script like

> >>  For Each strVarName In Wshenv
> >>    MsgBox strVarName
> >>  Next

> >>I won't get the variables added via Winset (I can see them via a set
> >command
> >>in a Dos Box).

> >>The various KB and informations I could read are telling about the
Global
> >>environment... Is the global environment not so global?? Has anybody
got
> >any
> >>ideas about how to deal with this problem?? Isn't it possible to
> >dynamically
> >>change the environment except for Dos apps?

> >>Thanks in advance ...



Mon, 09 Apr 2001 03:00:00 GMT  
 Setting Win 95 Environment via script ???
I know that!!! ... Even dos apps have their own environment space ... But
they do inherit the variable from the or (a) global (or whatever you would
like to name it) environment space. If you SET a Var in autoexec.bat, both
Win 95 and Dos apps will see this var as belonging to the process
environment ...
 THE POINT IS that when I use WINSET, it only change the global environment
for DOS apps and not for Win 95 apps ...
Am I clear ?
Sorry for being so straight but I would really like an answer from somebody
having a good knowledge of that matter ...

William Fields a crit dans le message

Quote:
>I could be wrong, but under Win95, each application has it's own
>"environment" variables. I know when developing in Visual FoxPro - my
>application has it's own set of environment variables (temp files location,
>search path etc...) that I set within the program.

>--
>William Fields
>US Bankruptcy Court
>Phoenix, AZ



>> Maybe I was not so clear ...
>> My problem is more related to the fact that Winset seems to set the
>global
>> environment for Dos apps only. After executing Winset, the environment
>seen
>> by W95 is different from the one seen by Dos apps ...
>> Strange!!! This is really boring because it means that I can't change my
>W95
>> environnement at run time...  Maybe I am doing something wrong but I
>can't
>> find even a single document in the whole MSDN library being clear about
>> Win95 environment (there is one regarding NT, though there are mistakes
>in
>> it).

>> Any help would be appreciated ...

>> Erik Snell a crit dans le message ...
>> >I'm not sure if this works with WSH but when using winset in a batch
>file
>> >you must set the variable twice.  Once for the current window and once
>for
>> >the global.

>> >    set var=value
>> >    winset var=value

>> >I hope this helps.



>> >>I need to set up some global environment variables (inluding PATH)
>during
>> >>logon process (Win 95 stations) ...
>> >>I use something like that
>> >>WshShell.Run "winset var=valeur"
>> >>WshShell.Run "winset PATH=o:\someMore " & strPreviousPath

>> >>The problem is though those modifications are effective if I open a dos
>> >box,
>> >>It doesn't work on a Windows level ...
>> >>If I try to execute a program that is in the new added path with Start
>> >>Execute, the program won't be found... Any other Windows applications
>> won't
>> >>find any programs in that path ...

>> >>Also, if I display the environment variables using a script like

>> >>  For Each strVarName In Wshenv
>> >>    MsgBox strVarName
>> >>  Next

>> >>I won't get the variables added via Winset (I can see them via a set
>> >command
>> >>in a Dos Box).

>> >>The various KB and informations I could read are telling about the
>Global
>> >>environment... Is the global environment not so global?? Has anybody
>got
>> >any
>> >>ideas about how to deal with this problem?? Isn't it possible to
>> >dynamically
>> >>change the environment except for Dos apps?

>> >>Thanks in advance ...



Tue, 10 Apr 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Setting environment Variables via VB Script

2. Network TCP WINS settings via script

3. Can't Create Object WScript.Shell in Win 98 (1st Ed) and Win 95

4. Best Post Script Color Driver in Win 95?

5. Why do I get error when trying to install Script 5.1 on a win 95 operating

6. Script to activate win 95 Shutdown

7. Script to change WINS on 95/98/nt/2000

8. IIS 5.1 (Win XP) Setting Cookies via Response.Cookies collection problem

9. create environment variable in windows 95

10. Setting proxy settings on IE6 via script

11. Win 95 - How to run

 

 
Powered by phpBB® Forum Software