Allen,
Yes. This is what I want and I have modified it. However, it doesn't work.
Here's what I have now using your help:
if ingroup("ChicagoMM")
if exist("%userprofile%\desktop\MicroMainXM.lnk")=0
$=WshShortCut("%userprofile%\desktop\MicroMainXM.lnk","D:\Citrix MicroMain\Chicago\micromainxm.mde")
? @serror
else
? "Already Exists"
endif
if exist("%userprofile%\desktop\xmREPORT.lnk")=0
$=WshShortCut("%userprofile%\desktop\xmREPORT.lnk","D:\Citrix MicroMain\Chicago\xmreport.mde")
? @serror
else
? "Already Exists"
endif
endif
if ingroup("LansingMM")
if exist("%userprofile%\desktop\MicroMainXM.lnk")=0
$=WshShortCut("%userprofile%\desktop\MicroMainXM.lnk","D:\Citrix MicroMain\Lansing Mall\micromainxm.mde")
? @serror
else
? "Already Exists"
endif
if exist("%userprofile%\desktop\xmREPORT.lnk")=0
$=WshShortCut("%userprofile%\desktop\xmREPORT.lnk","D:\Citrix MicroMain\Lansing Mall\xmreport.mde")
? @serror
else
? "Already Exists"
endif
endif
if ingroup("Test_LansingMallMM")
if exist("%userprofile%\desktop\MicroMainXM.lnk")=0
$=WshShortCut("%userprofile%\desktop\MicroMainXM.lnk","D:\Citrix MicroMain\Test Lansing Mall\micromainxm.mde")
? @serror
else
? "Already Exists"
endif
if exist("%userprofile%\desktop\xmREPORT.lnk")=0
$=WshShortCut("%userprofile%\desktop\xmREPORT.lnk","D:\Citrix MicroMain\Test Lansing Mall\xmreport.mde")
? @serror
else
? "Already Exists"
endif
endif
function WshShortCut($path,$targetpath,optional $arguments,optional $startdir,optional $iconpath,optional $style)
dim $shell,$shortcut
$shell=createobject("wscript.shell")
if $shell
$shortcut=$shell.createshortcut($path)
if $shortcut
$shortcut.targetpath=$targetpath
if $arguments
$shortcut.arguments=$arguments
endif
if $startdir
$shortcut.workingdirectory=$startdir
endif
if $iconpath
$shortcut.iconlocation=$iconpath
endif
if $style
$shortcut.windowstyle=$style
endif
$shortcut.save
$shortcut=0
endif
$shell=0
endif
exit @error
endfunction
Yet, this only puts 2 icons on the desktop. Any ideas?