Solved

Windows 7 Users Start Menu shortcut

Posted on 2013-05-17
8
662 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
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

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…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
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 …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

829 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