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
any thoughts about why it's working properly and not working with the SCCM?
thanks
Answers (2)
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.
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.