ThomasBlacknewcastleMemberNovember 5, 2014 at 1:56 am #164490
Not sure where to post this so sorry if in wrong place
Thank you for reading my post. I am brand new to scripting so my apologies if this is rather basic – But everyone starts somewhere.
We are running Windows 7 desktop on a 2003 Enterprise domain.
I need to copy some short cuts files (eod8 extension) to the start menu under “All Programs” in a folder called “EOD”. The users must be able to save and open the shortcuts (so using the All Users folder did not work since a standard user can’t save to that location) So I am copying the files to the local user profile.
[B][I]mkdir “C:Users%username%AppDataRoamingMicrosoftWindowsStart MenuProgramsEOD”[/I][/B]
[B][I]echo “No” | xcopy “%Installpath%*.eod8” “C:Users%username%AppDataRoamingMicrosoftWindowsStart MenuProgramsEOD” /d[/I][/B]
[B][I]Timeout /T 1 [/I][/B]
When I run the script locally it works – When I deploy through SCCM It fails
“Unable to find the file *.eod8” – What I have noticed is that If I go to C:WindowsccmcacheXX
And edit then close the script file (no change has been made) it works through the Software Center
From my limited knowledge I think my issue could be with the locationpath of my script
Thanks for your advice
JeremyWModeratorNovember 6, 2014 at 7:48 am #270969
Re: Trying to make shortcuts on desk
The install path is set to the directory that the script is run from. Where does SCCM drop the script? My guess is that the install path is OK but you should check that just to make sure.
Also, if SCCM is running the script under the system account it won’t work since it’s using the %username% variable. The script needs to be run in the user context. This would be my best guess as to what the issue is. I’m not very familiar with SCCM. Can you get it to run in the logged on user’s context? If not then I would use group policy and configure this as a logon script.
You must be logged in to reply to this topic.