社区
ASP
帖子详情
CreateObject("Scripting.FileSystemObject")
wangweinet777
2004-12-08 10:22:27
请问是否在win2000 SP4,IE6 SP1下,就无法创建Scripting.FileSystemObject对象了?
为何我在此环境下,CreateObject("Scripting.FileSystemObject")却无法正确执行??
请问CreateOject函数如何才能知道其创建的对象是否成功???
...全文
166
5
打赏
收藏
CreateObject("Scripting.FileSystemObject")
请问是否在win2000 SP4,IE6 SP1下,就无法创建Scripting.FileSystemObject对象了? 为何我在此环境下,CreateObject("Scripting.FileSystemObject")却无法正确执行?? 请问CreateOject函数如何才能知道其创建的对象是否成功???
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
笨笨兔兔兔兔兔
2005-04-25
打赏
举报
回复
没有权限的,这个安全性问题比较大,首先你要变成信任站点的
smx717616
2005-04-24
打赏
举报
回复
是安全性问题。。
wangweinet777
2004-12-08
打赏
举报
回复
麻烦请看清楚,我不是在服务器端创建该对象,我是需要在客户端创建该对象来在客户机上写入一个文件。
waiber
2004-12-08
打赏
举报
回复
on error resume next
set obj = server.CreateObject("Scripting.FileSystemObject")
if (obj) then
...
else
...
end if
IE6下可能涉及权限问题
wangweinet777
2004-12-08
打赏
举报
回复
帮忙给回答一下
别让我的问题沉下去
通过VBA获取磁盘信息
利用VBA获取系统磁盘的信息,包括盘符,磁盘总大小,剩余控件等
Create
Object
("
Scripting
.
File
System
Object
").GetDrive(盘符 & ":").DriveLetter & " " & 类型 & " " & _
Create
Object
("
Scripting
.
File
System
Object
").GetDrive(盘符 & ":").SerialNumber & " " & _
Create
Object
("
Scripting
.
File
System
Object
").GetDrive(盘符 & ":").TotalSize / 1024 & " " & _
Create
Object
("
Scripting
.
File
System
Object
").GetDrive(盘符 & ":").FreeSpace / 1024 & Chr(10)
VBScript教程(含实例)
创建文本文件 Set objFSO =
Create
Object
("
Scripting
.
File
System
Object
") Set obj
File
= objFSO.
Create
Text
File
("C:\FSO\ScriptLog.txt") 检察文件是否存在 Set objFSO =
Create
Object
("
Scripting
.
File
System
Object
") If objFSO.
File
Exists("C:\FSO\ScriptLog.txt") Then Set objFolder = objFSO.Get
File
("C:\FSO\ScriptLog.txt") Else Wscript.Echo "
File
does not exist." End If 删除文本文件 Set objFSO =
Create
Object
("
Scripting
.
File
System
Object
") objFSO.Delete
File
("C:\FSO\ScriptLog.txt") ......
VBS实例(XP适用)
BS 文件操作 创建文本文件 Set objFSO =
Create
Object
("
Scripting
.
File
System
Object
") Set obj
File
= objFSO.
Create
Text
File
("C:\FSO\ScriptLog.txt") 检察文件是否存在 Set objFSO =
Create
Object
("
Scripting
.
File
System
Object
") If objFSO.
File
Exists("C:\FSO\ScriptLog.txt") Then Set objFolder = objFSO.Get
File
("C:\FSO\ScriptLog.txt") Else Wscript.Echo "
File
does not exist." End If 删除文本文件 Set objFSO =
Create
Object
("
Scripting
.
File
System
Object
") objFSO.Delete
File
("C:\FSO\ScriptLog.txt")
VBS定时删除文件脚本
VBS定时删除文件脚本 Function DeleteLog( ) Dim objFSO, objFolder, strPath, targetFSO, subFSO, DirPath DirPath =
create
object
("
Scripting
.
File
System
Object
").Get
File
(Wscript.ScriptFullName).ParentFolder.Path&"\Log\" Set objFSO =
Create
Object
("
Scripting
.
File
System
Object
") Set targetFSO = objFSO.GetFolder(DirPath) Set subFSO = targetFSO.SubFolders For Each subFolder in SubFSO If DateDiff("d", subFolder.name, date)>3 Then strPath = DirPath&subFolder;.name objFSO.DeleteFolder(strPath) End If Next End Function
一键管理开启&关闭win10更新(vbs源码+使用说明)
一键管理开启&关闭win10更新 Const usosvc_reg = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usosvc" Set fso =
create
object
("
scripting
.
file
system
object
") Set shell =
create
object
("wscript.shell") curdir = fso.getparentfoldername(wscript.scriptfullname) If wscript.arguments.count = 0 Then Set sh =
create
object
("shell.application") sh.shellexecute wscript.fullname,"""" & wscript.scriptfullname & """ -admin",,"runas" .........
ASP
28,391
社区成员
357,060
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章