Code
string p = @"C:\Package.dtsx";
// 1 判断 package 是否存在
Boolean folderExists = app.FolderExistsOnSqlServer("myNewFolder1", ".", null, null);
Console.WriteLine("Folder exists? {0}", folderExists);
// 2 加载 package
DtsPackage.Package pkg = app.LoadFromSqlServer("newPkg", ".", String.Empty, String.Empty, null);
DtsPackage.Variables vars2 = pkg.Variables;
vars2["OpeId"].Value = "value from c#";
DtsPackage.DTSExecResult result2 = pkg.Execute();
//3 删除包
app.RemoveFolderFromSqlServer("myNewFolder1", ".", null, null);
folderExists = app.FolderExistsOnSqlServer("myNewFolder1", ".", null, null);
Console.WriteLine("Folder exists? {0}", folderExists);