Originally Posted By: ping82
Is there a function to remove the hyphen


Yes, but I'd still advise that you don't use GoTo.

Better to use something like Select:
 Code:
Select
   Case @WUSERID="userA"
      ; Update Registry here
   Case @WUSERID="anotheruser"
      ; Update regsitry here
   Case @WUSERID="bill" OR @WUSERID="ben" OR @WUSERID="weed-little"
      ; Update registry here
EndSelect


Better still if there are common settings among the users is to use a parameter (INI) file. Read a profile from the parameter file and only set the registry if it is true.

To do this, create an INI file on your netlogon share that looks like this:
 Originally Posted By: PARAMETER.INI

[userA]
Office=1
RemoteUser=0
DevTeam=0
[Bill]
Office=1
RemoteUser=0
DevTeam=1

Now in your script you can do this:
 Code:
$sUserProfile=@LSERVER+"\netlogon\PARAMETER.INI"
If ReadProfileString($sUserProfile,@WUSERID,"Office")
   ; Do Office reg settings
EndIf
If ReadProfileString($sUserProfile,@WUSERID,"RemoteUser")
   ; Special login coding for remote users
EndIf
If ReadProfileString($sUserProfile,@WUSERID,"DevTeam")
   ; Install development tools for DevTeam members
EndIf


Still better again, use AD groups rather than the INI file.
 Code:
If InGroup("Office Users")
   ; Do Office reg settings
EndIf
If InGroup("Remote Users")
   ; Special login coding for remote users
EndIf
If InGroup("Engineering Dev Team", "Accounting Dev Team", "Sales Dev Team")
   ; Install development tools for DevTeam members
EndIf



Finally, if you must use dodgy GoTo the simplest way to remove the hyphen is to use the Join(Split()) replace trick:
 Code:
GoTo Join(Split(@WUSERID,"-"),"")