1 of 1 people found this helpful
I do some things similar to this in Unix and it's usually just a case of deploying the file to a location defined by a Bladelogic Property and then using a mv command to put it in the right spot if that didn't work.
So your file in the package with have a path like ??TARGET.ProgramFiles??/file1 where the property ProgramFiles would have to be added to the System class and be set for each server (although a default would hit most of your locations immediately).
??TARGET.stage_location??/file1 and then just add an external command (or is it move in Windows?):
mv ??TARGET.stage_location??/file1 %ProgramFiles%/
Hope this helps,
It seems as if this is the only way to do this.
Also thought about it but I hoped there is another way.
I had the same question. When reading the "BMC BladeLogic Client Automation Application Packager User Guide," it says you can use an Environment Variable, but it doesn't specify how to define it as %Programfiles%.
Environment Variable—Has the namespace $ENV.name. It resolves to the value of the environment variable name.
Am I misreading this? Should this be able to resolve to C:\Program Files?
maurice - are you talking about bbsa or bbca ?
Add the variable to the package. You can do this through the registry or on newer versions the "environment" server object under hardware information.
To add by registry set the env variable through advanced options for the user that is mapped in agent files. From BSA goto registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and put/export the key to the blpackage.
The server object variable will work in the same way.
If the variable exists on the system, wont an external command with an nexec to the system be able to call it?
Thanks for the reply, what I actually want to accomplish is being able to push the file in question to a location on the target server specified by the value of the %zenworks_home% windows variable.
example: %zenworks_home% = c:\Novell\zenworks
If I use %zenwork_home% in the Path line the BLPackage just creates a folder named %zenwork_home% on the target instead of using the value.
right now that's not possible. as inigo mentions it would be available in the external command (assuming it was set as a system variable), but it's not available in the blpackage object. that would be interesting, but it would assume that every box has the same variable set which may not be a valid assumption.
OK. . thx for the info. . . .I'll use joshuas original suggestion to stage it a known folder and then move it with a external command to it's final resting place