Home

Results 1 to 6 of 6

Thread: DOS SET Login Script and XP...

Hybrid View

  1. #1
    a@cl.nu NNTP User

    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


  2. #2
    Pjan@nospam.com NNTP User

    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
    >



  3. #3
    Craig Wilson NNTP User

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

    >




  4. #4
    a@cl.nu NNTP User

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

    > >

    >
    >



  5. #5
    pjan@nospam.com NNTP User

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

    > >
    > >

    >



  6. #6
    matt.colwell@nospam.sduhsd.net NNTP User

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

    > >
    > >

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •