Page 3 of 3 <123
Topic Options
#143262 - 2005-07-08 09:35 PM Re: Trackit and Citrix Metaframe XP
NKK Offline
Fresh Scripter

Registered: 2003-03-17
Posts: 37
Loc: Marshall Texas
THANKS! Your are all geniuses!
Top
#143263 - 2005-07-08 09:43 PM Re: Trackit and Citrix Metaframe XP
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
sounds like it's working...glad to help
Top
#143264 - 2005-07-08 09:54 PM Re: Trackit and Citrix Metaframe XP
NKK Offline
Fresh Scripter

Registered: 2003-03-17
Posts: 37
Loc: Marshall Texas
Thanks for your patience!
Top
#143265 - 2005-07-09 12:55 AM Re: Trackit and Citrix Metaframe XP
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Well here is the code re-written some with notes.
Personally I didn't look it over that much but the CITRIX script doesn't look all that different then the main script.

 
Break On
Dim $h,$s,$Desktop
CLS


'Checking for Terminal Server session: ' ?
If ProductSuite("Terminal Server") And Not ProductSuite("Single User Terminal Server")
'This is a Terminal Server Session: ' ?
Sleep 5
Call '\\norit-americas.com\netlogon\Citrixmap.kix'
Exit 0
Else
;This is NOT a Terminal Server Session do not call the citrix script
EndIf
Sleep 5


;Start script for non Citrix users
SMALL
Color b+/n
BOX (0,0,24,79,GRID) ; background grid
Color b/n
BOX (2,3,13,77,Å) ; shadow of the box
Color g+/n
BOX (1,2,12,76,FULL) ; Green box
Color b+/n
If ((@TIME > "00:00:00") And (@TIME < "12:00:00"))
AT(10,5) "Good Morning " + @FullName
AT(11,5) "You are entering the " + @DOMAIN + " domain."
Color b+/n
Else
Color r+/n
If ((@TIME > "12:00:00") And (@TIME < "18:00:00"))
AT(10,5) "Good Afternoon " + @FullName
AT(11,5) "You are entering the " + @DOMAIN + " domain."
Color r+/n
Else
AT(10,5) "Good Evening " + @FullName
AT(11,5) "You are entering the " + @DOMAIN + " domain."
Color b+/n
EndIf
EndIf
Color w+/n
At (2,5) "Userid : " ; display some text strings
At (3,5) "Full name : "
At (4,5) "Privilege : "
At (5,5) "Workstation : "
At (6,5) "Domain : "
At (7,5) "Logon Server : "
At (8,5) "Current Time : "
At (9,5) "Today's Date : "
Color y+/n
At (2,20) @UserID ; ...and some macro's
At (3,20) @FullName
At (4,20) @Priv
At (5,20) @WkSta
At (6,20) @Domain
At (7,20) @LServer
At (8,20) @Time
At (9,20) @Date


;Now display some legal information
Sleep 5
CLS
SMALL
Color b+/n
BOX (0,0,24,79,GRID) ; background grid
Color b/n
BOX (2,3,13,77,Å) ; shadow of the box
Color g+/n
BOX (1,2,12,76,FULL) ; Green box
Color r+/n
At (2,5) "XCOMPANY Americas Inc."
At (3,5) "Intended for XCOMPANY Employee use only."
At (4,5) "All intruders will be prosecuted to"
At (5,5) "the fullest extent of the law."


Sleep 5


;SetTime $Server3
;$Server3 is not set or declared anywhere that I see


;:set_vars
;No need to use labels
;$section=$section+1 ; Section 2
;See no reason in the code so far for the $Section variable


Use "*" /delete /persistent
;This will delete all drive mappings every logon for all users


;You set these variables but then don't ever call or use them
;$h="\\wmcfps02\"+@UserID
;$s="\\wmcfps01\@PRIMARYGROUP"


CLS
At (12,30) "Mapping Drives"
Sleep 3


