How to automatically create a new fixlet

(imported topic written by LeoCiociano)

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.



(imported comment written by SystemAdmin)

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?

(imported comment written by LeoCiociano)

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.



(imported comment written by Lee Wei)

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.

(imported comment written by LeoCiociano)

Yes, you are right, BES Platform API was missing. BESImportFile is working now. Thanks!!


(imported comment written by Bhushan Chirmade)

Can you please provide example file you used?

(imported comment written by rafael.rodriguez)

file create customsite .bes :

<?xml version="1.0" encoding="UTF-8"?>


Rafael Rodríguez

= "") AND (exists true whose (if true then (exists (computer name) whose (it as string as lowercase contains "XPDesktopBase" as lowercase)) else false))]]>

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

1 Like