/build/static/layout/Breadcrumb_cap_w.png

deploying a bath file with SCCM

Hi

 I am trying to copy a software from C:\ ProgramData... to "%USERPROFILE%\Start Menu\Programs\Startup"

Here's is m bath file:

copy "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cisco Jabber\Cisco Jabber.lnk" "%USERPROFILE%\Start Menu\Programs\Startup"

the bath file is working/ copying properly when double click on it which means manually.

now, I am trying to deploy it to all the system with SCCM hence, the software is installed on the SCCM but the file is not copied

see attached file 

eA6HLu1ZjfK0AUEAVEAVE0sBINjDl4UBdQca0GAFE006YZQLQC0f8Pq0ZqUUNSrPEAAAAASUVORK5CYII=

any thoughts about why it's working properly and not working with the SCCM?

thanks



0 Comments   [ + ] Show comments

Answers (2)

Posted by: johnsonit 3 months ago
White Belt
0

Hello Friend,


It seems like you're trying to use a batch file to copy a shortcut to the Startup folder within user profiles. However, when deploying it through SCCM (System Center Configuration Manager), the file isn't being copied as expected.


Steps we can consider

  • Permissions Issue
  • System vs. User Context
  • Deployment Timing
  • Logging for Troubleshooting

These steps should help in troubleshooting Python Support why the file isn't being copied as expected when deploying via SCCM.

Check the blow code to run


@echo offset LOGFILE=%TEMP%\CopyJabberShortcut.logecho Copying Cisco Jabber shortcut to Startup folder... > %LOGFILE%copy "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cisco Jabber\Cisco Jabber.lnk" "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup" >> %LOGFILE% 2>&1if %ERRORLEVEL% EQU 0 ( echo Cisco Jabber shortcut copied successfully! >> %LOGFILE%) else ( echo ERROR: Failed to copy Cisco Jabber shortcut. Error code: %ERRORLEVEL% >> %LOGFILE%)echo Batch execution completed. Check %LOGFILE% for details.


Deploy this modified batch file via SCCM and review the log file (%TEMP%\CopyJabberShortcut.log) for information regarding the copy operation and any encountered errors during the deployment process.


Hope this may helps.







Posted by: rileyz 3 years ago
Red Belt
0

You need the SCCM 'Application' to run as the User and not as the SYSTEM. This will allow the batch access to the users profile.

I dont have my lab up so I cant show you the dialog sorry. I cant remember if its during the creation of the SCCM application or during deployment, when the option shows up.


Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