Jump to content
Greg.Buerk

How to Export and Post Scripts

Recommended Posts

In LabTech you can Export a Script to a XML file. This XML file will contain all Files and Subscripts needed to execute this script.

 

Important:

Make sure that the L: Drive is mapped and excessible whenever importing or exporting a script.

 

Exporting Script:

Open the Script in the Control Center and click the Export button at the bottom. Choose LabTech XML Expansion and give the script a name. Click Save.

 

An Xml file will be created with the script in it. Also included will be every file downloaded with a Download File function, All Extradata fields that are used with Get and Set functions, Every subscript that is called with a Run script function. These rules apply to every subscript with no real limits. File sizes are limited to 10-15mb.

 

Importing the Script:

From the Control Centers Tools menu select Import, LT XML Expansion. Browse to the script XML and click open.

 

The Script will be imported and put in the same folder it was in or it will create a new folder. Sometimes scripts will find another folder with the same name and put it in there incorrectly. Scripts can also cause a script to auto execute when they are imported and you will be prompted to run the script.

 

Post Script to Forum:

The Easy Part, I recommend you Zip the XML and create a new Forum post in the Script Exchange.

  • Thanks 1

Share this post


Link to post
Share on other sites

LABTECH Scripts have Version control. A script can not be imported to an older version system. To get around this you need to change the version attribute to match your system be lower.

 

Version="1"

Name="LabTech Script Expansion"

Type="PackedScript">

Share this post


Link to post
Share on other sites

Fellow LT geeks

Slightly off topic but is this the best way to make a modification to a standard script. The process we do appears to be really cumbersome. We are

 

1 - Export the standard script

2 - Modify the XML GUID adding a 99 to the script ID (or someother high number)

3 - Modify the XML changing the name of the script (if needed)

4 - Load the Script

5 - Change all references to the original script & id to the copy (using script find)

6 - Possibly load the changes from to the standard script from the marketplace and compare them to our custom version

7 - Repeat Step Six forever.

 

Is there a better way.

Share this post


Link to post
Share on other sites

Terri,

 

I personally simply copy an existing script, edit inside of LT by changing the Name only of the script and saving. They I utilize SQLYOG and edit the script ID/folder as required directly in the lt_scripts table. This allows me to ensure all my scripts have a specific ID range that will not conflict with others and I can import/export without issue.

 

FYI - SQLYOG is a great tool. I highly suggest this tool for anyone managing MySQL servers. Here is a download link:

 

Official Site link: https://www.webyog.com/

 

-jeff

Share this post


Link to post
Share on other sites
Fellow LT geeks

Slightly off topic but is this the best way to make a modification to a standard script. The process we do appears to be really cumbersome. We are

 

1 - Export the standard script

2 - Modify the XML GUID adding a 99 to the script ID (or someother high number)

3 - Modify the XML changing the name of the script (if needed)

4 - Load the Script

5 - Change all references to the original script & id to the copy (using script find)

6 - Possibly load the changes from to the standard script from the marketplace and compare them to our custom version

7 - Repeat Step Six forever.

 

Is there a better way.

 

Could create a new script, and then copy pasta the contents of the official script into the new script, and mirror the permissions etc. That would prevent the script from being over-written by Marketplace. Any subscripts called within that script that you need to change, could be copied as well.

 

Hope that helps!

Share this post


Link to post
Share on other sites

Hi I'm trying to upload a script to the board and I get a message saying "The upload was rejected because the uploaded file was identified as a possible attack vector."

The script is just I'm trying to upload to the board is a simple IE default home page set to Google.

Share this post


Link to post
Share on other sites

I noticed looking at the XML file for some script that includes Licensedata field. Does this need to be changed as well when importing?

Share this post


Link to post
Share on other sites

Anybody have a way to export an entire folder of scripts?

 

I have transitioned to a new LT server and want to bring over all of my custom scripts. Having to open each one and c lick export would prove to be rather cumbersome.

 

thanks!

Share this post


Link to post
Share on other sites

h2o: you could export the scripts as an sql file from mysql, edit the sql file to remove the scriptid column data, then import into the new database.

Share this post


Link to post
Share on other sites

New to CWA... is this process still valid?  I imported a Windows Update Fix script into a new script folder, but the script doesn't appear in the scripts (right-click\scripts) menu when attempting to apply to a computer.  I'm guessing that there is a step i'm missing. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...