You need to have an equal amounts of quotes..

Code:

$backupsw=' /n "computerstate" /d "computerstate" /n "computerstate" /v:yes /r:no /rs:no '
$backupsw=$backupsw+'/hc:off /m copy /j "backup" /l:s /f "d:\backup\'+@wksta+'systemstate.bkf"
IF EXIST ("\\SVRBACKUP2\"+$SHAREVAR+"\"+$SHAREVAR+".TXT")
shell '"C:\WINDOWS\system32\ntbackup.exe backup @@D:\backup\script.bks"'+$backupsw
ENDIF



Also, if you use $ and @ in your script, they need to be either segregated out or doubled up.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's