Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

My Information

  • Agent Count

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @timwiser We tested your script on 10.5 and 11 with success (thanks for sharing it), we just moved to CWA v12 and I wondered if it will work with 12?
  2. Thanks for pointing me in the right direction. There was a script from an old plugin that was duplicated about 10 times for some reason.
  3. Long story short, I was having issues upgrading to v12 (problem turned out to be a corrupt exe) so I ended up talking to support. The tech that helped me ran some server analysis tool (CWA Server Toolkit) they use to make sure we met the prerequisites for 12. After we were done, he left the tool up on the server so I started poking around and ran something named Common Server Issues and got the failures in the attached screenshot. Next, I tried applying the needed updates in Solution Center. Several of the items that need updates want to update the AlertTemplate named ~Autofix Action Restart Service. Each time it tries to update it fails and gives the following error: Exception occurred when checking that items was installed correctly: Unable to load item locally: Invalid Operation exception occurred when loading alert template details. There are duplicate script guids in lt_scripts table. Which appears to be one of the issues the CWA Toolkit spit out. Does anyone have any insight into what needs to be done to fix these issues?
  4. Thanks for the response. I'm going to play with this again today to see if I can get it working.
  5. This may be a dumb question but how do you get it to dump the output into a ticket?
  6. That's all it took. Thanks for the help.
  7. A couple of years ago we worked with Labtech Professional Services team and during the engagement, they added a custom Dataview that displayed spec info for each computer. To populate the info, there's a custom script that populated data into a custom table the consultant added. At some point, the script stopped writing data to the table so no data from new computers added to Automate are getting into the table, so the dataview is now useless. Looking at the script log I see the following message: The Script(5950) failed in the Then section at step 34. The reason: Label not found: :SQL Insert I understand that it's dying because it can't find the label, I'm just not savvy enough with Automate scripting to figure out how to fix the issue. Any help would be appreciated. Oh and here's the script: Statement 1 Note: BIOS AGE IN YEARS 2 SET: @Age_In_Years@ = SQLRESULT[SELECT LEFT((SELECT DATEDIFF((SELECT DATE_FORMAT(CURDATE(), '%Y-%m-%d')),(SELECT DATE_FORMAT((SELECT STR_TO_DATE((SELECT BIOSDate FROM `inv_bios` WHERE computerID = %ComputerID%), '%m/%d/%Y')),'%Y-%m-%d'))) / 365),3)] 3 LOG: Bios Age in Years is: @Age_In_Years@ 4 Note: CHASIS TYPE 5 SET: @ChasisType@ = SQLRESULT[SELECT ChassisType FROM `inv_chassis` WHERE computerID = %computerid%] 6 LOG: ChasisType: @ChasisType@ 7 Note: PROCESSOR 8 SET: @Processor@ = SQLRESULT[SELECT REPLACE(`name`, ' ','') FROM `inv_processor` WHERE computerID = %ComputerID%] 9 LOG: Processor is: @Processor@ 10 Note: TOTAL RAM IN MB 11 SET: @Total_RAM@ = SQLRESULT[SELECT SUM(size) FROM `inv_memoryslots` WHERE computerID = %ComputerID%] 12 LOG: Total Memory installed is: @Total_RAM@ 13 Note: TOTAL GB on C drive 14 SET: @ComputerID@ = %ComputerID% 15 LOG: SELECT SUBSTRING_INDEX((SELECT (drives.`size`/1000) FROM drives WHERE computerID = %ComputerID% AND letter = 'C'), '.', 1) 16 SET: @C_Drive@ = SQLRESULT[SELECT SUBSTRING_INDEX((SELECT (drives.`size`/1000) FROM drives WHERE computerID = %ComputerID% AND letter = 'C'), '.', 1)] 17 LOG: Total GB on C drive: @C_Drive@ 18 Note: OS AND VERSION 19 SET: @OS_Version@ = SQLRESULT[SELECT CONCAT(OS,' ', VERSION) FROM computers WHERE computerID = %ComputerID%] 20 LOG: OS And Version: @OS_Version@ 21 Note: WARRANTY INFO 22 SET: @Warranty@ = SQLRESULT[SELECT enddate FROM `plugin_wlp_warrantyinformation` WHERE DeviceID = %computerid% AND `defaultwarranty` = 1] 23 LOG: Warranty end date is: @Warranty@ 24 Note: OFFICE VERSION 25 SET: @Version@ = SQLRESULT[SELECT name FROM software WHERE (`name` LIKE '%Microsoft office%2007%' OR `name` LIKE '%Microsoft office%2003%' OR `name` LIKE '%Microsoft office%2010%' OR `name` LIKE'%Microsoft office%2013%' OR `name` LIKE'%Microsoft office%2016%') OR `name` LIKE'%Microsoft office%ProPlus%') AND (computerID = %ComputerID%)] 26 LOG: Version is: @Version@ 27 IF @Version@ Contains 2003 THEN Jump to :2003 28 IF @Version@ Contains 2007 THEN Jump to :2007 29 IF @Version@ Contains 2010 THEN Jump to :2010 30 IF @Version@ Contains 2013 THEN Jump to :2013 31 IF @Version@ Contains 2016 THEN Jump to :2016 32 IF @Version@ Contains ProPlus THEN Jump to :ProPlus 33 LOG: Unable to determine office version 34 GOTO :SQL Insert 35 :2003 - Label 36 SET: @Office_Version@ = 2003 37 GOTO :SQL Insert 38 :2007 - Label 39 SET: @Office_Version@ = 2007 40 GOTO :SQL Insert 41 :2010 - Label 42 SET: @Office_Version@ = 2010 43 GOTO :SQL Insert 44 :2013 - Label 45 SET: @Office_Version@ = 2013 46 GOTO :SQL Insert 47 :2016 - Label 48 SET: @Office_Version@ = 2016 49 GOTO :SQL Insert 50 :ProPlus - Label 51 SET: @Office_Version@ = ProPlus 52 GOTO :SQL Insert 53 Note: Final SQL insert statement 54 LOG: REPLACE INTO OMNI_Device_Spec_Report (`ComputerID`, `Age_In_Years`,`Chasis_Type`, `Processor`,`Total_RAM`,`C_Drive`, `Office_Version`, `OS_Version`, `Warranty`) VALUES (%computerID%, '@Age_In_Years@', '@ChasisType@', '@Processor@', '@Total_RAM@', '@C_Drive@', IF('@Office_Version@' NOT REGEXP 'Office_Version', '@Office_Version@', 'UNK'), '@OS_Version@', IF('@Warranty@' NOT REGEXP '-9999', '@Warranty@', 'UNK')) 55 SQL EXECUTE: REPLACE INTO OMNI_Device_Spec_Report (`ComputerID`, `Age_In_Years`,`Chasis_Type`, `Processor`,`Total_RAM`,`C_Drive`, `Office_Version`, `OS_Version`, `Warranty`) VALUES (%computerID%, '@Age_In_Years@', '@ChasisType@', '@Processor@', '@Total_RAM@', '@C_Drive@', IF('@Office_Version@' NOT REGEXP 'Office_Version', '@Office_Version@', 'UNK'), '@OS_Version@', IF('@Warranty@' NOT REGEXP '-9999', '@Warranty@', 'UNK')) 56 Exit Script
  • Create New...