Commit de2f19f7 de2f19f797b9681c4c60c7ae87d17a93fcbab891 by Christian Gerdes

Fixed issue #3 runtime dll is now installed in user myassemblies during initiali…

…ze. Tested and working in Exp
1 parent 30219022
......@@ -137,16 +137,22 @@ namespace WebTest.WebServive.Plugin
// Copy message editor plugins and recorder plugin to users webtest dir
ShellSettingsManager sm = new ShellSettingsManager(this);
string pluginPath = sm.GetApplicationDataFolder(ApplicationDataFolder.Documents) + @"\WebTestPlugins\";
string assPath = sm.GetApplicationDataFolder(ApplicationDataFolder.Documents) + @"\MyAssemblies\";
Directory.CreateDirectory(pluginPath);
pluginPath += Path.GetFileName(messageLoc);
File.Copy(messageLoc, pluginPath, true);
Directory.CreateDirectory(assPath);
string messageLocNew = pluginPath + Path.GetFileName(messageLoc);
File.Copy(messageLoc, messageLocNew, true);
string runtimeLocNew = assPath + Path.GetFileName(runtimeLoc);
File.Copy(runtimeLoc, runtimeLocNew, true);
//Update the registry
RegistryKey wrk = Registry.CurrentUser.CreateSubKey("SOFTWARE\\WebServicePlugin");
RegistryKey wrk = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\WebServicePlugin");
wrk.SetValue("INSTALLED", 1, RegistryValueKind.DWord);
RegistryKey wark = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies");
wark.SetValue(null, assPath);
//Tell the user
VsShellUtilities.ShowMessageBox(this, "Recorder plugin copied to: " + pluginPath, "Plugin files installed", OLEMSGICON.OLEMSGICON_INFO, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
VsShellUtilities.ShowMessageBox(this, "Recorder plugin copied to: " + pluginPath + "\n\nUser assemblies copied to: " + assPath, "Plugin files installed", OLEMSGICON.OLEMSGICON_INFO, OLEMSGBUTTON.OLEMSGBUTTON_OK, OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST);
}
}
......