Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to run batch file properly in SMS/SCCM

129 views
Skip to first unread message

Chris

unread,
Jan 24, 2010, 1:14:01 AM1/24/10
to
Here is a batch file I use. Set to download to local machine and run from
there. It worked fine. But from SMS system status it showed no program
success. Showed program errors with exit code 4. And keeps retry. Had to
disable it. So how can I create a batch file so it can let SMS know it
failed or not properly. And report program success in the system status. I
guess my problem is the batch file has no error control. Please advice.

ECHO "Updating files"
xcopy "%~dp0ClientPrint.inf" c:\windows\system32 /y
xcopy "%~dp0gdiplus.dll" c:\windows\system32 /y
xcopy "%~dp0clientprint.dll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1049.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_3082.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1053.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1046.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_2052.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1040.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1043.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1042.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1041.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1036.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1031.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1028.rll" c:\windows\system32 /y
xcopy "%~dp0ClientPrint_1033.rll" c:\windows\system32 /y
cd c:\windows\system32
regsvr32 clientprint.dll /s
regsvr32 gdiplus.dll /s
exit

Thanks.

0 new messages