Jump to content


  • 0
oyvindskj

Using cmd files in a sccm 2012 application

Question

I'm i bit puzzeld at the moment. I've tryed to create an Application to install an msi program and then copy a linces file to a lokal path on the computer. The MSI part of tings work great but not the script I'm running to copy the lisence file. I'm using a simple cmd script to copy the fil and im ending up With a error 0x1(acces denied). I'f I create an package the script Works. Is it not possible to use cmd scripts within an Application? Cheers, Øyvind Skjellin

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites

  • 0

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.

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
Answer this question...

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