Solved

Windows 7 Users Start Menu shortcut

Posted on 2013-05-17
8
667 Views
Last Modified: 2013-09-12
How we can add program shortcut to "Windows 7 Users Start Menu shortcut" ?

previously in windows xp for domain users we are using user domain logon script to copy shortcuts

rem  ::: copy shortcut to Windows xp Users Start Menu using batch script :::

copy "\\testserver\user_shortcuts\*.*"  "%USERPROFILE%\Start Menu\"  /y


now this is not working with windows 7 pc for domain users of windows 2003.


Kindly suggest.
0
Comment
Question by:mash1978
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 20

Expert Comment

by:n2fc
ID: 39176649
For windows 7 change

%USERPROFILE%\Start Menu\

to

%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu
0
 
LVL 70

Assisted Solution

by:Qlemo
Qlemo earned 300 total points
ID: 39177394
Better to use %APPDATA% ("%AppData%\Microsoft\Windows\Start Menu\"), but that requires to check for the OS. One way to do that is:
if "%LocalAppData%" == "" (set base=%UserProfile\Start Menu) else (set base=%AppData%\Microsoft\Start Menu)
copy "\\testserver\user_shortcuts\*.*"  "%base%\"  /y

Open in new window

0
 
LVL 20

Expert Comment

by:n2fc
ID: 39177402
Qlemo forgot "Windows" in code sample path...


Should be:
if "%LocalAppData%" == "" (set base=%UserProfile\Start Menu) else (set base=%AppData%\Microsoft\Windows\Start Menu)

Open in new window

0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 70

Expert Comment

by:Qlemo
ID: 39177415
Oops.
0
 
LVL 20

Expert Comment

by:n2fc
ID: 39177420
No problem :-)
0
 

Accepted Solution

by:
mash1978 earned 0 total points
ID: 39178569
Hi,

it giving me below error message:

Access is denied.

-----------------------------------------

C:\>STartmenu_copy.bat

C:\>if "C:\Users\MK\AppData\Local" == "" (set base=AppData\Microsoft\Windows\Sta
rt Menu )

C:\>copy "c:\user_shortcuts\*.*"  "\"  /y
c:\user_shortcuts\Microsoft Office Word 2007.lnk
Access is denied.
c:\user_shortcuts\TEST_SHORTCUTS.txt
Access is denied.
        0 file(s) copied.
C:\>
---------------------------------------------------------------

if used command prompt with run as administrator then result is :

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>cd\

C:\>STartmenu_copy.bat

C:\>if "C:\Users\MK\AppData\Local" == "" (set base=AppData\Microsoft\Windows\Sta
rt Menu )

C:\>copy "c:\user_shortcuts\*.*"  "\"  /y
c:\user_shortcuts\Microsoft Office Word 2007.lnk
c:\user_shortcuts\TEST_SHORTCUTS.txt
        2 file(s) copied.
C:\>
--------------------------------------------------------------------------

but not showing shortcuts to users start menu

even searched c:\user folder but files not found
0
 
LVL 70

Assisted Solution

by:Qlemo
Qlemo earned 300 total points
ID: 39178596
There was a percent sign missing (typo), and so %base% was not set. If you look at the echoed copy command, you'll see it is trying to copy it to "\" - the root folder of the current drive.
if "%LocalAppData%" == "" (set base=%UserProfile%\Start Menu) else (set base=%AppData%\Microsoft\Windows\Start Menu)
copy "\\testserver\user_shortcuts\*.*"  "%base%\"  /y

Open in new window

0
 

Author Closing Comment

by:mash1978
ID: 39486145
We can add script in user login script.
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Determining the an SCCM package name from the Package ID
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question