Hey how do you run a batch file that will allow it to create shortcuts in peoples desktops or anywhere on their machines?
Printable View
Hey how do you run a batch file that will allow it to create shortcuts in peoples desktops or anywhere on their machines?
Hey,
Interesting question...My limited knowledge tells me that a batch file (a DOS utility)can only manipulate files, text, *.exe files and other batch files. I do not believe that they can have any effect on the GUI (Graphic User Interface). Since they are 2 different entities.
Others will know more.
Good Luck,
Dave https://discussions.virtualdr.com/
------------------
Is V.Dr. a great site, or what??
Windows Tips *** Help others less fortunate *** Thought For Today
The following is what the contents of a shortcut on the desktop looks like in note pad.
As you can see there is some machine code followed by text that describes the target.
This includes the the name of the drive volume (PROMISE) and the path to the program.
-------
L À F_ ÀžØ¥ ¢¿ ˆ(u*¡¿ µ¦ ¢¿ ¼ *OÐ ê:i¢Ø +00 #C:\ ñÍ% 1 Z&³¨ Program Files PROGRA~1 1 [&, Netscape NETSCAPE " 1 ‰(3A Netscape 6 NETSCA~1 & 2 ‰(MF netscp6.exe NETSCP6.EXE f 4 #Ce ça1 PROMISE C:\Program Files\Netscape\Netscape 6\netscp6.exe
Netscape 63 ..\..\Program Files\Netscape\Netscape 6\netscp6.exe$ C:\Program Files\Netscape\Netscape 60 C:\Program Files\Netscape\Netscape 6\netscp6.exe
-------
shortcuts have an extention *.lnk
I suppose you could write a batch that would copy a *.lnk to the proper directory on a destination drive, but as you can see the path is specific to my drive (PROMISE).
mrbreaker
Hello,
Here's one tip:
echo C:\WINDOWS\notepad.exe>C:\WINDOWS\Desktop\startnotepad.bat
The bad thing in this is that a MS-DOS -windows stays hanging in the backround.
Hey here is a link i found about this problem of mine:
http://www.ntfaq.com/Faq.cfm?FaqID=191
I just couldn't find the program 'shortcut.exe' cause I dont have a resource kit. If anyone has it, can they email it to me? I'd really appreciate it. thanks! [email protected]
Windows 95 Users
The SHORTCUT.EXE program is available on the Windows 95 CD in thedirectory (folder). To install it into your
- \ADMIN\APPTOOLS\ENVVARS
directory, insert your Windows 95 CD into your CD-ROM drive and then type the following command at any DOS prompt. (Note: Make sure you replace the "X:" with the correct drive letter for your CD-ROM drive).
- C:\WINDOWS\COMMAND
Windows 98 UsersCode:copy X:\admin\apptools\envvars\shortcut.exe c:\windows\command
The SHORTCUT.EXE program is not included on the Windows 98 CD. However, it is contained within the self-extracting ENVARS.EXE file which is available for download directly from Microsoft. To install it, click here to download ENVARS.EXE (44,542 bytes) and then save it directly into yourdirectory (folder). When the download has finished, (which shouldn't take but a few seconds), get to any DOS prompt and type the following four commands:
- C:\WINDOWS\COMMAND
Windows NT UsersCode:c:
cd\windows\command
echo y|envars -o shortcut.exe
del envars.exe
Your version of SHORTCUT.EXE is different. You should NOT try to use the Windows 9x version.
Windows 9x Users
To see the brief help included with SHORTCUT.EXE, type the following command at any DOS prompt:As an example of how to use it, let's say:Code:shortcut /?
The three DOS commands needed would then be:
- You have SOL.EXE (the Windows Solitaire card game) in your
- C:\WINDOWS
directory. (You can check by typingat any DOS prompt).Code:dir c:\windows\sol.exe
- You want to name the shortcut Solitaire
If you like you can go ahead and check your new shortcut while you're still in DOS with the following command:Code:c:
cd\windows\desktop
shortcut -f -t c:\windows\sol.exe -n Solitaire.lnk -d c:\windows
That's all there is to it. TypeCode:start c:\windows\desktop\solitaire.lnk
to return to Windows.Code:exit
I still couldn't find shortcut.exe on technet CDs I have the Resource kit 4.0 utilities but its not there. I tried doing a search as well as installing the resource kit. Im sure the shortcut.exe is not that big, so is it possible if you guys/gals can send me a copy? Email at [email protected] Thanks alot for your help.
You must have missed the link in my above response. Here it is again in URL form:
http://download.microsoft.com/downlo...-US/envars.exe