Hello omen9,

Here is a sample for you to look at.

code:

$MYVAR = "MYAPP"
IF $MYVAR = "%WINDIR%"
ELSE
SET "$MYVAR=%WINDIR%"
ENDIF

IF @INWIN = 1
$NOTICE1 = ReadValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeText")
$NOTICE2 = ReadValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeCaption")
IF $NOTICE1 = "My Company message"
ELSE WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeText", "My Company message","REG_SZ")
ENDIF
IF $NOTICE2 = "Notice: CompanyŠ"
ELSE WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeCaption", "Notice: CompanyŠ","REG_SZ")
ENDIF
ELSE
IF EXIST("%windir%\warn.exe")
ELSE COPY "V:\warn.exe" %WINDIR%
ENDIF
$RUNWARN = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "WARN")
IF $RUNWARN = "%WINDIR%\WARN.EXE"
ELSE WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "WARN", "%WINDIR%\WARN.EXE","REG_SZ")
ENDIF
ENDIF



SET
Action
Sets environment variables in the environment of the current user (HKEY_CURRENT_USER\Environment).

Syntax
SET "variable=string"

Remarks
After any change to the environment, KiXtart informs running programs that the change was made,
prompting them to regenerate their environments. Programs that support this feature
(such as Program Manager, Task Manager, and Windows Explorer) update their environments when
they receive the WM_SETTINGCHANGE message.

The environment of the current process (KiXtart 95) is not affected.
This command does not work on Windows 9x. As an alternative, use the SHELL command to
run Winset.exe. (Winset.exe is included on the Windows 9x CD.)


------------------
NTDOC...
The dark side is quicker, easier, more seductive.
If you choose the quick and easy path, you will become an agent of evil.

[This message has been edited by NTDOC (edited 24 May 2001).]