
How to run a shorcut,open a DOC file etc.?
Sorry for my poor English
I want to "open" a file with Windows relation program,
Just like mouse double clik the icon in the desktop,
I use WinApi funtion shellex in VB 6.0
and I use these codes in wsh:
set wshshell=wscript.createobject("wscript.shell")
'start a shrocut
filename="c:\windows\desktop\vb6.lnk"
wshshell.run "start "&filename
'open a file with default program
filename="c:\samples.jpg"
wshshell.run "start "&filename
The codes work,but I must depend on a command file "start.exe"and display a
DOS-like box... Is there some
better metho? Can anyone help me? Thanks.