Skip to content

Run bat file using SCCM 2007

Featured Replies

It's must be as simple as you say...

 

Have you check the log files on your client C:\Windows\CCM\Logs (sort it by last modification) ?

If you check the c:\windows\system32\ccm\cache folder, all files are in it as expected?

 

other packages do work, to confirm you don't have a boundary issue?

  • Author

If you check the c:\windows\system32\ccm\cache folder, all files are in it as expected?

 

other packages do work, to confirm you don't have a boundary issue?

 

Yes other packages are working and all files are downloaded correctly to DP

  • Author

What exactly is the purpose of the batch file?

Does it initiate a software install?

at first i intended to run a VB script to copy two files but it didn't run. So i thought of using a bat file to call this vb script. This is my actual bat file

 

?cscript "%~dp0Msgbox.vbs"

echo %~dp0

How do you set the program in the package program command line?

You can run the .VBS directly without the cscript /via a batchfile.

 

sourcepath enters the level where the vbs is placed?

Why not use a run command line step like this and simply reference the package that contains the 2 files

 

xcopy ".\*.*" "c:\your_specified_directory" /D /E /C /I /Q /H /R /Y /S

 

This will work without the use of scripting!

 

Copy Files.PNG

 

 

Or if you dont want to do it via a task sequence a batch file (nameofbatch.bat) like this would do the trick:

 

copy %~dp0file1 "C:\Your_specified_directory" /y

copy %~dp0file2 "C:\Your_specified_directory" /y

 

 

Have the 2 files in a package along with the batch file and the program command line will be nameofbatch.bat

  • 1 year later...

I know it is old topic, I have below patch that always fail in deployment using SCCM 2007 file

 

forfiles.exe -p %appdata%\Microsoft\Signatures\ -m *.* -d -30 -c "cmd /c del /q @path"

 

error as below

A failure exit code of 1 was returned. User context: NT AUTHORITY\SYSTEM Possible cause: Systems Management Server (SMS) determines status for each program it executes. If SMS cannot find or correlate any installation status Management Information Format (MIF) files for the program, it uses the program's exit code to determine status. An exit code of 1 is considered a failure. Solution: For more information on the exit code, refer to the documentation for the program you are distributing

 

any suggestion.

 

Thank you

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.