Skip to content

Using cmd files in a sccm 2012 application

Featured Replies

You could also do two applications... One for the application install itself and one for the file copy, then do a dependecy of the application install to the file copy application and deploy it. Should work.

  • Author

%ProgramData% you should be able to copy to. Your ConfigMgr package needs to run with administrative rights (run as SYSTEM) to access the ProgramData folder.

 

If your package consists of License.lic and Install_License.cmd, your script could look like this:

 

SET yourpath=%~dp0

XCOPY "%yourpath%License.lic" "%ProgramData%\Microsoft\Windows\blah\blahblah"

I've done so, but get "access denide". I'm using Apllications and not packages.... I have no options on setting user rights on applications...
  • Author

You could also do two applications... One for the application install itself and one for the file copy, then do a dependecy of the application install to the file copy application and deploy it. Should work.

Thats what I've done. ;)
  • 4 months later...

I'm not going to install using VBS. The SCCM Application will do the thing for the msi installation. Is the copy of the lic file I need to get working within an Application.

 

I realize this is old, but you could just have an MST file place the license for you. Also, if the License file is a one liner, it may be smarter to create the file instead of copying it, such as:

 

 

%ComSpec% /c echo LicenseKey=1234567890 > %ProgramData%\mypath\license.lic
 

Since you're getting access denied, I would venture to say that you're accessing a \\server\share as the System account and have not give Domain\ComputersGroup access to your share. The AD Computer objects have to have permission to the share, since that's what account the System accounts authenticates as.

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.