Jump to content

Environment variable or similar to "description" field


Recommended Posts

Guest Doomer
Posted

I wish to control bia logon script the field "description" on my

workstations, but I not found an environment variable or something to

read that from the dos prompt.

 

How can I do that?

 

Actually I'm creating a new variable with my value needed, with this way

I can inform "if" and "if not" commands to customise my logon script. Is

is possible to do that using "description" field? Thanks a lot!

 

--

Ivan Carlos - Chief Information & Security Officer

E-mail / Skype / WLM: icarlos@icarlos.net

Cell.: +55 (11) 8112-0666

  • Replies 6
  • Created
  • Last Reply
Guest Pegasus \(MVP\)
Posted

Re: Environment variable or similar to "description" field

 

 

"Doomer" <icarlos@icarlos.net> wrote in message

news:O1eXpIhkIHA.3940@TK2MSFTNGP05.phx.gbl...

>I wish to control bia logon script the field "description" on my

>workstations, but I not found an environment variable or something to read

>that from the dos prompt.

>

> How can I do that?

>

> Actually I'm creating a new variable with my value needed, with this way I

> can inform "if" and "if not" commands to customise my logon script. Is is

> possible to do that using "description" field? Thanks a lot!

>

> --

> Ivan Carlos - Chief Information & Security Officer

> E-mail / Skype / WLM: icarlos@icarlos.net

> Cell.: +55 (11) 8112-0666

 

You probably can but it depends where this "description" field is.

Where exactly did you enter this information?

Guest Doomer
Posted

Re: Environment variable or similar to "description" field

 

I'm talking about "computer description" field, you can set it up in

system window with the computer name and domain

 

Thanks

 

Ivan Carlos - Chief Information & Security Officer

E-mail / Skype / WLM: icarlos@icarlos.net

Cell.: +55 (11) 8112-0666

 

Pegasus (MVP) wrote:

> "Doomer" <icarlos@icarlos.net> wrote in message

> news:O1eXpIhkIHA.3940@TK2MSFTNGP05.phx.gbl...

>> I wish to control bia logon script the field "description" on my

>> workstations, but I not found an environment variable or something to read

>> that from the dos prompt.

>>

>> How can I do that?

>>

>> Actually I'm creating a new variable with my value needed, with this way I

>> can inform "if" and "if not" commands to customise my logon script. Is is

>> possible to do that using "description" field? Thanks a lot!

>>

>> --

>> Ivan Carlos - Chief Information & Security Officer

>> E-mail / Skype / WLM: icarlos@icarlos.net

>> Cell.: +55 (11) 8112-0666

>

> You probably can but it depends where this "description" field is.

> Where exactly did you enter this information?

>

>

Guest Pegasus \(MVP\)
Posted

Re: Environment variable or similar to "description" field

 

You can't do this in DOS (which is a legacy 16-bit operating

system introduced some 30 years ago) but you can do it under

the Windows Command Prompt like so:

 

@echo off

for /f "tokens=3*" %%a in ('net config server ^| find /i "Server Comment"')

do set Desc=%%a %%b

 

This will work for servers and for workstations.

 

 

"Doomer" <icarlos@icarlos.net> wrote in message

news:erNy88nkIHA.1212@TK2MSFTNGP05.phx.gbl...

> I'm talking about "computer description" field, you can set it up in

> system window with the computer name and domain

>

> Thanks

>

> Ivan Carlos - Chief Information & Security Officer

> E-mail / Skype / WLM: icarlos@icarlos.net

> Cell.: +55 (11) 8112-0666

>

> Pegasus (MVP) wrote:

>> "Doomer" <icarlos@icarlos.net> wrote in message

>> news:O1eXpIhkIHA.3940@TK2MSFTNGP05.phx.gbl...

>>> I wish to control bia logon script the field "description" on my

>>> workstations, but I not found an environment variable or something to

>>> read that from the dos prompt.

>>>

>>> How can I do that?

>>>

>>> Actually I'm creating a new variable with my value needed, with this way

>>> I can inform "if" and "if not" commands to customise my logon script. Is

>>> is possible to do that using "description" field? Thanks a lot!

>>>

>>> --

>>> Ivan Carlos - Chief Information & Security Officer

>>> E-mail / Skype / WLM: icarlos@icarlos.net

