문제

Windows 양식 응용 프로그램을 개발하고 있습니다. 옵션을 "사이트 내보내기"로 제공하고 "사이트 가져 오기"로 다른 하나는 다음 stsadm 명령을 사용하여 수행하려고하지만 버튼을 클릭하는 것이 무엇인지 확실하지 않습니다.이벤트 (C #)가 STSADM 명령을 실행합니다.

stsadm.exe -o export -url https://abc20.dev.com/CL / ASDJSA / DEFAULT.ASPX -filename c : \ export.cab -includeusecurity -versions 4 -overwrite

편집 이것은 나에게 일했습니다

Process exportSite = new Process();

string commonFilesPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonProgramFiles);
string commandLine = " -o export -url " + SPContext.Current.Web.Url + " -filename c:\\" + tempName + ".exp -overwrite -includeusersecurity";

exportSite.StartInfo.UseShellExecute = true;
exportSite.StartInfo.FileName = commonFilesPath + @"\Microsoft Shared\web server extensions\12\BIN\" + "stsadm.exe ";
exportSite.StartInfo.Arguments = commandLine;
exportSite.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
exportSite.Start();
exportSite.Close();
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top