Is there some "silent-install" configuration possible? You presumably won't be able to change data inside of a compressed archive directly.
Heh, I thought the whole point of Blade Logic was to do the "silent install".
I managed to write an NSH Script to do this replacement.
but I got a problem...
When I zip back the file, the files keep the full path.
If I unzipped the file to a temp dir C:\Temp, this directory will appear within the zip.
Is there a command to change working dir in an NSH script?
The script is:
# unzip the XAP file
unzip -o "SilverLight.xap" -d "/C/Temp/"
# replace parameter in the file
sed 's/ReplaceME/WithMe/g' "/C/Temp/file.xaml" > "/C/Temp/file.xaml"
# replace the original file
mv -f "/C/Temp/new_file.xaml" "/C/Temp/file.xaml"
#zip the file back
zip -r "SilverLight.xap" /C/Temp/*
i hope i understood correctly. ( Change working dir in NSH = CD )
after the mv just
zip -r "SilverLight.xap" *
then it should save only the folder structure and files after c/temp
and /c/temp will not be saved in the zip
About the smarter way of doing this...well maybe: Grammar, Configuration Objects...i am still not an expert at this...
But easier for a beginner would be, if you just copy the xml file separatly and use, as a job parameter, a server property where the ReplaceME is set differently for each server. And do your sed with this property in the script.
I'm ubable to copy just the file and then zip it because the compilation process of the Silverlight application already creates the zip.
In addition, I'd rather use the sed command instead of a configuration file since this configuration file keeps changing - so I have to recreate the BLPackage for the configuration file each time.
using the sed command - I create a BLPackage for the new version of the application, and the NSH script job stays the same (at least untill they'll start adding new parameters to the file).