>>> Cell.: +55 (11) 8112-0666

>>

>> You probably can but it depends where this "description" field is.

>> Where exactly did you enter this information?

Guest Doomer
Posted

Re: Environment variable or similar to "description" field

 

Thanks a lot, I'm trying to understand but in all cases I receive "%%a

was unexpected at this time." error

 

I understood that I can set

"NET CONFIG SERVER /Srvcomment:"MyCommentText""

via logon script, but I'm not finding a way to read that value via prist

prompt or script logon, all tries result the same error above

 

Can u help me?

 

Thanks again

 

Ivan Carlos - Chief Information & Security Officer

E-mail / Skype / WLM: icarlos@icarlos.net

Cell.: +55 (11) 8112-0666

 

Pegasus (MVP) wrote:

> You can't do this in DOS (which is a legacy 16-bit operating

> system introduced some 30 years ago) but you can do it under

> the Windows Command Prompt like so:

>

> @echo off

> for /f "tokens=3*" %%a in ('net config server ^| find /i "Server Comment"')

> do set Desc=%%a %%b

>

> This will work for servers and for workstations.

>

>

> "Doomer" <icarlos@icarlos.net> wrote in message

> news:erNy88nkIHA.1212@TK2MSFTNGP05.phx.gbl...

>> I'm talking about "computer description" field, you can set it up in

>> system window with the computer name and domain

>>

>> Thanks

>>

>> Ivan Carlos - Chief Information & Security Officer

>> E-mail / Skype / WLM: icarlos@icarlos.net

>> Cell.: +55 (11) 8112-0666

>>

>> Pegasus (MVP) wrote:

>>> "Doomer" <icarlos@icarlos.net> wrote in message

>>> news:O1eXpIhkIHA.3940@TK2MSFTNGP05.phx.gbl...

>>>> I wish to control bia logon script the field "description" on my

>>>> workstations, but I not found an environment variable or something to

>>>> read that from the dos prompt.

>>>>

>>>> How can I do that?

>>>>

>>>> Actually I'm creating a new variable with my value needed, with this way

>>>> I can inform "if" and "if not" commands to customise my logon script. Is

>>>> is possible to do that using "description" field? Thanks a lot!

>>>>

>>>> --

>>>> Ivan Carlos - Chief Information & Security Officer

>>>> E-mail / Skype / WLM: icarlos@icarlos.net

>>>> Cell.: +55 (11) 8112-0666

>>> You probably can but it depends where this "description" field is.

>>> Where exactly did you enter this information?

>

>

Guest Pegasus \(MVP\)
Posted

Re: Environment variable or similar to "description" field

 

Your newsreader probably wrapped the lines of my batch

file. It consists of exactly two lines, hence you must unwrap

line #2!

 

 

"Doomer" <icarlos@icarlos.net> wrote in message

news:OF3mUlokIHA.4140@TK2MSFTNGP04.phx.gbl...

> Thanks a lot, I'm trying to understand but in all cases I receive "%%a was

> unexpected at this time." error

>

> I understood that I can set

> "NET CONFIG SERVER /Srvcomment:"MyCommentText""

> via logon script, but I'm not finding a way to read that value via prist

> prompt or script logon, all tries result the same error above

>

> Can u help me?

>

> Thanks again

>

> Ivan Carlos - Chief Information & Security Officer

> E-mail / Skype / WLM: icarlos@icarlos.net

> Cell.: +55 (11) 8112-0666

>

> Pegasus (MVP) wrote:

>> You can't do this in DOS (which is a legacy 16-bit operating

>> system introduced some 30 years ago) but you can do it under

>> the Windows Command Prompt like so:

>>

>> @echo off

