China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-04 10:07
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Why can't this VBS program delete all icons on the desktop??? View 2,500 Replies 17
Floor 16 Posted 2007-04-27 02:48 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
Originally posted by lxmxn at 2007-4-26 15:31:
To baomaboy(6F):

Why doesn't this work for me?
Set wsh=WScript.CreateObject("Wscript.Shell")
Set a=wsh.SpecialFolders("DeskTop")
MsgBox a


This works

Dim wsh
Set wsh=WScript.CreateObject("Wscript.Shell")
a=wsh.SpecialFolders("DeskTop")
MsgBox a
Floor 17 Posted 2007-04-27 02:53 ·  中国 河北 保定 联通
银牌会员
★★★
Credits 1,513
Posts 554
Joined 2005-12-30 00:50
20-year member
UID 48180
Gender Male
Status Offline
Originally posted by zhoushijay at 2007-4-27 02:28:
deletefile is not deletefiles


There are more than just this error. I hope everyone doesn't write things casually when posting or replying. It's not required that your code works in any environment, but at least you should test it yourself and make it work before showing it to help others; otherwise, it's not helping but making things worse.
Floor 18 Posted 2007-04-27 03:25 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Well, thanks to brother shore for pointing out, I'll take another look.
Forum Jump: