|
baomaboy
银牌会员
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
|
2007-3-18 05:40 |
|
|
eech
高级用户
积分 906
发帖 346
注册 2006-7-10
状态 离线
|
|
2007-3-19 07:39 |
|
|
kich
中级用户
积分 397
发帖 168
注册 2006-10-8
状态 离线
|
『第
3 楼』:
很想知道为什么代码要加密!!
或者是用其他软件编写的VBS脚本!!
|
|
2007-3-19 10:41 |
|
|
baomaboy
银牌会员
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第
4 楼』:
Quote: | Originally posted by eech at 2007-3-19 07:39:
有BAT版的吗? |
|
搜无奈何版主的 sendto+中有
|
|
2007-3-20 05:08 |
|
|
youkkk
中级用户
积分 274
发帖 119
注册 2006-10-17
状态 离线
|
『第
5 楼』:
Quote: | Originally posted by eech at 2007-3-19 07:39:
有BAT版的吗? |
|
mkdir f:\备份\%date:~0,10%
运行前最好修改一下时间显示.
[HKEY_CURRENT_USER\Control Panel\International]
"s1159"=""
"s2359"=""
"sLongDate"="yyyy-MM-dd"
"sShortDate"="yyyy-MM-dd"
|
|
2007-3-30 23:33 |
|
|
wangweihebtu
初级用户
积分 27
发帖 13
注册 2006-12-11
状态 离线
|
|
2007-4-2 10:16 |
|
|
baomaboy
银牌会员
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第
7 楼』:
Quote: | Dim WshSHell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WinVer = WshSHell.Environment("Process")
Set Args = WScript.Arguments
CloseTime = 5
FileName = WScript.ScriptName
FileFullName = WScript.ScriptFullName
FilePath = FSO.GetParentFolderName(FileFullName)
InsPath = FSO.GetSpecialFolder(1)
InsFullName = FSO.BuildPath(InsPath ,FileName)
Copyright="玲珑科技"
QQ="QQ:25926183"
Email="Email:fty1995@163.com"
InsTitle="以当前日期新建文件夹"
InsAnswer="生成当前日期文件夹"
RegPath1="HKEY_CLASSES_ROOT\*\shell\NameDataFolder\"
RegValue1="生成当前日期文件夹"
RegForm1="REG_SZ"
RegPath2="HKEY_CLASSES_ROOT\*\shell\NameDataFolder\command\"
RegValue2="wscript.exe " & chr(34) & InsFullName & chr(34) & " " & chr(34) & "%L" & chr(34)
RegForm2="REG_SZ"
RegPath3="HKEY_CLASSES_ROOT\Directory\shell\NameDataFolder\"
RegValue3="生成当前日期文件夹"
RegForm3="REG_SZ"
RegPath4="HKEY_CLASSES_ROOT\Directory\shell\NameDataFolder\command\"
RegValue4="wscript.exe " & chr(34) & InsFullName & chr(34) & " " & chr(34) & "%L" & chr(34)
RegForm4="REG_SZ"
IF FileFullName <> InsFullName then
intAnswer = MsgBox("【是】将“"+ InsAnswer +"”加入到右键菜单,"&Chr(10)&Chr(10)&"【否】将“"+ InsAnswer +"”从右键菜单删除。 ", vbQuestion + vbYesNoCancel, "安装 - "+ InsTitle +" - "+ Copyright)
If intAnswer = vbYes Then
WshSHell.RegWrite RegPath1,RegValue1,RegForm1
WshSHell.RegWrite RegPath2,RegValue2,RegForm2
WshSHell.RegWrite RegPath3,RegValue3,RegForm3
WshSHell.RegWrite RegPath4,RegValue4,RegForm4
FSO.GetFile(FileFullName).Copy(InsFullName)
WshSHell.popup _
"添加脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"添加注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "安装成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
If intAnswer = vbNo Then
WshSHell.RegDelete RegPath4
WshSHell.RegDelete RegPath3
WshSHell.RegDelete RegPath2
WshSHell.RegDelete RegPath1
FSO.DeleteFile InsFullName
WshSHell.popup _
"删除脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"删除注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "卸载成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
If intAnswer = vbCancel Then
end if
ELSE
if Args.count="0" then:WScript.Quit(0):end if
Package = WScript.Arguments.Item(0)
PkgName=FSO.GetBaseName(Package)
PkgPath=FSO.GetParentFolderName(Package)
MyDateStr=split(Date,"-")
if Len(MyDateStr(1))=1 then
MyDateStr(1) = "0"&MyDateStr(1)
end if
if Len(MyDateStr(2))=1 then
MyDateStr(2) = "0"&MyDateStr(2)
end if
MyDate=MyDateStr(0)&"-"&MyDateStr(1)&"-"&MyDateStr(2)
if (FSO.FolderExists(FSO.BuildPath(PkgPath ,MyDate))) Then
WshSHell.popup +chr(10)+ _
"您要生成的文件夹“"&MyDate&"”已经存在,现在将退出。" + _
chr(10)+chr(10) & CloseTime & " 秒后本窗口自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "操作失败 - "+ InsTitle +" - "+ Copyright, 0 + 48
Call quitch
else
Set NewFile = FSO.CreateFolder(FSO.BuildPath(PkgPath ,MyDate))
end if
End IF
Call quitch
sub quitch()
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0)
end sub |
|
[ Last edited by baomaboy on 2008-3-25 at 01:06 AM ]
|
好多菩提树,好多明镜台。本来好多物,好多的尘埃。 |
|
2007-4-4 07:41 |
|
|
baomaboy
银牌会员
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
|
2007-4-4 07:41 |
|
|
zhoushijay
高级用户
Autowalk
积分 845
发帖 375
注册 2007-3-3
状态 离线
|
『第
9 楼』:
md %date:~0,4%-%date:~5,2%-%date:~8,2%
::BAT版创建日期文件夹(不同版本可能日期现实格式不同,影响变量截取)
[ Last edited by zhoushijay on 2007-4-3 at 07:10 PM ]
|
|
2007-4-4 08:08 |
|