- Joined
- Mar 22, 2008
- Messages
- 580 (0.09/day)
System Name | X-Class MKII |
---|---|
Processor | Intel Core i7-6950X Extreme Edition 4.60GHz 25MB Cache 14nm LGA2011-3 Broadwell-E 10-Core Processor |
Motherboard | EVGA Intel X99 Classified Dual Quad-Channel DDR4 Socket LGA2011-3 E-ATX Motherboard on BIOS v2.09 |
Cooling | BP Summit M CPU WB/BP EVGA K|NGP|N FCWB/Nemesis 480GTR/Nemesis 560GTR/MMRS 150mm/Swiftech MCP655 |
Memory | Corsair Dominator Platinum 128GB (8×16GB) @ 2800MHz 14-16-16-36 DDR4 PC4-22400 Memory Kit |
Video Card(s) | EVGA nVidia GeForce GTX 1080 Ti K|NGP|N 2139MHz 11264MB @ 12992MHz GDDR5X Video Cards in 2-Way SLI |
Storage | Samsung 970 PRO M.2 1TB NVMe V-NAND SSD on AquaComputer kryoM.2 PCIe 3.0 ×4 M.2 Adapter |
Display(s) | LG 34GN850-B 34” UltraGear 21:9 WQHD Nano IPS 1ms 144Hz HDR Gaming Monitor |
Case | CaseLabs MAGNUM SMA8 Gunmetal Single Wide Full-Tower Chassis with Custom Smoke Window Panel |
Audio Device(s) | Creative Sound Core3D On-Board 5.1 Surround Sound Quad-Core Audio Processor |
Power Supply | Corsair Professional Series AX1500i 1500-Watt 80+ TITANIUM Fully-Modular Digital Power Supply Unit |
Mouse | Logitech G502 PROTEUS SPECTRUM Core 200-12000DPI Laser Gaming Mouse |
Keyboard | Logitech G19 Gaming Keyboard with Full Color GamePanel LCD |
Software | Microsoft Windows 10 Professional 64-bit |
I've created a Batch file which calls on the following VB Script to be able to create a shortcut to my desktop:
VB Script (named createLink.vbs):
Batch File Example (for Windows Notepad):
But after creating the shortcut using this method, I'm not able to assign a custom icon for the shortcut. I get the following error message when trying to do so:
Any help and ideas on what I need to put into the VB Script and/or Batch File to be able to do this would be greatly appreciated!
Also, I know that I can simply do this by going to Start Menu\All Programs\Accessories\ right-clicking on Notepad and selecting Send to\Desktop (create shortcut). Easy enough for creating a single shortcut. But I need to create several multiple shortcuts and using this Batch/VBS method would really save me a lot of time in doing so.
VB Script (named createLink.vbs):
Code:
set objWSHShell = CreateObject("WScript.Shell")
set objFso = CreateObject("Scripting.FileSystemObject")
' command line arguments
' TODO: error checking
sShortcut = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(0))
sTargetPath = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(1))
sWorkingDirectory = objFso.GetAbsolutePathName(sShortcut)
set objSC = objWSHShell.CreateShortcut(sShortcut)
objSC.TargetPath = sTargetPath
objSC.WorkingDirectory = sWorkingDirectory
objSC.Save
Batch File Example (for Windows Notepad):
Code:
@echo off
cscript createLink.vbs "C:\Users\Administrator\Desktop\Notepad.lnk" "C:\Windows\System32\notepad.exe"
But after creating the shortcut using this method, I'm not able to assign a custom icon for the shortcut. I get the following error message when trying to do so:

Any help and ideas on what I need to put into the VB Script and/or Batch File to be able to do this would be greatly appreciated!

Also, I know that I can simply do this by going to Start Menu\All Programs\Accessories\ right-clicking on Notepad and selecting Send to\Desktop (create shortcut). Easy enough for creating a single shortcut. But I need to create several multiple shortcuts and using this Batch/VBS method would really save me a lot of time in doing so.
Last edited: