Our vBulletin migration is complete.
Welcome vBulletin users! All content and user information from the Micro Focus Forums (vBulletin) site has been migrated to this site. READ MORE.
Anonymous_User Absent Member.
Absent Member.
3220 views

DOS SET Login Script and XP...

Can anyone please let me know if it is possible to set environment
variables with login scripts, and have them usable afterwards?

Basically we need to set a variable, at login time based on network location

i.e.
if (network_address > "80640000" and network_address < "8064FFFF") then
DOS SET CURRENT_SITE = "STBERNARDS"
end

We can see the value is set during login by issuing a WRITE <CURRENT_SITE>
and pause in the script

The issue is that the environment variable is not accessible in the
environment after the login script has processed. We have tried
SET and DOS SET and use MSINFO32.EXE to show the envionment variables

What type of variable should DOS SET create? User or system

Is this an issue with XP?

Any suggestions?!
Thanks

A

Labels (1)
0 Likes
5 Replies
Anonymous_User Absent Member.
Absent Member.

DOS SET Login Script and XP...

Try removing the spaces, use DOS SET CURRENT_SITE="STBERNARDS"

I know you can set the DOS Environment in XP, I do it today.

Pjannusch

> Can anyone please let me know if it is possible to set environment
> variables with login scripts, and have them usable afterwards?
>
> Basically we need to set a variable, at login time based on network

location
>
> i.e.
> if (network_address > "80640000" and network_address < "8064FFFF") then
> DOS SET CURRENT_SITE = "STBERNARDS"
> end
>
> We can see the value is set during login by issuing a WRITE

<CURRENT_SITE>
> and pause in the script
>
> The issue is that the environment variable is not accessible in the
> environment after the login script has processed. We have tried
> SET and DOS SET and use MSINFO32.EXE to show the envionment variables
>
> What type of variable should DOS SET create? User or system
>
> Is this an issue with XP?
>
> Any suggestions?!
> Thanks
>
> A
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: DOS SET Login Script and XP...

And place a test "SET" statement outside of the IF/Then to ensure this is
not failing for some unknown reason.

--
Craig Wilson - MCNE, MCSE, CCNA
Novell Support Forums Volunteer Sysop

Novell does not officially monitor these forums.

Suggestions/Opinions/Statements made by me are solely my own.
These thoughts may not be shared either Novell or any rational human.

<Pjan@nospam.com> wrote in message
news:yHECh.2989$rL6.247@prv-forum2.provo.novell.com...
> Try removing the spaces, use DOS SET CURRENT_SITE="STBERNARDS"
>
> I know you can set the DOS Environment in XP, I do it today.
>
> Pjannusch
>
>> Can anyone please let me know if it is possible to set environment
>> variables with login scripts, and have them usable afterwards?
>>
>> Basically we need to set a variable, at login time based on network

> location
>>
>> i.e.
>> if (network_address > "80640000" and network_address < "8064FFFF") then
>> DOS SET CURRENT_SITE = "STBERNARDS"
>> end
>>
>> We can see the value is set during login by issuing a WRITE

> <CURRENT_SITE>
>> and pause in the script
>>
>> The issue is that the environment variable is not accessible in the
>> environment after the login script has processed. We have tried
>> SET and DOS SET and use MSINFO32.EXE to show the envionment variables
>>
>> What type of variable should DOS SET create? User or system
>>
>> Is this an issue with XP?
>>
>> Any suggestions?!
>> Thanks
>>
>> A
>>

>



0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: DOS SET Login Script and XP...

So.... the story is that it sets in the volatile environment, which is
stored in HKCU\Volatile Environment, which is clearly user specific. (MS
Q100843 doesn't mention these...!)

MSINFO32.EXE and such don't report the volatile environment and our std
user accounts are very locked down, so we can't use much else to check.

We need the variable for nal distribution rules.... so we'll just have to
try and build some more tests and see how they go

Thanks for replies

A

> And place a test "SET" statement outside of the IF/Then to ensure this is
> not failing for some unknown reason.
>
> --
> Craig Wilson - MCNE, MCSE, CCNA
> Novell Support Forums Volunteer Sysop
>
> Novell does not officially monitor these forums.
>
> Suggestions/Opinions/Statements made by me are solely my own.
> These thoughts may not be shared either Novell or any rational human.
>
> <Pjan@nospam.com> wrote in message
> news:yHECh.2989$rL6.247@prv-forum2.provo.novell.com...
> > Try removing the spaces, use DOS SET CURRENT_SITE="STBERNARDS"
> >
> > I know you can set the DOS Environment in XP, I do it today.
> >
> > Pjannusch
> >
> >> Can anyone please let me know if it is possible to set environment
> >> variables with login scripts, and have them usable afterwards?
> >>
> >> Basically we need to set a variable, at login time based on network

> > location
> >>
> >> i.e.
> >> if (network_address > "80640000" and network_address < "8064FFFF") then
> >> DOS SET CURRENT_SITE = "STBERNARDS"
> >> end
> >>
> >> We can see the value is set during login by issuing a WRITE

> > <CURRENT_SITE>
> >> and pause in the script
> >>
> >> The issue is that the environment variable is not accessible in the
> >> environment after the login script has processed. We have tried
> >> SET and DOS SET and use MSINFO32.EXE to show the envionment variables
> >>
> >> What type of variable should DOS SET create? User or system
> >>
> >> Is this an issue with XP?
> >>
> >> Any suggestions?!
> >> Thanks
> >>
> >> A
> >>

> >

>
>


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: DOS SET Login Script and XP...

I too use Dos environment vars for ZEN apps. The apps do not run at
login, but are user initiated. So what you are doing should work.
Phil

> So.... the story is that it sets in the volatile environment, which is
> stored in HKCU\Volatile Environment, which is clearly user specific. (MS
> Q100843 doesn't mention these...!)
>
> MSINFO32.EXE and such don't report the volatile environment and our std
> user accounts are very locked down, so we can't use much else to check.
>
> We need the variable for nal distribution rules.... so we'll just have to
> try and build some more tests and see how they go
>
> Thanks for replies
>
> A
>
> > And place a test "SET" statement outside of the IF/Then to ensure this

is
> > not failing for some unknown reason.
> >
> > --
> > Craig Wilson - MCNE, MCSE, CCNA
> > Novell Support Forums Volunteer Sysop
> >
> > Novell does not officially monitor these forums.
> >
> > Suggestions/Opinions/Statements made by me are solely my own.
> > These thoughts may not be shared either Novell or any rational human.
> >
> > <Pjan@nospam.com> wrote in message
> > news:yHECh.2989$rL6.247@prv-forum2.provo.novell.com...
> > > Try removing the spaces, use DOS SET CURRENT_SITE="STBERNARDS"
> > >
> > > I know you can set the DOS Environment in XP, I do it today.
> > >
> > > Pjannusch
> > >
> > >> Can anyone please let me know if it is possible to set environment
> > >> variables with login scripts, and have them usable afterwards?
> > >>
> > >> Basically we need to set a variable, at login time based on network
> > > location
> > >>
> > >> i.e.
> > >> if (network_address > "80640000" and network_address < "8064FFFF")

then
> > >> DOS SET CURRENT_SITE = "STBERNARDS"
> > >> end
> > >>
> > >> We can see the value is set during login by issuing a WRITE
> > > <CURRENT_SITE>
> > >> and pause in the script
> > >>
> > >> The issue is that the environment variable is not accessible in the
> > >> environment after the login script has processed. We have tried
> > >> SET and DOS SET and use MSINFO32.EXE to show the envionment

variables
> > >>
> > >> What type of variable should DOS SET create? User or system
> > >>
> > >> Is this an issue with XP?
> > >>
> > >> Any suggestions?!
> > >> Thanks
> > >>
> > >> A
> > >>
> > >

> >
> >

>


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: DOS SET Login Script and XP...

We're doing exactly what you're trying to do in our environment. We
detect the client IP and set an environment variable so the machine can
install ZFD apps from a local distribution source.

One thing that I found was key while testing, the environment variables
where only set correctly from the initial Novell login that comes up when
you boot your machine.

Anything I tried to set via a login script after getting to the windows
desktop would fail.

I didn't use any fancy utility to view my environment variables.. I just
launched a DOS prompt and typed SET - all by itself - hit enter and it
will display all your current variables and their vaules.


-Matt



> So.... the story is that it sets in the volatile environment, which is
> stored in HKCU\Volatile Environment, which is clearly user specific.

(MS
> Q100843 doesn't mention these...!)
>
> MSINFO32.EXE and such don't report the volatile environment and our std
> user accounts are very locked down, so we can't use much else to check.
>
> We need the variable for nal distribution rules.... so we'll just have

to
> try and build some more tests and see how they go
>
> Thanks for replies
>
> A
>
> > And place a test "SET" statement outside of the IF/Then to ensure

this is
> > not failing for some unknown reason.
> >
> > --
> > Craig Wilson - MCNE, MCSE, CCNA
> > Novell Support Forums Volunteer Sysop
> >
> > Novell does not officially monitor these forums.
> >
> > Suggestions/Opinions/Statements made by me are solely my own.
> > These thoughts may not be shared either Novell or any rational human.
> >
> > <Pjan@nospam.com> wrote in message
> > news:yHECh.2989$rL6.247@prv-forum2.provo.novell.com...
> > > Try removing the spaces, use DOS SET CURRENT_SITE="STBERNARDS"
> > >
> > > I know you can set the DOS Environment in XP, I do it today.
> > >
> > > Pjannusch
> > >
> > >> Can anyone please let me know if it is possible to set environment
> > >> variables with login scripts, and have them usable afterwards?
> > >>
> > >> Basically we need to set a variable, at login time based on network
> > > location
> > >>
> > >> i.e.
> > >> if (network_address > "80640000" and network_address < "8064FFFF")

then
> > >> DOS SET CURRENT_SITE = "STBERNARDS"
> > >> end
> > >>
> > >> We can see the value is set during login by issuing a WRITE
> > > <CURRENT_SITE>
> > >> and pause in the script
> > >>
> > >> The issue is that the environment variable is not accessible in the
> > >> environment after the login script has processed. We have tried
> > >> SET and DOS SET and use MSINFO32.EXE to show the envionment

variables
> > >>
> > >> What type of variable should DOS SET create? User or system
> > >>
> > >> Is this an issue with XP?
> > >>
> > >> Any suggestions?!
> > >> Thanks
> > >>
> > >> A
> > >>
> > >

> >
> >

>


0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.