ProcessStartInfo oInfo;
oInfo = new ProcessStartInfo("\\\\" + sSourceServer + "\\" +
Environment.SystemDirectory.Replace("C:", "C$") + "\\psexec.exe", " \
\STLLHK8PX41, -u <service admin account-p <service admin password
-i -e cscript.exe \\STLLHK8PX41\C$\NetworkSupportTools\Tasks\WindowsExplorer.vbs STLDJSRNRC1 " );
oInfo.WorkingDirectory = \\frmweb02\NewSupportTools$\Tasks;
oInfo.UseShellExecute = true;
oInfo.RedirectStandardOutput = false;
oInfo.RedirectStandardError = false;
oInfo.RedirectStandardInput = false;
m_oProc.StartInfo = oInfo;
m_oProc.Start();
All the bellow commands run under a service admin account.
Error: "The procedure entry point CryptUnprotectMemory could not be
located in the dynamic link library Crypt32.dll."
When running this in debug mode locally on my machine, I get the above
error, but it does succeed in running the script.
When I run it remotely, I don't get the above error message and the
process hangs. (Maybe the above error message does occur on the remote
machine, but I don't see it logged on as the service account)
When I run it from the command line locally, it succeeds with no
errors.
Web Server: Microsoft Windows server 2003 R2
Security: Windows Authentication, Impersonating a Admin Service
Account
Client Machine: Windows XP Professional SP2
Remote Machine: Windows XP Professional SP2
etc...: Ask