|
This is what happens when I only write a logon script every 2 years or so. I forget how I did things the last time:
I'm trying to use If statements to get the script to check the @PRODUCTTYPE and to Run a process if there is a match.
Here's an example of my code (after looking at other examples, I realize that it's pretty amateurish, but I don't quite get the use of variables yet):
; This first portion tries to see if the OS is any version
; of Windows Server - Would like to know a more elegant way
; of doing this...By elegant I mean one that works
If @PRODUCTTYPE <> "Windows 98" OR @PRODUCTTYPE <> "Windows XP Professional"
QUIT
ENDIF
; Here I'm testing to see if the Workstation is a specific
; one and running an application if it isn't - Although
; I just read in the FAQ that it's better to change the
; LPO to force scripts to run before Explorer starts
:WORLDOXMIRROR
If @WKSTA <> "TETSUO" OR @WKSTA <> "VELMA"
RUN "C:\WORLDOX\WDMIRROR.EXE /a"
ENDIF
; Here I'm checking to see if the PC name is specific and
; running an app if it is
:WORLDOXINDEXER
If @WKSTA = "VELMA"
RUN "G:\WORLDOX\WDMIRROR.EXE /w8index /s=FK"
ENDIF
Needless to say that these bits of script are not currently working, or I wouldn't be writing this post.
Any help and explanation of said help would be most humbly appreciated.
Hmm...looks like this post might have been better put in Starters.
Edited by THX (2004-01-28 07:11 PM)
|