Deploy and register custom dlls

(imported topic written by olsonc5891)

I want to use BigFix to deploy .dlls. I am unsure of the best way to go about this. Create a Fixlet or Task? Basically, I have 2 custom .dlls. I have to deploy the .dlls to the appropriate servers and then register them. Currently, we are copying these files manually and then running a bat file to deploy them. This seems simple but I am a newbie and very much lacking in scripting experience but I would guess someone has already done this. Any suggestions would be appreciated.

regsvr32 /s file.dll

regsvr32 /s file2.dll

Thank you!

Chris

(imported comment written by MattBoyd)

Chris,

It doesn’t really matter if you create a fixlet or a task to do this. They’re really the same thing. I’d recommend using the Software Distribution Wizard to upload the DLLs that you need and get a task started. Then, have the regsvr32 command executed with action script like this:

copy __Download\file.dll  \Windows\System32\file.dll waithidden regsvr32 /s \Windows\System32\file.dll

You could also add some relevance so that the task is only run on computers that don’t have file.dll in the system folder:

exists file 
"file.dll" of system folder

(imported comment written by olsonc5891)

Thank you very much! I’ll give this a shot.

Chris

(imported comment written by olsonc5891)

I knew it wouldn’t be too easy. It failed. Not sure if the file name that was created with the installer piece is the problem or not. Also found out that there are files on the computer in the same directory with the same name that need to be replaced by this deployment. Any ideas?

Thank you again,

Chris

Completed download http://192.168.169.228:52311/Uploads/a62693b2464a20b40b05c53ebd96d930f5d5859f/111009_PE9_Prod_C746.tmp

Completed

continue if {(size of it = 57693 AND sha1 of it = “a62693b2464a20b40b05c53ebd96d930f5d5859f”) of file “111009_PE9_Prod_C746.tmp” of folder “__Download”}

Completed

extract 111009_PE9_Prod_C746.tmp

Failed

wait __Download\

copy __Download\C746_ClaimNumberGen_BUS.dll D:\directory\plugins\C746_ClaimNumberGen_BUS.dll

copy __Download\C746_ClaimNumberGen_GUI.dll D:\directory\plugins\C746_ClaimNumberGen_GUI.dll

waithidden regsvr32 /s D:\directory\plugins\C746_ClaimNumberGen_GUI.dll

waithidden regsvr32 /s D:\directory\plugins\C746_ClaimNumberGen_BUS.dll

(imported comment written by jessewk)

This line doesn’t do anything and is causing your error: wait __Download\

Before copying the dlls, you should add a delete command in case they are already there:

download http://192.168.169.228:52311/Uploads/a6 … d_C746.tmp

continue if {(size of it = 57693 AND sha1 of it = “a62693b2464a20b40b05c53ebd96d930f5d5859f”) of file “111009_PE9_Prod_C746.tmp” of folder “__Download”}

extract 111009_PE9_Prod_C746.tmp

delete D:\directory\plugins\C746_ClaimNumberGen_BUS.dll

delete D:\directory\plugins\C746_ClaimNumberGen_GUI.dll

copy __Download\C746_ClaimNumberGen_BUS.dll D:\directory\plugins\C746_ClaimNumberGen_BUS.dll

copy __Download\C746_ClaimNumberGen_GUI.dll D:\directory\plugins\C746_ClaimNumberGen_GUI.dll

waithidden regsvr32 /s D:\directory\plugins\C746_ClaimNumberGen_GUI.dll

waithidden regsvr32 /s D:\directory\plugins\C746_ClaimNumberGen_BUS.dll

Jesse

(imported comment written by olsonc5891)

Thank you Jesse! With your suggestion, it looked like it worked. Is there a “rename” command within the action file operation? I don’t see it in the documentation. I am anticipating that rather than “delete” and lose the file, they are going to want me to “rename” it instead. Thanks again.

CO

(imported comment written by jessewk)

yeah, just use the ‘move’ command. However, if the destination already exists it will error. So when you rename the file you might want to use a time stamp in the file name. Like this:

move D:\directory\plugins\C746_ClaimNumberGen_GUI.dll D:\directory\plugins\C746_ClaimNumberGen_GUI_{(now - “01 Jan 2009 00:00:00 -0000” as time) / (1 * second)}.dll.bak

(imported comment written by olsonc5891)

Thank you very much. I’ll work with that. One last question that may be obvious to some but, what scripting lanquages besides the “Bigfix Actions” does Bigfix support?

(imported comment written by jessewk)

Generally speaking our philosophy with the BigFix Action langauge is to keep it as simple as possible. We created the relevance language because there wasn’t an existing language that met our design requirements. However there are plenty of well established languages for affecting changes on an endpoint. If you want to do something complicated, the BigFix Action language is probably not the right choice. Instead, you can embed scripts from any language and pass them to a local interperter for evaluation, or compile them and execute them using one of the BigFix execution command (run, wait, waithidden, etc).

In this way you can use VBScript, perl, python, or any other language you like. Just write out your script as part of the action, or download it, and then execute it.

Jesse

(imported comment written by Rvaladares91)

Can someone help, It looks like I have all I need, but I need to killl the application, this application runs on the startup.

This is how my script looks like:

Completed download http://Serverbfx01v:52311/Uploads/553be6411d7bacd4c63f10596a49320367f4932d/OrdersUIdll.tmp

Completed continue if {(size of it = 468190 AND sha1 of it = “553be6411d7bacd4c63f10596a49320367f4932d”) of file “OrdersUIdll.tmp” of folder “__Download”}

Completed extract OrdersUIdll.tmp

Failed run Windows\system32\TASKKILL /F /IM ems.exe

copy _Download\OrdersUIdll c:\MEDHOST\System /y

waithidden regsvr32 /s C:\MEDHOST\System\OrdersUI.dll

(imported comment written by cstoneba)

you can put a command like this at the begining of your action script to kill your running application:

waithidden {(pathname of client folder of site “BESSupport” & "\taskkill.exe /f /im

PROCESSNAME

")}

(imported comment written by Rvaladares91)

That worked. Thank you very much!!