It could be a problem with the script, or it could be a problem with the way that you are running it.

Basics first:
  1. Add some comment code to track the script processing.
  2. Log on to the MTSCApp* server using terminal services and open a command (DOS) prompt.
  3. Run the script from the command prompt using the same method and path as you would during logon.


If there is an error in the script or in the way that you are calling it then it will remain on screen and you will see it. You will also see the progress comments, so you will know that something is happening.

Here is an example:
 Code:
$sLNRegKey="HKEY_CURRENT_USER\Software\Lotus\Notes\8.0"
If InStr(@WKSTA,"MTSCApp")=1 AND @TSSESSION
	"This is a terminal server session on MTSCApp*"+@CRLF
	If InGroup("AltLNDrive")
		"This user is in group AltLNDrive"+@CRLF
		$=WriteValue($sLNRegKey, "NotesIniPath", "G:\Lotus\Notes\Data\notes.ini", "Reg_SZ")
		$=WriteValue($sLNRegKey, "NeedCommonFiles", 1, "Reg_DWord")
	Else
		"This user is not in group AltLNDrive"+@CRLF
		$=WriteValue($sLNRegKey, "NotesIniPath", "U:\Lotus\Notes\Data\notes.ini", "Reg_SZ")
		$=WriteValue($sLNRegKey, "NeedCommonFiles", 1, "Reg_DWord")
	EndIf
Else
	"This is not a terminal server session on MTSCApp*"+@CRLF
EndIf 

Exit 0