>> for /f "tokens=3*" %%a in ('net config server ^| find /i "Server

>> Comment"') do set Desc=%%a %%b

>>

>> This will work for servers and for workstations.

>>

>>

>> "Doomer" <icarlos@icarlos.net> wrote in message

>> news:erNy88nkIHA.1212@TK2MSFTNGP05.phx.gbl...

>>> I'm talking about "computer description" field, you can set it up in

>>> system window with the computer name and domain

>>>

>>> Thanks

>>>

>>> Ivan Carlos - Chief Information & Security Officer

>>> E-mail / Skype / WLM: icarlos@icarlos.net

>>> Cell.: +55 (11) 8112-0666

>>>

>>> Pegasus (MVP) wrote:

>>>> "Doomer" <icarlos@icarlos.net> wrote in message

>>>> news:O1eXpIhkIHA.3940@TK2MSFTNGP05.phx.gbl...

>>>>> I wish to control bia logon script the field "description" on my

>>>>> workstations, but I not found an environment variable or something to

>>>>> read that from the dos prompt.

>>>>>

>>>>> How can I do that?

>>>>>

>>>>> Actually I'm creating a new variable with my value needed, with this

>>>>> way I can inform "if" and "if not" commands to customise my logon

>>>>> script. Is is possible to do that using "description" field? Thanks a

>>>>> lot!

>>>>>

>>>>> --

>>>>> Ivan Carlos - Chief Information & Security Officer

>>>>> E-mail / Skype / WLM: icarlos@icarlos.net

>>>>> Cell.: +55 (11) 8112-0666

>>>> You probably can but it depends where this "description" field is.

>>>> Where exactly did you enter this information?

>>

Guest Doomer
Posted

Re: Environment variable or similar to "description" field

 

My fault, thanks, thanks a lot!

 

Now I can work with these results =)

 

Ivan Carlos - Chief Information & Security Officer

E-mail / Skype / WLM: icarlos@icarlos.net

Cell.: +55 (11) 8112-0666

 

Pegasus (MVP) wrote:

> Your newsreader probably wrapped the lines of my batch

> file. It consists of exactly two lines, hence you must unwrap

> line #2!

>

>

> "Doomer" <icarlos@icarlos.net> wrote in message

> news:OF3mUlokIHA.4140@TK2MSFTNGP04.phx.gbl...

>> Thanks a lot, I'm trying to understand but in all cases I receive "%%a was

>> unexpected at this time." error

>>

>> I understood that I can set

>> "NET CONFIG SERVER /Srvcomment:"MyCommentText""

>> via logon script, but I'm not finding a way to read that value via prist

>> prompt or script logon, all tries result the same error above

>>

>> Can u help me?

>>

>> Thanks again

>>

>> Ivan Carlos - Chief Information & Security Officer

>> E-mail / Skype / WLM: icarlos@icarlos.net

>> Cell.: +55 (11) 8112-0666

>>

>> Pegasus (MVP) wrote:

>>> You can't do this in DOS (which is a legacy 16-bit operating

>>> system introduced some 30 years ago) but you can do it under

>>> the Windows Command Prompt like so:

>>>

>>> @echo off

>>> for /f "tokens=3*" %%a in ('net config server ^| find /i "Server

>>> Comment"') do set Desc=%%a %%b

>>>

>>> This will work for servers and for workstations.

>>>

>>>

>>> "Doomer" <icarlos@icarlos.net> wrote in message

>>> news:erNy88nkIHA.1212@TK2MSFTNGP05.phx.gbl...

>>>> I'm talking about "computer description" field, you can set it up in

>>>> system window with the computer name and domain

>>>>

>>>> Thanks

>>>>

>>>> Ivan Carlos - Chief Information & Security Officer

>>>> E-mail / Skype / WLM: icarlos@icarlos.net

>>>> Cell.: +55 (11) 8112-0666

>>>>

>>>> Pegasus (MVP) wrote:

>>>>> "Doomer" <icarlos@icarlos.net> wrote in message

>>>>> news:O1eXpIhkIHA.3940@TK2MSFTNGP05.phx.gbl...

>>>>>> I wish to control bia logon script the field "description" on my

>>>>>> workstations, but I not found an environment variable or something to

>>>>>> read that from the dos prompt.

>>>>>>

>>>>>> How can I do that?

>>>>>>

>>>>>> Actually I'm creating a new variable with my value needed, with this

>>>>>> way I can inform "if" and "if not" commands to customise my logon

>>>>>> script. Is is possible to do that using "description" field? Thanks a

>>>>>> lot!

>>>>>>

>>>>>> --

>>>>>> Ivan Carlos - Chief Information & Security Officer

>>>>>> E-mail / Skype / WLM: icarlos@icarlos.net

>>>>>> Cell.: +55 (11) 8112-0666

>>>>> You probably can but it depends where this "description" field is.

>>>>> Where exactly did you enter this information?

>


×
×
  • Create New...