Jump to content


  • 0
ThomasBNewcastle

Batch file to put shortcuts to the start menu

Question

Hello

 

Not sure where to post this so sorry if in worng 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.

 

My Script

setlocal

set Installpath=%~dp0

mkdir "C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\EOD"

echo "No" | xcopy "%Installpath%*.eod8" "C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\EOD" /d

ENDLOCAL

Timeout /T 1

 

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:\Windows\ccmcache\XX

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 location\path of my script

 

Thanks for your advice

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.