|
|
|||||||
Situation. I am using a pgm called Trackit to audit users computers and audit their system. I want this to only happen on their local computers. Our remote users login to their local computer and then start a citrix session - I do not want the user to run the part of the Kix script that runs Trackit if they are logging onto a Citrix session they need to run the rest of the script to get their mappings, etc. Remote users local computers have either win2k or winxp on them. Thanks. |
||||||||
|
|
|||||||
the new 4.50 version of Kix has a new Citrix/term service macro. |
||||||||
|
|
|||||||
Even if you don't use the latest version, there is a FAQ that covers this topic. |
||||||||
|
|
|||||||
If I add this to the top of my Main login Script - it is suppose to check if the users is logging into local or a Citrix Session. If it is a Citrix session it is suppose to call the Citrix Script for mapping drives. What is wrong with this code? Thanks from a new scripter. CODE ; Determine if Logging into Citrix or Local Function ProductSuite ($Product) Dim $Product SELECT Case $Product = "None" Select $x=0 Case $Product = "Small Business" $x=1 Case $Product = "Enterprise" $x=2 Case $Product = "BackOffice" $x=4 Case $Product = "CommunicationsServer" $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 $RC=MessageBox ("Invalid parameter used in function ProductSutie ($Product)",48 WriteLog("Invalid parameter used in function ProductSuite ($Product)") Endselect $ProdcutSuite = $x & val(@ProductSuite) Endfunction If ProductSuite("Terminal Server") and not ProductSuite("Singel User Terminal Server") CallScript("$HomeDrive\Citrixmap.kix") endif EXIT |
||||||||
|
|
|||||||
I am using Kix32.exe from 12/28/04 |
||||||||
|
|
|||||||
You need a spellchecker. ("Singel User Terminal Server") |
||||||||
|
|
|||||||
Les ??? Single is correct spelling, is it not? |
||||||||
|
|
|||||||
When I test run the script I see "Invaild Method/function call:missing comma" Missing where? |
||||||||
|
|
|||||||
I am trying to find where I saw this example of script so I can proof mine. Les you wrote it, I think. Where is it? Thanks. |
||||||||
|
|
|||||||
this? Citrix FAQ Also, "Single" is the correct spelling, "Singel" is not. Look at the code you posted again. Code:
|
||||||||
|
|
|||||||
Ok got that fixed now I am getting the no ENDFUNCTION for FUNCTION Productsuite |
||||||||
|
|
|||||||
copy and paste issues? Case 1 $RC=MessageBox ("Invalid parameter used in function ProductSutie ($Product)",48) also, it looks like that function is using the WriteLog() UDF . May just want to comment (;) that line out or copy the udf and put it in your script... |
||||||||
|
|
|||||||
Probably maciep. Still getting "Missing Endfunction". |
||||||||
|
|
|||||||
What's the select doing in this line: Code: Case $Product = "None" Select $x=0 That's gonna cause you problems too. |
||||||||
|
|
|||||||
definitely copy and paste issues... Code:
by the way, the "missing endfunction" error is probably being caused because the messagebox call is going across two lines which is f-ing up the quotes |
||||||||
|
|
|||||||
Have no idea. Got script example from this website. Just trying to: Users login to local computer get #1 Kix script that runs Trackit pgm Remote users then start a Citrix XP session and do NOT need to run the Trackit pgm, just the rest of the script for drive mappings. Maybe I can take all the "case" statements out except the one for "Single User Terminal Server" and see if it will work. I am very ignorant at this point. Sorry. |
||||||||
|
|
|||||||
There is something wrong with the syntax - Missing ENDFUNCTION error. |
||||||||
|
|
|||||||
did you read my "by the way" above? repost the code you are using. |
||||||||
|
|
|||||||
It is something wrong with the msg line - I commented it out and the script is running, at least on local computer. Going to test on Citrix login. |
||||||||
|
|
|||||||
this Code:
needs to be this Code:
|
||||||||
|
|
|||||||
Following is code for script. user just logging into local computer - run all the script including the trackit statements user logging into citrix session call the citrixmap.kix script runs everything BUT the trackit and quit. Not working goes all the way through to trackit no matter if logging into local or citrix session. Just the first section of added code needs to be reviewed and how I end the Citrixmap.kix script. I really appreciate all of you and your patience with my ignorance - I always heard "Stupid is forever; Ignorance can be fixed". (CODE) ; LOG-IN SCRIPT ; Determine if Logging into Citrix or Local ******NEWLY ADDED CODE ********************************************** 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 = "CommunicationsServer" $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 $RC=MessageBox ("Invalid parameter used in ;function")ProductSuite($Product)",48 ; WriteLog("Invalid parameter used in function") ProductSuite ($Product)") Endselect $ProdcutSuite = $x & val (@ProductSuite) EndFunction If ProductSuite("Terminal Server") and not ProductSuite("Single User Terminal Server") CallScript("\\xcompany-americas.com\netlogon\Citrixmap.kix") endif ***********END OF NEWLY ADDED CODE ****************************************** CLS $section=1 ;Section 1 Color c+/n Box (0,0,24,79,single) Color r+/n At (10,30) "Welcome to the" At (12,32) @domain At (12,37) "Domain" At (14,30) "XCOMPANY Americas Inc." At (16,30) @fullname At (18,20) "Intended for XCOMPANY Employee use only." At (20,20) "All intruders will be prosecuted to" At (21,23) "the fullest extent of the law." Sleep 3 Small Color b+/n Box (0,0,24,79,GRID) ; 'background grid' Color b/n Box (8,21,18,61,Å) ; 'shadow' of the box Color g+/n Box (7,20,17,60,FULL) 0 SetTime $Server3 Color w+/n At ( 9,25) "Userid : " ; display some text strings At (10,25) "Full name : " At (11,25) "Privilege : " At (12,25) "Workstation : " At (13,25) "Domain : " At (14,25) "Logon Server : " At (15,25) "Current Time : " At (16,25) "Today's Date : " Color y+/n At ( 9,40) @userid ; ...and some macro's At (10,40) @fullname At (11,40) @priv At (12,40) @wksta At (13,40) @domain At (14,40) @lserver At (15,40) @time At (16,40) @DATE Sleep 3 :set_vars $section=$section+1 ; Section 2 Use "*" /delete $h="\\wmcfps02\@userid" ;$s="\\wmcfps01\@PRIMARYGROUP" CLS At (12,30) "Mapping Drives" Sleep 3 ; For Marshall if ingroup("XX-Everyone") use h: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Marshall\home\%username%" 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: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Pryor\home\%username%" use g: "\\xx-fs\Pryor\depts" use l: "\\xx-fs\Enterprise" ;use p: "\\xx-fs\Marshall\policies" use f: /delete/persistent 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") Use O: /delete USE O: "\\Xx-Apps\Apps2" $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xcompany-americas.com\netlogon\shortcuts\mapcon.lnk" $desktop endif ; ISO QUALITY SYSTEM if ingroup("XX-Everyone") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")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") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xcompany-americas.com\netlogon\shortcuts\lims.lnk" $desktop endif ;ORDERS if ingroup("XX-Orders") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xcompany-americas.com\netlogon\shortcuts\orders schedule database.lnk" $desktop endif ;QUALITY if ingroup("XX-Quality-System-DB") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xcompany-americas.com\netlogon\shortcuts\Quality System Database.lnk" $desktop endif ;PRODUCTION Database Read Write if ingroup("XX-Production-Database-RW") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xcompany-americas.com\netlogon\shortcuts\Production Database.lnk" $desktop endif ;PRODUCTION Database for PLANT Users if ingroup("XX-Production-Database-Plant") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")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") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xcompany-americas.com\netlogon\shortcuts\Xcompany Training.url" $desktop endif ;TRACKIT Uninstall if ingroup("Uninstall-Trackit") use T: /delete/persistent use T: "\\xx-apps2\intuit\Track-IT! 6.5\Track-It! Server - Professional Edition" RUN 'T:\installers\workstationmanager\tiwsmgr.exe /uninstall' ? "Please WAIT * Uninstall Trackit Running here" 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" RUN 'T:\installers\workstationmanager\tiwsmgr.exe /service' ? "Please WAIT * Trackit Service Installing" 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" RUN 'T:\Audit32.exe /m /q' ? "Please WAIT * Trackit Audit Running. This will run once a day at LOGIN" 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" RUN 'T:\installers\workstationmanager\tiwsmgr.exe /service' ? "Please WAIT * Trackit Service Installing" SLEEP 30 Endif ;TRACKIT Audit32 if ingroup("OK-Trackit") use T: /delete/persistent use T: "\\xx-apps2\intuit\Track-IT! 6.5\Track-It! Server - Professional Edition" RUN 'T:\Audit32.exe /m /q' ? "Please WAIT * Trackit Audit of System Running. This will run once a day at LOGIN" SLEEP 20 Endif (END CODE) CITRIXMAP SCRIPT BEGINS HERE (CODE) ;Drive Mappings for Citrix Users - NO Trackit CLS ?"Running Citrix Mapping now" Sleep 5 $section=1 ;Section 1 Color c+/n Box (0,0,24,79,single) Color r+/n At (10,30) "Welcome to the" At (12,32) @domain At (12,37) "Domain" At (14,30) "XCOMPANY Americas Inc." At (16,30) @fullname At (18,20) "Intended for XCOMPANY Employee use only." At (20,20) "All intruders will be prosecuted to" At (21,23) "the fullest extent of the law." At (22,20) "THIS SCRIPT RUNNING FOR CITRIX USERS ONLY" Sleep 3 Small Color b+/n Box (0,0,24,79,GRID) ; 'background grid' Color b/n Box (8,21,18,61,Å) ; 'shadow' of the box Color g+/n Box (7,20,17,60,FULL) 0 SetTime $Server3 Color w+/n At ( 9,25) "Userid : " ; display some text strings At (10,25) "Full name : " At (11,25) "Privilege : " At (12,25) "Workstation : " At (13,25) "Domain : " At (14,25) "Logon Server : " At (15,25) "Current Time : " At (16,25) "Today's Date : " Color y+/n At ( 9,40) @userid ; ...and some macro's At (10,40) @fullname At (11,40) @priv At (12,40) @wksta At (13,40) @domain At (14,40) @lserver At (15,40) @time At (16,40) @DATE Sleep 3 :set_vars $section=$section+1 ; Section 2 Use "*" /delete $h="\\wmcfps02\@userid" ;$s="\\wmcfps01\@PRIMARYGROUP" CLS At (12,30) "Mapping Drives" Sleep 3 ; For Marshall if ingroup("XX-Everyone") use h: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Marshall\home\%username%" 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: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Pryor\home\%username%" use g: "\\xx-fs\Pryor\depts" use l: "\\xx-fs\Enterprise" ;use p: "\\xx-fs\Marshall\policies" use f: /delete/persistent 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") Use O: /delete USE O: "\\Xx-Apps\Apps2" $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.com\netlogon\shortcuts\mapcon.lnk" $desktop endif ; ISO QUALITY SYSTEM if ingroup("XX-Everyone") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.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") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.com\netlogon\shortcuts\lims.lnk" $desktop endif ;ORDERS if ingroup("XX-Orders") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.com\netlogon\shortcuts\orders schedule database.lnk" $desktop endif ;QUALITY if ingroup("XX-Quality-System-DB") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.com\netlogon\shortcuts\Quality System Database.lnk" $desktop endif ;PRODUCTION Database Read Write if ingroup("XX-Production-Database-RW") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.com\netlogon\shortcuts\Production Database.lnk" $desktop endif ;PRODUCTION Database for PLANT Users if ingroup("XX-Production-Database-Plant") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.com\netlogon\shortcuts\productiondb.lnk" $desktop ADDPRINTERCONNECTION ("\\xx-dc2\xx-plant central control-dell laser-ps") endif ;TRAINING if ingroup("XX-Everyone") $desktop = READVALUE("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")copy "\\xxx-xxx.com\netlogon\shortcuts\Xcompany Training.url" $desktop endif EXIT (END CODE) ************* IS EXIT correct? |
||||||||
|
|
|||||||
I'm not seeing a CallScript() UDF anywhere nor do I see an EXIT or QUIT that would prevent you from falling into the remaining script. |
||||||||
|
|
|||||||
Code:
|
||||||||
|
|
|||||||
Which value means the user is a citrix user? The single user terminal server? |
||||||||
|
|
|||||||
I guess you did not read my FAQ. |
||||||||
|
|
|||||||
Sweet suit! |
||||||||
|
|
|||||||
I am under the gun here. Over 350 users and I am the Network Admin, Security Admin, SQL Admin, CRM Admin, Disaster Recovery Admin, Help Desk. I work for a co that believes in a SLIM IS dept. Now I have to do the scripting as well. Excuse me for not knowing everything on this site. |
||||||||
|
|
|||||||
copy and paste disease seems to be contagious Fixed my post |
||||||||
|
|
|||||||
i think they're both needed to determine if it's a citrix session. Explain what's (not) happening during logon. |
||||||||
|
|
|||||||
Ok, I broke it down smaller for testing. Below is what I have. I login to a Citrix Desktop Session and I get as far as "Getting Ready to Check". No mapping from the Citrixmap.kix take place. (BEGIN CODE) ;TESTING LOGIN SCRIPT ; Determine if Logging into Citrix or Local 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 = "CommunicationsServer" $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 $RC=MessageBox ("Invalid parameter used in function") ProductSuite($Product)",48 ;WriteLog("Invalid parameter used in function") ProductSuite ($Product)") Endselect $ProdcutSuite = $x & val (@ProductSuite) EndFunction ?"Getting ready to check" Sleep 6 If ProductSuite("Terminal Server") and not ProductSuit("Single User Terminal Server") ?"IM at the ProductSuite line here" sleep 10 CallScript("\\norit-americas.com\netlogon\Citrixmap.kix") EXIT 0 (END CODE) *****************************HERE is the CALLED SCRIPT CODE (BEGIN CODE) ;Drive Mappings for Citrix Users - NO Trackit CLS ?"Running Citrix Mapping now" Sleep 5 $section=1 ;Section 1 Color c+/n Box (0,0,24,79,single) Color r+/n At (10,30) "Welcome to the" At (12,32) @domain At (12,37) "Domain" At (14,30) "NORIT Americas Inc." At (16,30) @fullname At (18,20) "Intended for NORIT Employee use only." At (20,20) "All intruders will be prosecuted to" At (21,23) "the fullest extent of the law." At (22,20) "THIS SCRIPT RUNNING FOR CITRIX USERS ONLY" Sleep 3 Small Color b+/n Box (0,0,24,79,GRID) ; 'background grid' Color b/n Box (8,21,18,61,Å) ; 'shadow' of the box Color g+/n Box (7,20,17,60,FULL) 0 SetTime $Server3 Color w+/n At ( 9,25) "Userid : " ; display some text strings At (10,25) "Full name : " At (11,25) "Privilege : " At (12,25) "Workstation : " At (13,25) "Domain : " At (14,25) "Logon Server : " At (15,25) "Current Time : " At (16,25) "Today's Date : " Color y+/n At ( 9,40) @userid ; ...and some macro's At (10,40) @fullname At (11,40) @priv At (12,40) @wksta At (13,40) @domain At (14,40) @lserver At (15,40) @time At (16,40) @DATE Sleep 3 :set_vars $section=$section+1 ; Section 2 Use "*" /delete $h="\\wmcfps02\@userid" ;$s="\\wmcfps01\@PRIMARYGROUP" CLS At (12,30) "Mapping Drives" Sleep 3 ; For Marshall if ingroup("XX-Everyone") use h: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Marshall\home\%username%" 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: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Pryor\home\%username%" use g: "\\xx-fs\Pryor\depts" use l: "\\xx-fs\Enterprise" ;use p: "\\xx-fs\Marshall\policies" use f: /delete/persistent use f: "\\xx-fs\Pryor" endif (END CODE) |
||||||||
|
|
|||||||
as les so cleverly pointed out, there was a typo If ProductSuite("Terminal Server") and not ProductSuite("Single User Terminal Server") ?"IM at the ProductSuite line here" sleep 10 Call "\\norit-americas.com\netlogon\Citrixmap.kix" Exit 0 endif On top of that you didn't have an endif and you are still trying to use CallScript()... |
||||||||
|
|
|||||||
I login to my local xp computer then start a Citrix Desktop Session, I do not think the condition is being met for the script to be called. That is why I was asking what conditions must be met for the script to know that I am trying to login to the Citrix desktop. |
||||||||
|
|
|||||||
CallScript() and Suite, not Suit! |
||||||||
|
|
|||||||
WIll correct and try. |
||||||||
|
|
|||||||
OK, just for testing;Does not go past "getting ready to check" (CODE) ; LOG-IN SCRIPT ; Determine if Logging into Citrix or Local 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 = "CommunicationsServer" $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 $RC=MessageBox ("Invalid parameter used in function") ProductSuite($Product)",48 ;WriteLog("Invalid parameter used in function") ProductSuite ($Product)") Endselect $ProdcutSuite = $x & val (@ProductSuite) EndFunction ?"Getting ready to check" Sleep 6 If ProductSuite("Terminal Server") and not ProductSuite("Single User Terminal Server") ?"IM at the ProductSuite line here" sleep 10 ;Drive Mappings for Citrix Users - NO Trackit CLS ?"Running Citrix Mapping now" Sleep 5 $section=1 ;Section 1 Color c+/n Box (0,0,24,79,single) Color r+/n At (10,30) "Welcome to the" At (12,32) @domain At (12,37) "Domain" At (14,30) "XXX Americas Inc." At (16,30) @fullname At (18,20) "Intended for XXX Employee use only." At (20,20) "All intruders will be prosecuted to" At (21,23) "the fullest extent of the law." At (22,20) "THIS SCRIPT RUNNING FOR CITRIX USERS ONLY" Sleep 3 Small Color b+/n Box (0,0,24,79,GRID) ; 'background grid' Color b/n Box (8,21,18,61,Å) ; 'shadow' of the box Color g+/n Box (7,20,17,60,FULL) 0 SetTime $Server3 Color w+/n At ( 9,25) "Userid : " ; display some text strings At (10,25) "Full name : " At (11,25) "Privilege : " At (12,25) "Workstation : " At (13,25) "Domain : " At (14,25) "Logon Server : " At (15,25) "Current Time : " At (16,25) "Today's Date : " Color y+/n At ( 9,40) @userid ; ...and some macro's At (10,40) @fullname At (11,40) @priv At (12,40) @wksta At (13,40) @domain At (14,40) @lserver At (15,40) @time At (16,40) @DATE Sleep 3 :set_vars $section=$section+1 ; Section 2 Use "*" /delete $h="\\wmcfps02\@userid" ;$s="\\wmcfps01\@PRIMARYGROUP" CLS At (12,30) "Mapping Drives" Sleep 3 ; For Marshall if ingroup("XX-Everyone") use h: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Marshall\home\%username%" 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: /delete/persistent use g: /delete/persistent use l: /delete/persistent use p: /delete/persistent use h: "\\xx-fs\Pryor\home\%username%" use g: "\\xx-fs\Pryor\depts" use l: "\\xx-fs\Enterprise" ;use p: "\\xx-fs\Marshall\policies" use f: /delete/persistent use f: "\\xx-fs\Pryor" endif ;CallScript("\\xxx-americas.com\netlogon\Citrixmap.kix") ;EXIT 0 endif (CODE) |
||||||||
|
|
|||||||
Ok guys found another error and fixed it and it is going all the way through the test script in previous post. I think I need a typing class. Now I will test it with calling the script. |
||||||||
|
|
|||||||
To call a script is it CallScript() "\\path\scriptname" |
||||||||
|
|
|||||||
CallScript("\\domain name\netlogon\citrixmap.kix) Gives UNKNOWN COMMAND (CALLSCRIPT) error. |
||||||||
|
|
|||||||
Left off ending " it is there and still error. |
||||||||
|
|
|||||||
it's just plain old call, like i showed you before call "\\domain name\netlogon\citrixmap.kix" Call Command |
||||||||
|
|
|||||||
THANKS! Your are all geniuses! |
||||||||
|
|
|||||||
sounds like it's working...glad to help |
||||||||
|
|
|||||||
Thanks for your patience! |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
And I hope you've been using DEBUG ON for allthe debugging you've done. That should have identified a lot of the issues. |