Question Locked

Shortcut hotkeys

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have written a batch file that I am going to use at startup to copy a shortcut to everyone's desktop. The script works as designed. However, the hotkey that I would like to use for the shortcut will not. In this case I want to map the shortcut to the F7 key. It seems that the properties are not being copied with the shortcut. Is there any reason why this is not working. Below is the batch file:

c:
cd %userprofile%\desktop
copy \\safiles\chc$\general\IT_stuff\lock_computer.lnk c: /Y

Thanks in advance for any advice.

4 replies

by tardcart

I just tried copying a link from one box to another and it kept the hotkey property. Does the link on the users desktop work when double clicked? If the link is pointing to a file that it thinks should be on the users computer and isn't then the whole thing is a wash. I'm assuming you're another batch file to lock the computer? If so, on the machine you initially created the link to hide the lock batch file somewhere in the C:/ then create your link. Have the installation batch copy the linked file to the same directory on the users computer in addition the desktop link. I would think that should take care of it.

You may be able to just hack the registry and change the scancode for the F7 to pass the necessary keystrokes to lock the machine. This might be of use http://www.informit.com/content/images/9780789738226/downloads/0789738228_web02.pdf
If you try it let me know how it goes.

by shane.heivly

I have the shorcut set up on a network drive where everyone of the users will be able to copy from. I felt this was necessary because I want to run it as a startup batch file (I have a fair amount of users). The shorcut will work when clicked but the powers that be demand that it be hotkeyed to the F7 key. Here is the batch file that i was using:
c:
cd %userprofile%\desktop
xcopy \\safiles\chc$\general\IT_stuff\lock_computer.lnk c: /Y

I think I may try to hack the registry and remap the key or try using vb script which I have had some luck and some minor issues. Thanks for the ideas I will give them a shot instead of banging my head against a wall.

by shane.heivly

I have actually switched to using a vbscript instead. Thank you for the input.

This discussion is closed to new replies.