Skip to content

Batch files fail to deploy software

Featured Replies

Hi,

 

I created the following batchfile below. It installs the Winedit program, but it will not copy the WinEdt.skd license file to ProgramFiles(x86)%\ WinEdt Team\Winedt 6 when it is deployed through SCCM 2012 as a package or application. I’ve pointed SCCM 2012 directly at the batch file and put winedt60.exe /SILENT /NOCANCEL /NORESTART xcopy "\\sccmserver\Softwareshare\WinEdit 6\WinEdt.skd" "%ProgramFiles(x86)%\WinEdt Team\Winedt 6" /C /I /Q /H /R /Y in the command line field of the program. I’ve given various accounts full access to the ProgramFiles(x86) and softwareshare directories, including authenticated users, the sccm administrator account, the sccm computer account and the everyone group. This batch file works without issue if I run it outside of sccm 2012. Please let me know what I missed.

 

"\\sccmserver\Softwareshare\WinEdit 6\winedt60.exe" /SILENT /NOCANCEL /NORESTART

 

xcopy "\\sccmserver\Softwareshare\WinEdit 6\WinEdt.skd" "%ProgramFiles(x86)%\WinEdt Team\Winedt 6" /C /I /Q /H /R /Y

Is there any reason as to why you are pointing the batch to a share rather than creating package out of the source files? Probably size of files is the reason?

If not then create a package out of the source files including the license key and a batch file like so:

 

Start /wait "" %~dp0winedt60.exe /SILENT /NOCANCEL /NORESTART

copy %~dp0WinEdt.skd "C:\Program Files(x86)\WinEdt Team\Winedt 6" /y

 

Place the batch file in with the source files and create a program for the package.

The command line will be nameofbatch.bat

  • Author

Hi, thanks for responding so quickly.

 

Yes local system has full rights to the share. I also have it set on the Data Source tab to This package contains source files and the source folder path is \\sccmserver\Softwareshare \WinEdit 6

 

Now on the General tab of the program in the command line field I browsed to a batch file called install with your script in. Should that script be modified or leave it as is or should that script be put in the Command line: field?

If the batch file is called install.bat then the command line should be install.bat.

All files should be in the one source package i:e executable, licence key file and also the batch file and other files if needed.

 

No need to make any amendments to the script, it should work!

To test, place the files into a standard share and browse via UNC from a client and run the batch file. If it installs from this share then it should deploy via SCCM package!

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.