Solved

Windows 7 Users Start Menu shortcut

Posted on 2013-05-17
8
661 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
  • 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 69

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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 69

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 69

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need Nag Screen for Reboot if system up time is over 14 days 12 47
sleep laptop 20 57
PDF to JPG 13 45
see android hidden files 10 25
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

770 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