Well you have stuff like this in the script.

set NavInstall=NavInstall + 1

This is a string and has to be in quotes just as shown
in the user manual.

This will force you to work on this script and correct
many errors but I HIGHLY recommend using the following
settings at the top of your script.

Code:

If Not @LogonMode
Break On
EndIf
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
$SO=SetOption('WrapAtEOL','On')




With that setting in your code you will no longer be able
indiscriminently place code any way you want
but must now pay attention to how you code which
will help prevent the type of errors you're seeing now.

Basically now instead of stuff like

'User is: @UserID' ?

Will now need to be written something like this

'User is: ' + @UserID ?