Jump to content


sroy49

Batch files fail to deploy software

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.