;Set the variable $Desktop for future use
$Desktop = ExpandEnvironmentVars(ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders','Desktop'))




; For Marshall
If InGroup("XX-Everyone")
;No need for this code as the code above removes all drive mappings
;for all users already
;use g: /delete/persistent
;use l: /delete/persistent
;use p: /delete/persistent
use h: "\\xx-fs\Marshall\home\"+@UserID
use g: "\\xx-fs\Marshall\depts"
use l: "\\xx-fs\Enterprise"
use p: "\\xx-fs\Marshall\policies"
;use f: /delete/persistent
use f: "\\xx-fs\marshall"
EndIf


; PRYOR
If InGroup("OK-Everyone")
use h: "\\xx-fs\Pryor\home\"+@UserID
use g: "\\xx-fs\Pryor\depts"
use l: "\\xx-fs\Enterprise"
use f: "\\xx-fs\Pryor"
EndIf


;MACOLA
if ingroup("XX-Macola Access")
Use M: /delete
USE M: "\\Xx-Apps\Apps"
endif


;MAPCON
If InGroup("XX-Mapcon")
;All drives are already unmapped from above code
;Use O: /delete
USE O: "\\Xx-Apps\Apps2"
Copy "\\xcompany-americas.com\netlogon\shortcuts\mapcon.lnk" $Desktop
EndIf


; ISO QUALITY SYSTEM
If InGroup("XX-Everyone")
Copy "\\xcompany-americas.com\netlogon\shortcuts\ISO Index.lnk" $Desktop
EndIf


; PRODUCTION PRINTER
If InGroup("XX-Production-All")
AddPrinterConnection("\\xx-dc2\xx-plant central control-dell laser-ps")
EndIf


; BEMIS PRINTER
If InGroup("XX-Bemis")
AddPrinterConnection("\\xx-dc2\xx-plant-bemis-HP5N")
EndIf


; LIMS
If InGroup("XX-LIMS")
Copy "\\xcompany-americas.com\netlogon\shortcuts\lims.lnk" $Desktop
EndIf


;ORDERS
If InGroup("XX-Orders")
Copy "\\xcompany-americas.com\netlogon\shortcuts\orders schedule database.lnk" $Desktop
EndIf


;QUALITY
If InGroup("XX-Quality-System-DB")
Copy "\\xcompany-americas.com\netlogon\shortcuts\Quality System Database.lnk" $Desktop
EndIf


;PRODUCTION Database Read Write
If Ingroup("XX-Production-Database-RW")
Copy "\\xcompany-americas.com\netlogon\shortcuts\Production Database.lnk" $Desktop
EndIf


;PRODUCTION Database for PLANT Users
If InGroup("XX-Production-Database-Plant")
Copy "\\xcompany-americas.com\netlogon\shortcuts\productiondb.lnk" $Desktop
AddPrinterConnection("\\xx-dc2\xx-plant central control-dell laser-ps")
EndIf


;TRAINING
If InGroup("XX-Everyone")
Copy "\\xcompany-americas.com\netlogon\shortcuts\Xcompany Training.url" $Desktop
EndIf


;TRACKIT Uninstall
If InGroup("Uninstall-Trackit")
;All drives should already be unmapped from above code
;use T: /delete/persistent
use T: "\\xx-apps2\intuit\Track-IT! 6.5\Track-It! Server - Professional Edition"


;If you use SHELL it should wait until the process is completed before
;returning to the script
;RUN 'T:\installers\workstationmanager\tiwsmgr.exe /uninstall'
"Please WAIT * Uninstall Trackit Running here" ?
SHELL '%comspec% /e:1024 /c T:\installers\workstationmanager\tiwsmgr.exe /uninstall'
;Don't think it should be needed. Also why not check to verify if the
;software is even installed before calling an uninstall
;SLEEP 20
EndIf


;MARSHALL TRACKIT Tiwsmgr
If InGroup("XX-Everyone")
use T: /delete/persistent
use T: "\\xx-apps2\intuit\Track-IT! 6.5\Track-It! Server - Professional Edition"
"Please WAIT * Trackit Service Installing" ?
SHELL '%comspec% /e:1024 /c T:\installers\workstationmanager\tiwsmgr.exe /service'
;RUN 'T:\installers\workstationmanager\tiwsmgr.exe /service'
;No need to sleep with the Shell


;Users probably need to have local Admin rights to install software
;but you don't even check
;SLEEP 6
Endif


;TRACKIT Audit32
If InGroup("XX-Everyone")
use T: /delete/persistent
use T: "\\xx-apps2\intuit\Track-IT! 6.5\Track-It! Server - Professional Edition"
"Please WAIT * Trackit Audit Running. This will run once a day at LOGIN" ?
SHELL '%comspec% /e:1024 /c T:\Audit32.exe /m /q'
;RUN 'T:\Audit32.exe /m /q'
;No need to sleep with Shell
;SLEEP 4
EndIf


;PRYOR TRACKIT Tiwsmgr
If InGroup("OK-Trackit")
use T: /delete/persistent
use T: "\\xx-apps2\intuit\Track-IT! 6.5\Track-It! Server - Professional Edition"
SHELL '%comspec% /e:1024 /c T:\installers\workstationmanager\tiwsmgr.exe /service'
"Please WAIT * Trackit Service Installing" ?
;Certainly you must get errors by running this every logon
;RUN 'T:\installers\workstationmanager\tiwsmgr.exe /service'
;No need for Sleep with Shell I don't think
;SLEEP 30
EndIf


;******* User Defined Functions ****************
;***********************************************


Function ProductSuite ($Product)
Dim $Product
Select
Case $Product = "None" $x=0
Case $Product = "Small Business" $x=1
Case $Product = "Enterprise" $x=2
Case $Product = "BackOffice" $x=4
Case $Product = "CommunicationServer" $x=8
Case $Product = "Terminal Server" $x=16
Case $Product = "Small Business (Restricted)" $x=32
Case $Product = "Embedded NT" $x=64
Case $Product = "DataCenter" $x=128
Case $Product = "Single User Terminal Server" $x=256
Case $Product = "Home Edition" $x=512
Case $Product = "Blade Server" $x=1024
Case 1 Exit 1
EndSelect
If ($x & Val(@ProductSuite))
$ProductSuite = 1
Else
$ProductSuite = 0
EndIf
Endfunction


 

Top
#143266 - 2005-07-09 10:33 PM Re: Trackit and Citrix Metaframe XP
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
And I hope you've been using DEBUG ON for allthe debugging you've done. That should have identified a lot of the issues.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 3 of 3 <123


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 259 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.06 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org