проблема с процедурой регистрации

Обсуждение технических вопросов по продуктам Novell

проблема с процедурой регистрации

Сообщение bykov_alexis » 13 авг 2003, 17:52

Проблемма такая: нужно передать ОС (клиент под NW4.11) переменную окружения, которая ссылается на сетевой ресурс. Или хотя бы выполнить BATник, который находится там же. мозгов разобраться по справочнику не хватило
Аватара пользователя
bykov_alexis
 
Сообщения: 1
Зарегистрирован: 13 авг 2003, 17:47

Сообщение Влад А.Сокол aka Akina » 14 авг 2003, 10:08

DOS SET собсно...
Влад А.Сокол aka Akina
 
Сообщения: 1326
Зарегистрирован: 05 июн 2002, 09:24
Откуда: Зеленоград, Москва, Россия

Re: проблема с процедурой регистрации

Сообщение Юрий Арапов » 14 авг 2003, 12:50

bykov_alexis писал(а):Проблемма такая: нужно передать ОС (клиент под NW4.11) переменную окружения, которая ссылается на сетевой ресурс. Или хотя бы выполнить BATник, который находится там же. мозгов разобраться по справочнику не хватило


Если я правильно понял, то тебе нужно вставить в login script команду, которая записана в переменной среды окружения рабочей станции?

Если так то
#%<имя переменной>
или
@%<имя переменной>


Привожу выдержку из help-а к nwadmin-y
Раздел : Using Variables
    Category: DOS environment
    Identifier Variable: <variable>
    Function: Any DOS environment variable can be used in angle brackets (<path>, etc.). To use a DOS environment variable in MAP, COMSPEC, and FIRE PHASERS commands, add a percent sign (%) in front of the variable. For example: MAP S16:=%<path>

или наоборот из login script-a создать(изменить) переменную среды окружения ? Тогда DOS SET (ессно) :)

    Use SET to set an environment variable to a specified value.
    For OS/2** workstations, SET commands affect the environment only while the login script is running; the settings disappear when LOGIN terminates.

    Command Format

    [TEMP] SET name="value"
    Replace name with an environment parameter that identifies the environment you want to change.
    Replace value with identifier variable substitutions. Values must be enclosed in quotation marks.
    To change the environment for the login script, but not for the workstation itself after the login script has finished executing, use the optional keyword TEMP.
    Variables set in the login script for an OS/2 workstation affect the environment only while the login script is running. Therefore, all variables are considered TEMP with OS/2 workstations.

    Using SET

    When you use SET in a login script, you must enter quotation marks (" ") around values.
    If a variable is set to a path that ends in a ", these two characters are interpreted as an embedded quote preceded by an escape character. To avoid this problem, use two backslashes before the ending double quotes (").
    SET commands do not have to be included in login scripts. For example, you might decide that it is easier to put some SET commands in the workstation’s autoexec.bat file. Where you use SET commands depends upon your individual needs.

    This command does not work in a login script if the DOS workstation’s environment is too small. In this case, you should set the environment size in the config.sys file.
    After you use the SET command to set a value for an environment variable, you can use that variable in other login script commands.
    To include an environment variable as an identifier variable in a command, enclose the name of the variable in angle brackets (for example, <emailuser>).

    Examples

    You can use SET to make a prompt display the current directory path (such as F:\HOME\MARY>), rather than just the drive letter. To do this, add the following line to the login script:
    SET PROMPT="$P$G"
    "$P" lists the current directory path and "$G" displays a ">" (greater than) character. See your DOS or OS/2** manual for more information.
    To set a path for a program called DAILY, which is in the Reports subdirectory under drive G:, you would add the following line:

    SET PATH="G:\REPORTS\DAILY"
    This sets the variable PATH to g:\reports\daily.
    Setting the variable PATH in the login script removes any search drives previously assigned. Use SET PATH only before you map search drives. SET PATH also overwrites any paths set in the user’s autoexec.bat file.
    To display this path, you can include PATH as an identifier variable in a WRITE command by enclosing the variable (not the value) in angle brackets. For example, the following line displays "My path is G:\REPORTS\DAILY":

    WRITE "My path is ";<path>
    To include an environment variable in a MAP command, precede the variable with a percent sign (%). For example, you could include the following lines in a login script to set and map a drive to the variable NWS:
    SET NWS="C:\XYZ"
    MAP S16:=%<NWS>
Аватара пользователя
Юрий Арапов
 
Сообщения: 290
Зарегистрирован: 05 сен 2002, 11:47
Откуда: Казань


Вернуться в Novell

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 66

cron