View Single Post
Old 09-18-2004, 03:20 AM   #2 (permalink)
sippin codeine
 
Super Techie

Join Date: Jun 2004

Posts: 312

sippin codeine

Send a message via Yahoo to sippin codeine
Default

I don't think you can do this with a bat file, you *might* be able to do it with a vbs file, I really hate vb and I get a headache when looking at that code so you should check out google to see if you can find some examples.

EDIT:
I found this sad piece of text, but its for VB, and not a VBS file, so you would have to do some modifiction if it will even work.

Code:
Dim WSHShell, fs

Set WSHShell = WScript.CreateObject("WScript.Shell")

Set fs = WScript.CreateObject("Scripting.FileSystemObject")

Function MakeDesktopShortcut( name, target )

Dim Shortcut,DesktopPath,StartupPath

DesktopPath = WSHShell.SpecialFolders("Desktop")

Set Shortcut = WSHShell.CreateShortcut(DesktopPath & "\" &

name & ".lnk")

Shortcut.TargetPath = target

StartupPath = fs.GetParentFolderName( target )

If fs.FolderExists( StartupPath ) then

   Shortcut.WorkingDirectory = StartupPath

End If

Shortcut.Save

End Function

MakeDesktopShortcut "Shortcut to Notepad", "C:\Windows\-Notepad.exe"

__________________
**[System specs]**

Delphi Enterprise 6 - 7
VB 6.0 - 2005 EE
sippin codeine is offline