In the following code how to fix problem that the batch file won't get created. When I run in debug mode exception I get is "could not find part of path"
Thanks
StreamWriter sw = null;
try
{
if (AgilentNVisaDriver.Checked == false && RequiredDlls.Checked == false)
{
MessageBox.Show("Please select the application you would like to install");
}
else
{
Assembly objAssembly = Assembly.GetAssembly(this.GetType());
string strAppPath = objAssembly.CodeBase;
strAppPath = strAppPath.Replace("SplashScreen.dll", "");
Uri objUri = new Uri(strAppPath);
strAppPath = @objUri.AbsolutePath;
string strBatchFilePath = strAppPath + @"Setup.bat";
sw = File.CreateText(strBatchFilePath);