Topic
  • 6 replies
  • Latest Post - ‏2014-05-22T14:14:46Z by rafael.rodriguez
LeoCiociano
LeoCiociano
7 Posts

Pinned topic How to automatically create a new fixlet.

‏2012-06-12T14:02:17Z |
I want to create a new fixlet with commands executed from another fixlet.
The thing is, I want to run a fixlet which grabs some info, and then with that info, I need to automatically create another fixlet to be ready to run... is it possible?.

Storing the info in files and reading it from the second fixlet does not work with what I need to do. I specifically need a second fixlet to be created from a first fixlet.

I read about an app called "besimportfile" that imports a .bes file in an unattended way, giving as a parameter the console master user and password, but it also requires to be executed with an SQL admin user, which is weird, because I can manually create fixlets within the console, without being admin user from the DB.

Thanks,
Leo
  • SystemAdmin
    SystemAdmin
    757 Posts

    Re: How to automatically create a new fixlet.

    ‏2012-06-13T12:59:49Z  
    Leo, while you might be able to create a fixlet that can execute the BESIMPORTFILE application, the problem you would face is that it would expose the username and password of a Master Operator account in a fixlet that ANYONE on ANY/ALL of your computers could access and read. Not recommended. This is the same reason that changing local user passwords is not recommended with fixlets and tasks.

    You might be able to use a fixlet/task to create the .BES file then have another process import the file for you on a scheduled basis. This would allow the Username and Password to be kept out of the fixlet/task.

    I'm curious what it is you are trying to do?
  • LeoCiociano
    LeoCiociano
    7 Posts

    Re: How to automatically create a new fixlet.

    ‏2012-06-25T15:34:45Z  
    Leo, while you might be able to create a fixlet that can execute the BESIMPORTFILE application, the problem you would face is that it would expose the username and password of a Master Operator account in a fixlet that ANYONE on ANY/ALL of your computers could access and read. Not recommended. This is the same reason that changing local user passwords is not recommended with fixlets and tasks.

    You might be able to use a fixlet/task to create the .BES file then have another process import the file for you on a scheduled basis. This would allow the Username and Password to be kept out of the fixlet/task.

    I'm curious what it is you are trying to do?
    There is no problem with the password. I stored it in a protected file only readed by BES Root Server user, I read that file from a the fixlet and put the password string on a parameter. No human can read it... I believe.

    Anyways, I am trying to use BESImportFile-1.1.exe command but I get this error:
    Win32::OLE(0.1709) error 0x800401f3: "Invalid class string"

    BESImportFile command works fine on my Lab TEM server, but it crashes on my Prod TEM Server. I know there aren´t any problems with perms, in fact, I think this is not a BES Server error, it is more likely a code error.

    Anyone can help me?.

    What I am trying to do is creating a fixlet which ask for some info, then it edits a template .bes file and imports it. So, then I have another fixlet ready to go with hardcoded parameters.

    Thanks,
    Leo
  • Lee Wei
    Lee Wei
    143 Posts

    Re: How to automatically create a new fixlet.

    ‏2012-06-26T16:40:08Z  
    There is no problem with the password. I stored it in a protected file only readed by BES Root Server user, I read that file from a the fixlet and put the password string on a parameter. No human can read it... I believe.

    Anyways, I am trying to use BESImportFile-1.1.exe command but I get this error:
    Win32::OLE(0.1709) error 0x800401f3: "Invalid class string"

    BESImportFile command works fine on my Lab TEM server, but it crashes on my Prod TEM Server. I know there aren´t any problems with perms, in fact, I think this is not a BES Server error, it is more likely a code error.

    Anyone can help me?.

    What I am trying to do is creating a fixlet which ask for some info, then it edits a template .bes file and imports it. So, then I have another fixlet ready to go with hardcoded parameters.

    Thanks,
    Leo
    BESImportFile uses the BES Platform API.
    Since you are testing on 2 different computers, make sure that the Platform API is installed on the production TEM Server, and make sure that the version of the API is the same as the Server.
  • LeoCiociano
    LeoCiociano
    7 Posts

    Re: How to automatically create a new fixlet.

    ‏2012-06-26T18:25:25Z  
    • Lee Wei
    • ‏2012-06-26T16:40:08Z
    BESImportFile uses the BES Platform API.
    Since you are testing on 2 different computers, make sure that the Platform API is installed on the production TEM Server, and make sure that the version of the API is the same as the Server.
    Yes, you are right, BES Platform API was missing. BESImportFile is working now. Thanks!!

    Leo
  • Bhushan Chirmade
    Bhushan Chirmade
    18 Posts

    Re: How to automatically create a new fixlet.

    ‏2012-07-27T18:51:31Z  
    Yes, you are right, BES Platform API was missing. BESImportFile is working now. Thanks!!

    Leo
    Can you please provide example file you used?
  • rafael.rodriguez
    rafael.rodriguez
    2 Posts

    Re: How to automatically create a new fixlet.

    ‏2014-05-22T14:14:46Z  
    Can you please provide example file you used?

    file create customsite  .bes :

    <?xml version="1.0" encoding="UTF-8"?>
    <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
    <CustomSite>
    <Name>Site-probe</Name>
    <Description>Rafael Rodríguez</Description>
    <SiteRelevance><![CDATA[(version of client >= "6.0.0.0") AND (exists true whose (if true then (exists (computer name) whose (it as string as lowercase contains "XPDesktopBase" as lowercase)) else false))]]></SiteRelevance>
    </CustomSite>
    </BES>

    run in cmd.exe : BESImportFile-1.2.exe IP_server User_admin Password "c:\file.bes"