Re: Map Values during installation



Hi BM,

I am sure you will achieve this by creating an customer functoid.

Thanks to Ben for sharing your code.

Cheers,

Wade


"BizTalkVirtuoso" <ben.mcfarlin@xxxxxxxxxxxxxxxxxxx> wrote in message
news:1164400990.347192.10810@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi BM,
That sounds like a nice installation. You'll need to use ssoconfig.exe
to store the values during installation and also retreive them from
within the map.

In the installer class of the Msi, add code that will call
ssoconfig.exe from the command line to add the values. Here is some
sample code that I used to register a COM component from within an
installer class:

private void RegisterServices(string FileName, bool UnInstall)
{
string Arguments = string.Concat("\"", FileName, "\"");
if(UnInstall) Arguments = string.Concat("/u ", Arguments);
string cmd = string.Concat("regsvcs.exe ", Arguments);

Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();

StreamWriter sIn = process.StandardInput;
StreamReader sOut = process.StandardOutput;
StreamReader sErr = process.StandardError;

sIn.AutoFlush = true;
sIn.Write(cmd);
sIn.Write(System.Environment.NewLine);
sIn.Write("exit");
sIn.Write(System.Environment.NewLine);
string s = sOut.ReadToEnd();
TraceEvent(s);

if(!process.HasExited) process.Kill();

sIn.Close();
sOut.Close();
sErr.Close();
process.Close();
}

Inside the map you can call a method from an external assembly that
will retreive the values from the SSO store. I don't have sample code
for that but it should be easy to find. Good luck and let me know how
it goes.

Ben McFarlin
Microsoft BizTalk Server Consultant



.