You want to execute .bat file.
So, This can be done in following way from Bladelogic:
- Create an Empty BLPackage.
- Add the .bat file to BLPackage by using the option Import Asset.
- Change the value of the Path property of the .bat file in BLPackage (i.e. c:\Temp\abc.bat)
- Add an External command to BLPackage
- Assign some name to command (.bat execute command)
- Type command as: cmd.exe /c c:\Temp\abc.bat or just use c:\Temp.bat (i.e. the abc.bat file get executed)
- Add another one External command to BLPackage
- Assign some name to command (to remove the .bat file)
- Type command as: cmd.exe /c del c:\Temp\abc.bat or just use del c:\Temp.bat
- create Deploy Job for the BLPackage & Test it.
Update me, Is it helpful or not?
Have you tried executing this manually from an NSH prompt?
You could try looking in the RSCD Agents Transaction logs for more information.
Failing that you could put additional debugging into your script you identify what PATH it is referring to.
I am using the external comand method not NSH script. Please advice.
will find any more info using NSH prompt as I am using exernal command method,
What do the RSCD transaction logs say?
Do they have more info?
Does your command rely on environment variables? If so set them in the external command and see if they still error.
You need to identify exactly which path it is failing to find.
Another option would be to add 'exit 1' to force an error in job and set job to leave stging files in place. You could then go and run the package manually to identify issue on target.
Sent from my Blackberry
What would be result when you execute manually on Windows box?
Also make sure set profile when invoking any environment variable. Bladelogic does not understand the user profile, it will run as RSCDAccount with previlige mapping to Admin account provided you have not used automation principle.