Creating Windows Shortcuts to MS-DOS program

  CLONNEN 10:18 26 Jun 2005
Locked

I have managed to write some code which creates a shortcut in the Start Menu Accessories folder but when I click on it the MSDOS window runs the batch file and then terminates the session. I want the Command Line in the Shortcut Properties to say C:\WINDOWS\COMMAND.COM and have the Batch file line say C:\VDMSOUND\DOSDRV.BAT

At the moment the DOSDRV.BAT line is appearing in the command line in the Shortcut Properties. How do I edit the code to get what I want?

Set WSHShell = WScript.CreateObject("WScript.Shell")
StartMenuPath = WSHShell.SpecialFolders("StartMenu")
Set MyShortcut = WSHShell.CreateShortcut(StartMenuPath & "\Programs\Accessories" & "\VDMSound.lnk")
MyShortcut.TargetPath = "C:\VDMSOUND\DOSDRV.BAT"
MyShortcut.WorkingDirectory = "C:\VDMSound"
MyShortcut.Arguments = ""
MyShortcut.Description = "VDMSound for Windows 9x"
MyShortcut.HotKey = "ALT+CTRL+V"
MyShortcut.WindowStyle = 4
MyShortcut.IconLocation = "C:\WINDOWS\SYSTEM\PIFMGR.DLL, 0"
MyShortcut.Save

  CLONNEN 10:56 26 Jun 2005

This is VBscript code by the way. Can anyone help me?

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

The Evil Within 2 review-in-progress

InVision Studio takes on Adobe XD and Sketch

iPhone X news: Release date, price, new features & specs

Comment transformer un iPhone en borne Wi-Fi ?