I'm having a problem figuring out how to remove the GOTO's in my script.
Although I've used KIX for a number of years I use it to do very basic scripting and ny no means am I coder what so ever.

I would like to remove the GOTO's and maybe clean things up a little....any help is appreciated.

;*************************************************************************
; Script Name: ver423.kix
; Author: Chris Beggs
; Date: 02/14/2005
; Description:
;*************************************************************************
;
;Set Variables
$user =@USERID
$primary =@PRIMARYGROUP
$os_dos =@DOS
$OS = Split(@PRODUCTTYPE)[1]
$CSD = Val(Right(@CSD,1))
$HKLMSCCS ="HKLM\SYSTEM\CurrentControlSet"
$HKCUSMWCV ="HKCU\Software\Microsoft\Windows\CurrentVersion"
$HKLMSMWCV ="HKLM\Software\Microsoft\Windows\CurrentVersion"
$HKLMSMWNTCV ="HKLM\Software\Microsoft\Windows NT\CurrentVersion"
$HKCUSMWNTCV ="HKCU\Software\Microsoft\Windows NT\CurrentVersion"
;
;*************************************************************************
; Run logon scripts visable
;
If @INWIN = ("1")
WriteValue("$HKLMSMWNTCV\winlogon","RunLogonScriptSync","1","REG_DWORD")
EndIf
;*************************************************************************
; Display Initial Greeting To User
CLS
?
Color w+/n
? "*****************************************************************"
? "Welcome to the ROK network."
? "Today is " + @DAY + ", " + @MONTH + " " + @MDAYNO + "."
? "*****************************************************************"
? "Hello " + @FULLNAME + "."
? "You are logged onto the " + @DOMAIN + " domain as " + @USERID + "."
? "Your access level on the domain is " + @PRIV + "."
;? "Your logon server is " + @LSERVER + "
? "You are running " + @PRODUCTTYPE + " SP " + " $csd "
$expire = (@MAXPWAGE - @PWAGE - 1)
? "Your password is " + @PWAGE + " days old and will expire in " + $expire + " days."
? "*****************************************************************"
Color w+/n
?
Sleep 15
;*************************************************************************
; Delete all drive mappings
Use "*" /DELETE /PERSISTENT
If @INWIN =2
DelTree("$hkcu\network\persistent")
EndIf
;*************************************************************************
; Map users home drive For Roberts
Select
Case InGroup("209 Manitou") = 1
Use H: "\\HYPERION\USERS\" + @USERID /persistent
Case InGroup("855 TRILLIUM") = 1
Use G: "\\APOLLO\USERS\" /persistent
If @INWIN = ("2") ;Windows 16 bit OS
EndIf
Case InGroup("209 Manitou") = 1
Use H: "\\HYPERION\USERS\"+ @USERID /persistent
InGroup("855 TRILLIUM") = 1
Use G: "\\APOLLO\USERS\" /persistent
EndSelect
;*************************************************************************
; ; Primary Group Mappings
Select
Case InGroup ("Roberts Estimating") = 1
Use t: "\\hyperion\estimating$"
Case InGroup ("Roberts AC Full Permissions") = 1
Use t: "\\hyperion\airconditioning$"
Case InGroup ("Roberts Mechanical") = 1
Use t: "\\hyperion\mechanical$"
Case InGroup ("Roberts Electrical") = 1
Use t: "\\hyperion\electrical$"
Case InGroup ("Roberts IT") = 1
Use t: "\\hyperion\apps$"
Case InGroup ("Roberts Reception") = 1
Use t: "\\hyperion\reception$"
EndSelect
;*************************************************************************
;
;Secondary Mappings
;*************************************************************************
:sec_1
If InGroup ( "Roberts Accounting" )
If @PRIMARYGROUP = "Roberts Accounting"
GoTo "sec_2"
Use s: "\\hyperion\accounting$"
EndIf
EndIf
;*************************************************************************
:sec_2
If InGroup ( "Roberts Estimating" )
If @PRIMARYGROUP = "Roberts Estimating"
GoTo "sec_3"
Use s: "\\hyperion\estimating$"
EndIf
EndIf
;*************************************************************************
:sec_3
If InGroup ( "Roberts AC Full Permissions" )
If @PRIMARYGROUP = "Roberts AC Full Permissions"
GoTo "sec_4"
Use s: "\\hyperion\airconditioning$"
EndIf
EndIf
;*************************************************************************
:sec_4
If InGroup ( "Roberts AC Read Only Permissions" )
If InGroup ( "Roberts AC Full Permissions" )
GoTo "sec_5"
Use s: "\\hyperion\airconditioning$"
EndIf
EndIf
;*************************************************************************
:sec_5
If InGroup ( "Roberts Mechanical" )
If @PRIMARYGROUP = "Roberts Mechanical"
GoTo "sec_6"
Use s: "\\hyperion\mechanical$"
EndIf
EndIf
;*************************************************************************
:sec_6
If InGroup ( "Roberts Electrical" )
If @PRIMARYGROUP = "Roberts Electrical"
GoTo "sec_7"
Use s: "\\hyperion\electrical$"
EndIf
EndIf
;*************************************************************************
:sec_7
If InGroup ( "Roberts IT" )
If @PRIMARYGROUP = "Roberts IT"
GoTo "sec_8"
Use s: "\\hyperion\apps$"
EndIf
EndIf
;*************************************************************************
:sec_8
If InGroup ( "Roberts Reception" )
If @PRIMARYGROUP = "Roberts Reception"
GoTo "sec_9"
Use s: "\\hyperion\reception$"
EndIf
EndIf
;*************************************************************************
:sec_9
If InGroup ( "Roberts Time and Material" )
Use n: "\\wmest\tandm$"
EndIf
;*************************************************************************
:sec_10
If InGroup ( "Roberts Change Order" )
Use o: "\\hyperion\changeorder$"
EndIf
;*************************************************************************
:sec_11
If InGroup ( "Roberts Databases" )
Use x: "\\hyperion\databases$"
EndIf
;*************************************************************************
:sec_12
If InGroup ( "Roberts Payroll" )
Use p: "\\hyperion\payroll$"
EndIf
;*************************************************************************
:sec_13
If InGroup ( "Roberts Quotes" )
Use q: "\\hyperion\quotes$"
EndIf
;*************************************************************************
:sec_14
If InGroup ( "Roberts Accounting" )
Use s: "\\hyperion\accounting$"
EndIf
;*************************************************************************
:sec_15
If InGroup ( "Roberts Company" )
Use w: "\\hyperion\company$"
EndIf
;*************************************************************************
:sec_16
If InGroup ( "Jonas_Users" )
Use J: "\\Rhea\Jonas"
EndIf
;*************************************************************************
:sec_17
If InGroup ( "Roberts IT" )
Use g: "\\cronus\c$\WINDOWS\sysvol\sysvol\ROK.ca\scripts"
EndIf
;*************************************************************************
:sec_18
If InGroup ( "On Site Company" )
Use w: "\\hyperion\company$"
EndIf
;*************************************************************************
:sec_19
If InGroup ( "Roberts Electrical Estimating" )
Use M: "\\wmest\electrical"
EndIf
;*************************************************************************
:sec_20
If InGroup ( "Roberts Mechanical Estimating" )
Use M: "\\wmest\Mechanical"
EndIf
;*************************************************************************
:sec_21
If InGroup ( "Roberts On Site ROE" )
Use R: "\\hyperion\laserroe"
EndIf
;*************************************************************************
:sec_22
If InGroup ( "Roberts ROE" )
Use g: "\\hyperion\wmrroe"
EndIf
;*************************************************************************
:sec_23
If InGroup ( "Roberts Lisa and Dan" )
Use i: "\\hyperion\lisadan$"
EndIf
;*************************************************************************
:sec_25
If InGroup ( "Roberts Kearsley ROE" )
Use U: "\\hyperion\kelroe$"
EndIf
;*************************************************************************
:sec_26
If InGroup ( "CADUsers" )
Use U: "\\hyperion\CAD$"
EndIf
;*************************************************************************
:sec_27
If InGroup ( "Roberts AC drive mapping" )
Use K: "\\hyperion\airconditioning$"
EndIf
;*************************************************************************
:sec_28
If InGroup ( "Roberts Tand M Kearsley" )
Use I: "\\apollo\databases"
EndIf
;*************************************************************************
:sec_29
If InGroup ( "Roberts Tand M Kearsley" )
Use L: "\\apollo\jobdata"
EndIf
;*************************************************************************
:sec_30
If @USERID = "Shana"
Use M: "\\hyperion\electrical$"
EndIf
;*************************************************************************
:sec_31
If InGroup ( "Maximizer" )
Use M: "\\wmest\maximizer$"
EndIf
;*************************************************************************
:sec_32
If InGroup ( "KE_DB" )
Use H: "\\apollo\DATABASES"
EndIf
;*************************************************************************
:sec_33
If InGroup ( "KE_Jobdata" )
Use Y: "\\apollo\JOBDATA"
EndIf
;*************************************************************************
:sec_34
If InGroup ( "KE_Apps" )
Use Q: "\\apollo\APPS"
EndIf
;*************************************************************************
:sec_35
If InGroup ( "Roberts IT" )
Use z: "\\rhea\d$\chris\music"
EndIf
;*************************************************************************
:END
Exit