发新话题
打印

[分享] 分享下我的MortScript脚本,硬启后自安装

本主题由 老虎也爱大米 于 2008-1-25 12:52 设置高亮

分享下我的MortScript脚本,硬启后自安装

既然有人有兴趣了解PPC上的MortScript脚本编程,那我就把我的脚本贴出来给大家参考下。

下面的贴图中有我的文件目录结构。以让大家了解下我脚本中的路径使用。

以下是我使用的所有脚本文件名:

SETUP.mscr    主安装脚本,点一下安装所有
Extended_ROM.mscr
MyTools.mscr
SOFT.mscr
System.mscr
Other.mscr

图片中的 F: 驱动器符,在PPC中硬启后,应该是 \存储卡
附件: 您所在的用户组无法下载或查看附件
本帖最近评分记录
  • 老虎也爱大米 威望 +4 今天才看到兄弟,不好意思了,支持原创! 2008-1-25 12:51
  • 老虎也爱大米 金钱 +2 今天才看到兄弟,不好意思了,支持原创! 2008-1-25 12:51

TOP

SETUP.mscr 脚本内容

#安装预定软件
If (Question("开始安装预定义软件吗?","硬启后安装",OkCancel))
sleepmessage( 5,"即将开始安装,请不要执行任何操作,直到提示完成!^CR^除非安装程序需要你手动参与。","硬启后安装",true )
#导入主人信息,这是我自己的个人信息,我的手机号码就在里面
RegWriteBinary ("HKCU","\ControlPanel\Owner","Owner","7A007A006200690061006F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007F5E1C4E0177F16D3357025E577F566E3A5300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031003300390032003700340038003400320039003200000000000000000000000000000000000000000000000000000000007A007A006200690061006F0040003100330039002E0063006F006D0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
#安装系统补丁
RunWait ("\存储卡\Backup\SETUP\Extended_ROM.mscr")
#安装常用软件
RunWait ("\存储卡\Backup\SETUP\SOFT.mscr")
#安装常用工具箱
RunWait ("\存储卡\Backup\SETUP\MyTools.mscr")
#系统优化
RunWait ("\存储卡\Backup\SETUP\System.mscr")
#其它
RunWait ("\存储卡\Backup\SETUP\Other.mscr")

#删除系统无用文件
Delete ("\Windows\启动\LoadVDisk.lnk")
Delete ("\Windows\启动\STK.lnk")
Delete ("\Windows\*.tsk")
#Delete ("\Windows\Rings\*")
DelTree ("\存储卡\Temp\Extended_ROM\*")
delTree ("\存储卡\Temp\Soft\*")
rmdir ("\存储卡\Temp\Extended_ROM")
rmdir ("\存储卡\Temp\soft\")
#软启
Reset
else
sleepmessage( 3,"取消安装,没有执行任何操作!","硬启后安装",true )
endif

TOP

Extended_ROM.mscr 脚本内容

#Extended_ROM 安装脚本
sleepmessage(3,"开始安装系统补丁Extended_ROM及其它必装软件","安装系统补丁",true)

#拷贝安装文件到临时目录
if (not DirExists( "\存储卡\Temp" ))
MkDir( "\存储卡\Temp")
endif
MkDir( "\存储卡\Temp\Extended_ROM")
TempDir = "\存储卡\Temp\Extended_ROM"
SoftDir = SystemPath("ScriptPath") & "\Extended_ROM"
xcopy (%SoftDir% & "\*",%TempDir%)

#系统补丁
RunWait( %TempDir% & "\Customize_106153.sa.CAB")
RunWait( %TempDir% & "\CAB-ArcsoftMMS-2.0.0.22-Magician-CHS-11Mar05.CAB")
RunWait( %TempDir% & "\Dopod_CHS_Customization_Magician_10292004.sa.CAB")
RunWait( %TempDir% & "\CameraWizard_Magician_Generic_CHS_RC17_to_RC18.CAB")
RunWait( %TempDir% & "\DopodCHS_PhonePH_111167.sa.CAB")
RunWait( %TempDir% & "\BatteryPatch20050411.CAB")
RunWait( %TempDir% & "\BT_COM_PORT.CAB")
RunWait( %TempDir% & "\DopodCHS_STK23200_Wappush_112121.sa.CAB")
RunWait( %TempDir% & "\Version_CHS_112140.sa.cab")
#蓝牙立体声补丁
RunWait( %TempDir% & "\BCHS_FOR_POCKET_PC_OZONE.ARMV4.CAB")
#智能拨号键盘(T9)
RunWait( %TempDir% & "\T9.CAB")
#IP拨号器
RunWait( %TempDir% & "\IPDial.CAB")
RegWriteString ("HKLM","\SOFTWARE\Microsoft\PimApps\PimExtensions\Contacts\AddIns\MyPrefixDial","Menu","IP拨号")
#语音控制
RunWait( %TempDir% & "\Cyberon Voice Commander 2.0.608142 chs.cab")
#PIE插件
RunWait( %TempDir% & "\PIEPlus_V2.2.cab")
#激活码
RegWriteString ("HKLM","\SOFTWARE\ReenSoft\PIEPlus","ActCode","80080747")
#在线播放Flash7的PIE插件
#RunWait( %TempDir% & "\fp7_ppc_en.cab")

#英文键盘HappyTappingKeyboard输入法
RunWait( %TempDir% & "\HappyTappingKeyboard.arm.CAB")
RegWriteString ("HKCR","\CLSID\{F9A103FF-B5E2-4eae-8C34-0ADC26116C4B}","","英文键盘输入")
#RescoKeyboard键盘
#RunWait(%TempDir% & "\RKeyboard_p.ARM.CAB")
#屏蔽不需要的输入法[手写]和[拼音]
RegWriteString ("HKCR","\CLSID\{DF2BF912-1A9A-11D2-8F89-00C04FAC52F9}\IsSIPInputMethod","","0")
RegWriteString ("HKCR","\CLSID\{9E06C6B8-FE4D-4206-9A5B-6E4C1B8B6AD7}\IsSIPInputMethod","","0")
#梅花输入法
RunWait( %TempDir% & "\PlumSIP 5.0.2 Screen.cab")
#删除空目录
rmdir("\Program Files\PlumSIP 5.0")
#设置默认输入法为梅花输入法
RegWriteString ("HKCU","ControlPanel\Sip","DefaultIm","{655CB1DE-3D81-4bda-922C-DCF5E248820B}")
#系统对话框,被我做成CAB包了,直接安装进windows目录
RunWait( %TempDir% & "\FileDlgChg.cab")
#安装雅黑字体,被我做成storage安装版了
RunWait( %TempDir% & "\MS_YAHEI_Font.cab")

TOP

SOFT.mscr 脚本内容

#安装常用软件
sleepmessage(3,"开始安装常用软件","安装常用软件",true)
if (not DirExists( "\存储卡\Temp" ))
MkDir( "\存储卡\Temp")
endif
TempDir = "\存储卡\Temp\SOFT"
MkDir(%TempDir%)
SoftDir = SystemPath("ScriptPath") & "\SOFT"
Prgm = SystemPath("ProgramFiles")
ProMenu = SystemPath("ProgramsMenu")
if (not DirExists( "\Storage\Program Files" ))
MkDir( "\Storage\Program Files")
endif

xcopy (%SoftDir% & "\*",%TempDir%)

#SD变U盘
RunWait(%TempDir% & "\Softick_Card_Export_II_V3.00.cab")
#安装Flash播放器
#RunWait(%TempDir% & "\Flash_Player_Mobile_1.1.0_CN_DHL.cab")
#安装GPRS监测今日插件
RunWait(%TempDir% & "\GPRSMonitor_ppc1.1_CHS.arm.cab")
xcopy (%SoftDir% & "\GPRSMonitor\*","\Program Files\Smartphone GPRS Traffic Monitor for Pocket PC",true)
#安装RESCO 资源管理器
RunWait(%TempDir% & "\RescoExplorer_PocketGear.ARM.CAB")
#注册表插件
RunWait(%TempDir% & "\RegistryMUI_p.ARM.CAB")
#FTP插件
RunWait(%TempDir% & "\FtpAddinMUI_p.ARM.CAB")
#今日插件
RunWait(%TempDir% & "\RETodayMUI_p.ARM.CAB")
#复制授权许可文件
copy(%SoftDir% & "\RescoExplorer\wmtrigger.dat","\Windows\wmtrigger.dat",true)
#删除内置压缩插件
delete("\Program Files\Resco Explorer\RZipShell.dll")
#安装PZP情景模式
RunWait(%TempDir% & "\PZPToolsWM2003.arm.cab")
RunWait (%TempDir% & "\PZPTrayWM2003.arm.cab")
#复制语言和模式备份文件
#MkDir ("\Program Files\PZPTools\PZPLang")
#xcopy (%SoftDir% & "\PZP2003\PZPLang\*","\Program Files\PZPTools\PZPLang",true)
MkDir ("\Program Files\PZPTools\PZPModes")
xcopy (%SoftDir% & "\PZP2003\PZPModes\*","\Program Files\PZPTools\PZPModes",true)
#复制授权文件
xcopy (%SoftDir% & "\PZP2003\*","\Program Files\PZPTools",true)
#安装来电精灵
if (not DirExists( "\Storage\Program Files\PhoneSharpp" ))
MkDir("\Storage\Program Files\PhoneSharpp")
endif
xcopy ("\存储卡\Backup\SETUP\SOFT\PhoneSharpp\*","\Storage\Program Files\PhoneSharpp")
if (not DirExists( "\Storage\Program Files\PhoneSharpp\Sound" ))
MkDir("\Storage\Program Files\PhoneSharpp\Sound")
endif
xcopy ("\存储卡\Backup\SETUP\SOFT\PhoneSharpp\Sound\*","\Storage\Program Files\PhoneSharpp\Sound")
if (not DirExists( "\Storage\Program Files\PhoneSharpp\skins" ))
MkDir("\Storage\Program Files\PhoneSharpp\skins")
endif
xcopy ("\存储卡\Backup\SETUP\SOFT\PhoneSharpp\skins\*","\Storage\Program Files\PhoneSharpp\skins")
if (not DirExists( "\Storage\Program Files\PhoneSharpp\photo" ))
MkDir("\Storage\Program Files\PhoneSharpp\photo")
endif
xcopy ("\存储卡\Backup\SETUP\SOFT\PhoneSharpp\photo\*","\Storage\Program Files\PhoneSharpp\photo")
copy("\存储卡\Backup\SETUP\SOFT\PhoneSharpp\Loader.exe","\Windows\PhoneLoader.exe")
StartupDir = SystemPath("Startup")
CreateShortcut( %StartupDir% & "\PhoneSharp.lnk","""\windows\PhoneLoader.exe"" ""\Storage\Program Files\PhoneSharpp\PhoneSharpp.exe""")
#安装QQ
RunWait (%TempDir% & "\PPCQQ2007.CAB")
if (not DirExists( "\Storage\Program Files\QQ2007" ))
MkDir( "\Storage\Program Files\QQ2007")
endif
xcopy(%SoftDir% & "\QQ2007\*","\Storage\Program Files\QQ2007")

#安装UCWEB
RunWait (%TempDir% & "\UCWEB_PPC2003.CAB")
if (not DirExists( "\Storage\Program Files\UCWEB" ))
MkDir("\Storage\Program Files\UCWEB")
endif
xcopy(%SoftDir% & "\UCWEB\*","\Storage\Program Files\UCWEB")

#安装脑钟
if (not DirExists( "\Storage\Program Files\Chronos" ))
MkDir("\Storage\Program Files\Chronos")
endif
xcopy ("\存储卡\Backup\SETUP\SOFT\Chronos3.5\Chronos\*","\Storage\Program Files\Chronos")
if (not DirExists( "\Storage\Program Files\Chronos\Sounds" ))
MkDir("\Storage\Program Files\Chronos\Sounds")
endif
xcopy ("\存储卡\Backup\SETUP\SOFT\Chronos3.5\Chronos\Sounds\*","\Storage\Program Files\Chronos\Sounds")
if (not DirExists( "\Storage\Program Files\Chronos\skins" ))
MkDir("\Storage\Program Files\Chronos\skins")
endif
xcopy ("\存储卡\Backup\SETUP\SOFT\Chronos3.5\Chronos\skins\*","\Storage\Program Files\Chronos\skins")
xcopy("\存储卡\Backup\SETUP\SOFT\Chronos3.5\放入Windows\*","\Windows")
RunWait("\Storage\Program Files\Chronos\Chronos.exe")
CreateShortcut( %ProMenu% & "\闹钟.lnk","\Storage\Program Files\Chronos\Chronos.exe")
#脑钟今日插件
RegWriteString ("HKLM","\SOFTWARE\Microsoft\Today\Items\ChronosToday","DLL","\windows\ChronosToday.dll")
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\ChronosToday","Enabled",1)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\ChronosToday","Flags",0)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\ChronosToday","Options",0)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\ChronosToday","Order",0)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\ChronosToday","Type",4)

#PC操控PPC
copy ("\存储卡\Backup\SETUP\SOFT\ppc端-绿色.exe","\Storage\Program Files\ppc端-绿色.exe")
CreateShortcut( %ProMenu% & "\其它\PC操控-PPC端.lnk","\Storage\Program Files\ppc端-绿色.exe")

MyTools.mscr 脚本内容

#安装小工具
sleepmessage(3,"开始安装常用工具箱","安装工具箱",true)
#复制文件
ToolsDir = "\Storage\Program Files\MyTools"
SoftDir = SystemPath("ScriptPath") & "\MyTools"
StartupDir = SystemPath("Startup")
ProMenu = SystemPath("ProgramsMenu") & "\工具箱"
if (not DirExists( %ToolsDir% ))
MkDir(%ToolsDir%)
endif
MkDir(%ProMenu%)

xcopy( %SoftDir% & "\*",%ToolsDir%)
#快速菜单
xcopy( %SoftDir% & "\QuickMenu\*","\Windows")
run("\Windows\QuickMenu.exe")
#魔法按钮启动项和配置
xcopy( %SoftDir% & "\mButton\*","\Windows")
CreateShortcut( %StartupDir% & "\Magic Button.lnk","\windows\Magic Button 2.0.exe")
RegWriteBinary ("HKCU","\Software\TranCreative\MagicButton","Settings","00000000010000002C010000010000000400000001000000")
#使[电话]和[STK服务][邮件服务]项为“非活动时隐藏”“保持激活”
RegWriteDWord( "HKCU","\Software\TranCreative\MagicButton","CP1283658612",2)
RegWriteDWord( "HKCU","\Software\TranCreative\MagicButton","CP12985401",2)
RegWriteDWord( "HKCU","\Software\TranCreative\MagicButton","CP1326648925",3)
#隐藏 QQ
RegWriteDWord( "HKCU","\Software\TranCreative\MagicButton","CP706783512",1)
#隐藏 语音拨号
RegWriteDWord( "HKCU","\Software\TranCreative\MagicButton","CP-662014552",2)

#CAB文件关联和配置
RegWriteString ("HKCR","\.cab","","cabfile")
RegWriteString ("HKCR","\cabfile\Shell\Open\Command","","""" & %ToolsDir% & "\cabinstl.exe"" ""%1""")
RegWriteDWord  ("HKCU","\Software\sk\CabInstl","nodelete",1)
#RAR注册表信息
RegWriteString ("HKCR","\.rar","","PocketRAR")
RegWriteString ("HKCR","\.zip","","PocketRAR")
RegWriteString ("HKCR","\PocketRAR","","WinRAR 压缩文件")
RegWriteString ("HKCR","\PocketRAR\DefaultIcon","",%ToolsDir% & "\rar.exe,0")
RegWriteString ("HKCR","\PocketRAR\shell\open\command","","""" & %ToolsDir% & "\rar.exe"" ""%1""")
RegWriteDWord  ("HKCU","\Software\RAR\Compression","Method",3)
RegWriteDWord  ("HKCU","\Software\RAR\Compression","Solid",1)
RegWriteDWord  ("HKCU","\Software\RAR\Compression","UseRAR",1)
RegWriteDWord  ("HKCU","\Software\RAR\Paths","AppendArcName",1)
RegWriteString ("HKCU","\Software\RAR\Paths","ArcFolder","\Storage Card")
RegWriteString ("HKCU","\Software\RAR\Paths","ExtrFolder","\Storage Card")
RegWriteString ("HKCU","\Software\RAR\Paths","StartFolder","")
RegWriteString ("HKCU","\Software\RAR\Paths","TempFolder","\Storage Card\Temp")
RegWriteDWord  ("HKCU","\Software\RAR\Setup\.rar","Set",1)
RegWriteDWord  ("HKCU","\Software\RAR\Setup\.zip","Set",1)
#记事本文件关联
RegWriteString ("HKCR","\.ini","","txtfile")
RegWriteString ("HKCR","\txtfile\DefaultIcon","",%ToolsDir% & "\NotePad.exe,0")
RegWriteString ("HKCR","\txtfile\shell\open\command","","""" & %ToolsDir% & "\NotePad.exe"" %1")
RegWriteString ("HKCR","\txtfile\Shell\OpenDoc\Command","","""" & %ToolsDir% & "\NotePad.exe"" %1")
#内存清理设置
RegWriteBinary( "HKLM","\SOFTWARE\ValkSoft\Space Reclaimer","Settings","7F03000000000000E0060000000000005C00530074006F007200610067006500200043006100720064005C00540065006D00700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
#创建程序快捷方式
CreateShortcut( %ProMenu% & "\记事本.lnk",%ToolsDir% & "\NotePad.exe")
CreateShortcut( %ProMenu% & "\注册表编辑器.lnk",%ToolsDir% & "\PHMRegEdit.exe")
CreateShortcut( %ProMenu% & "\任务管理器.lnk",%ToolsDir% & "\TaskMgr.exe")
CreateShortcut( %ProMenu% & "\内存清理.lnk",%ToolsDir% & "\SpaceReclaimer.exe")
CreateShortcut( %ProMenu% & "\系统事件检查.lnk",%ToolsDir% & "\CheckNotif.exe")
CreateShortcut( %ProMenu% & "\存储卡工具.lnk",%ToolsDir% & "\StorageTools.exe")
CreateShortcut( %ProMenu% & "\短信备份精灵.lnk",%ToolsDir% & "\短信备份精灵.exe")
CreateShortcut( %ProMenu% & "\内存深度释放.lnk",%ToolsDir% & "\CloseApps.exe")
CreateShortcut( %ProMenu% & "\内存释放.lnk",%ToolsDir% & "\Hibernate.exe")
CreateShortcut( %ProMenu% & "\屏幕截屏.lnk","\Storage Card\Program Files\Tools\Vidya Screen Capture.exe")
CreateShortcut( %ProMenu% & "\Magic Button 2.0.lnk","\Windows\Magic Button 2.0.exe")
CreateShortcut( %ProMenu% & "\创造快捷方式.lnk",%ToolsDir% & "\TrayLnch.exe")
CreateShortcut( %ProMenu% & "\设备管理器.lnk",%ToolsDir% & "\设备管理器.exe")

TOP

System.mscr 脚本内容

#系统优化
sleepmessage(3,"开始系统优化设置","系统优化",true)

#更改卡名
RegWriteString ("HKLM","\System\StorageManager\Profiles\MMC","Folder","Storage Card")
RegWriteString ("HKLM","\System\StorageManager\Profiles\PCMCIA","Folder","Storage Card")
RegWriteString ("HKLM","\System\StorageManager\Profiles\SDMemory","Folder","Storage Card")
RegWriteString ("HKLM","\System\StorageManager\Profiles\SDMMC","Folder","Storage Card")
#改变PIE上网临时文件目录到存储卡
RegWriteString ("HKCU","\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cache","\Storage Card\Windows\Profiles\guest\Temporary Internet Files")
RegWriteString ("HKCU","\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cookies","\Storage Card\Windows\Profiles\guest\Cookies")
RegWriteString ("HKCU","\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","History","\Storage Card\Windows\Profiles\guest\History")
#改变铃声路径
MkDir ("\Storage\Windows")
MkDir ("\Storage\Windows\Rings")
move ("\Windows\Rings\*","\Storage\Windows\Rings")
RegWriteString ("HKCU","\ControlPanel\SoundCategories\Ring","Directory","\Storage\Windows\Rings\")
#消除托盘内的横屏快捷键
RegWriteDWord ("HKLM","\Services\ScreenRotate","ShowIcon",0)
#更改系统按键设置(日历键为横屏切换键)
RegWriteString ("HKLM","\SOFTWARE\Microsoft\Shell\Keys\40C1","","")
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Shell\Keys\40C1","Flags",12)
#修改运营商标志
RegWriteString ("HKLM","\SOFTWARE\Microsoft\RIL\OperatorNames","46000","中国移不动")
RegWriteString ("HKLM","\SOFTWARE\Microsoft\RIL\OperatorNames","46001","中国联不通")
RegWriteString ("HKLM","\SOFTWARE\Microsoft\RIL\OperatorNames","46002","中国移不动")
#优化文件系统缓存
RegWriteDWord ("HKLM","\System\StorageManager\FATFS","EnableCache",3)
#RegWriteDWord ("HKLM","\System\StorageManager\FATFS","CacheSize",1024)
#优化字体缓存
RegWriteDWord ("HKLM","\System\GDI\GLYPHCACHE","limit",92160)
#系统音量调整加大
#RegWriteDWord ("HKCU","\ControlPanel\Volume","Volume",512))
#提高IE浏览速度
#RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Windows\Currentversion\internetsettings","security_runscripts",0)

#禁止动画菜单
RegWriteDWord ("HKLM","\System\GWE\Menu","AniType",0)
#自动移除不用的DLL
#RegWriteString ("HKLM","\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer","AlwaysUnloadDll","1")
#汽泡显示GPRS关闭按钮和时间
RegWriteDWord ("HKLM","\ControlPanel\Phone","Flags2",16)

Other.mscr 脚本内容

#其它文件关联或设置项
sleepmessage(3,"开始其它软件及设置","安装",true)
ProMenu = SystemPath("ProgramsMenu")
#今日万年历插件
copy ("\存储卡\Program Files\HandCalendar\HCToday.dll","\Windows\HandCalendar.dll")
RegWriteString ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","DLL","\Windows\HandCalendar.dll")
RegWriteString ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","ConfigPath","\Storage Card\Program Files\HandCalendar\")
RegWriteString ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","ConfigData","201111201")
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","Enabled",1)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","Flags",0)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","Options",1)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","Order",0)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\HandCalendar","Type",4)
RegWriteString ("HKLM","\SOFTWARE\HandCalendar","Plugin","\Storage Card\Program Files\HandCalendar\Plugins\")
RegWriteString ("HKLM","\SOFTWARE\HandCalendar","Skin","DEFAULT")
RegWriteDWord ("HKLM","\SOFTWARE\HandCalendar","BackgroundColor",0)
RegWriteDWord ("HKLM","\SOFTWARE\HandCalendar","ConfigData",5021)
RegWriteDWord ("HKLM","\SOFTWARE\HandCalendar","ShowOrder",0)

#隐藏今日项目中的[时间]和[主人信息]
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today\Items\""主人信息""","Enabled",0)
RegWriteDWord ("HKLM","\SOFTWARE\Microsoft\Today","Date",0)
#创建程序快捷方式
CreateShortcut (%ProMenu% & "\SKTools.lnk","\Storage Card\Program Files\SKTools\SKTools.exe")
CreateShortcut (%ProMenu% & "\RescoPhotoViewer.lnk","\Storage Card\Program Files\RescoPhotoViewer\RPicViewPro.exe")
CreateShortcut (%ProMenu% & "\掌上管家.lnk","\Storage Card\Program Files\掌上管家\MoneyPro.exe")
CreateShortcut (%ProMenu% & "\Cash Organizer.lnk","\Storage Card\Program Files\Cash Organizer\Cash Organizer.exe")
MkDir (%ProMenu% & "\娱乐")
CreateShortcut (%ProMenu% & "\娱乐" & "\TCPMP播放器.lnk","\Storage Card\Program Files\TCPMP\PLAYER.exe")
CreateShortcut (%ProMenu% & "\娱乐" & "\RealOnePlayer.lnk","\Storage Card\Program Files\RealOnePlayer\realplayer.exe")
MkDir (%ProMenu% & "\办公")
CreateShortcut (%ProMenu% & "\办公" & "\TextMaker.lnk","\Storage Card\Program Files\SoftMaker Office 2006\TextMaker.exe")
CreateShortcut (%ProMenu% & "\办公" & "\PlanMaker.lnk","\Storage Card\Program Files\SoftMaker Office 2006\PlanMaker.exe")
CreateShortcut (%ProMenu% & "\办公" & "\MDict词典.lnk","\Storage Card\Program Files\MDict\MDict.exe")
CreateShortcut (%ProMenu% & "\办公" & "\金山词霸.lnk","\Storage Card\Program Files\金山词霸\金山词霸 1.2.exe")
CreateShortcut (%ProMenu% & "\办公" & "\远流语音词典.lnk","\Storage Card\Program Files\YLDicDx豪华版\YLDicDx.exe")
CreateShortcut (%ProMenu% & "\办公" & "\Foxit Reader.lnk","\Storage Card\Program Files\Foxit Reader\frppc.exe")
CreateShortcut (%ProMenu% & "\办公" & "\HaaliReader.lnk","\Storage Card\Program Files\HaaliReader\HaaliReader.exe")
CreateShortcut (%ProMenu% & "\办公" & "\PocketArtist.lnk","\Storage Card\Program Files\PocketArtist\PocketArtist.exe")
CreateShortcut (%ProMenu% & "\办公" & "\PocketPainter.lnk","\Storage Card\Program Files\PocketPainter.V2.10\Painter.exe")
MkDir (%ProMenu% & "\其它")
CreateShortcut (%ProMenu% & "\其它" & "\手机遥控器.lnk","\Storage Card\Program Files\Griffin Technology Total Remote\TotalRemote.exe")
CreateShortcut (%ProMenu% & "\其它" & "\手机传真.lnk","\Storage Card\Program Files\MFaxCE 1.8.6\mfax.exe")
CreateShortcut (%ProMenu% & "\其它" & "\蓝牙狙击手.lnk","\Storage Card\Program Files\Sniper\Sniper.exe")
CreateShortcut (%ProMenu% & "\其它" & "\科学计算器.lnk","\Storage Card\Program Files\Tools\智能计算器.exe")
#蓝牙狙击手注册表注册
RegWriteString ("HKCU","\ControlPanel\Owner","Name","Smaltoath")
CreateShortcut (%ProMenu% & "\其它\凯立德导航.lnk","\Storage Card\GPS\Navione\Navione.exe")
CreateShortcut (%ProMenu% & "\其它\GpsGate.lnk","\Storage Card\GPS\Franson GpsGate 2.0\GpsGateCE.EXE")
CreateShortcut (%ProMenu% & "\其它\BeeLineGPS.lnk","\Storage Card\GPS\BeeLineGPS\BeeLineGPS.exe")
CreateShortcut (%ProMenu% & "\游戏\CS.lnk","\Storage Card\Game\CS\gfDoom Launcher.exe")
CreateShortcut (%ProMenu% & "\游戏\帝国时代.lnk","\Storage Card\Game\帝国时代绿色完全版\Age of Empires Gold Edition\AOEPPC.EXE")
CreateShortcut (%ProMenu% & "\游戏\红色警戒.lnk","\Storage Card\Game\Warfare.Incorporated.v1.2绿色版\Warfare Incorporated.exe")
CreateShortcut (%ProMenu% & "\游戏\英雄无敌.lnk","\Storage Card\Game\英雄无敌\HMM_PPC.exe")
CreateShortcut (%ProMenu% & "\游戏\装甲突击战.lnk","\Storage Card\Game\装甲突击战 Assaultaire V1.0 绿色版\Assaultaire.exe")
CreateShortcut (%ProMenu% & "\游戏\街机模拟器.lnk","\Storage Card\Game\PPC街机模拟器\PcMAME_0.4α.exe")
runwait("\存储卡\Program Files\RescoPhotoViewer\RPicView.reg")

MortScript 的 commands.txt 文件 语法参考,不要说英文不懂,我也只是高中毕业而已

This is a quick overview. Please read the manual (readme.txt) for details!
Syntax
------
Allowed parameter formats:
- "string"
  quoted string: contained whitespaces remain unmodified, use double quotes
  to include quotes (e.g. "This is ""quoted"""), ^CR^=carriage return,
  ^LF^=line feed, ^NL^=new line (Windows/DOS = ^CR^^LF^), ^TAB^=tabulator.
- variable
  contents of the variable
- expression
  result of the expression, e.g. "Variable = "&variable
For assignments (variable = expression), array indexes, and in expressions,
percent signs around variables are optional (i.e., %x% = %y[%z%]% is the
same as x = y[z]), strings must be quoted.
For boolean parameters (yes/no, true/false), 1 is yes/true, 0 is no/false.
There are also these predefined variables:
ON, YES, TRUE = 1
OFF, NO, FALSE = 0
CANCEL = 2
Lines can be continued by using "\" as last character. Example:
Message message, \
        "Title"
Comments must start with "#" (trailing whitespaces are allowed). Example:
# This is a comment
If "x =" is used, it is a function. This means, it returns a value and must be
used in an expression (command parameter or condition). For example:
var = Input( "Enter value" )
If( wndExists( "Explorer" ) )
  ...
EndIf
Message( "Your input: " & Input( "Value:" ) )
Error handling
--------------
ErrorLevel( "off"|"critical"|"syntax"|"error"|"warn" )
Set variables
-------------
Set( <variable>,<expression> ) (better use <variable> = <expression>)
<variable> = <expression>
String operations
-----------------
x = Split( <string>,<seperator>,<trim?>,<variable>{,<variable>} ) (if only one variable, it's used as array)
x = Part( <string>,<seperator>,<index>[,<trim?>] )
x = Length( <string> )
x = SubStr( <string>,<start>,<length> )
x = Find( <string>,<search string> )
x = ReverseFind( <string>,<search character> )
x = ToUpper( <string> )
x = ToLower( <string> )
Evaluate expressions in strings
-------------------------------
x = Eval( <expression as string> ) (e.g. res = Eval("var" & index & " & ""...""") )
Execution
---------
Run( <application> [, <parameter>] )
RunWait( <application> [, <parameter>] )
New( <menu entry> ) (Windows Mobile only)
RunAt( <unix timestamp>, <application> [, <parameter>] )
RunAt( <year>, <month>, <day>, <hour>, <minute>, <application> [, <parameter>] )
RunOnPowerOn( <application> [, <parameter>] )
RemoveNotifications( <application> [, <parameter>] )
Window control
--------------
Show( <window title> )
Minimize( <window title> )
Close( <window title> )
x = ActiveWindow()
x = WndActive( <window title> )
x = WndExists( <window title> )
WaitFor( <window title>,<seconds> )
WaitForActive( <window title>,<seconds> )
x = WindowText( <x>, <y> )
SendOK [ ( <window title> ) ]
SendCancel [ ( <window title> ) ]
SendYes [ ( <window title> ) ]
SendNo [ ( <window title> ) ]
Sending keys
------------
SendKeys( [<window title>,]<string> )
Send<special character> [ ( <window title>,<ctrl>,<shift> ) ]
  Special charaters: CR, Tab, Esc, Space, Backspace, Delete, Insert
                     Up, Down, Left, Right, Home, End, PageUp, PageDown,
                     LeftSoft, RightSoft, Win, Context
Snapshot [ ( <window title> ) ]
SendCtrlKey( [<window title>,]<key> )
Sending taps ("mouse events")
-----------------------------
MouseClick( [<window title>,]<x>,<y> )
MouseDblClick( [<window title>,]<x>,<y> )
MouseDown( [<window title>,]<x>,<y> )
MouseUp( [<window title>,]<x>,<y> )
PC version only: Prefix with "Middle" or "Right" for those buttons, e.g. RightMouseClick(...)
Waiting
-------
Sleep( <milliseconds> )
SleepMessage( <seconds>,<message>[,<title>[,<allowOK>[,<condition]]] )
WaitFor( <window title>,<seconds> )
WaitForActive( <window title>,<seconds> )
Time
----
x = Time()   (Unix timestamp)
x = FormatTime( <format> [, <timestamp> ] ) (formatted)
GetTime( <variable>,<variable>,<variable> ) (hour, minute, seconds)
GetTime( <variable>,<variable>,<variable>,<variable>,<variable>,<variable> )
        (hour, minute, seconds, day, month, year)
Copy, rename, move, delete files
--------------------------------
Copy( <source file>,<target file>[,<overwrite?>] )
XCopy( <source files>,<target directory>[,<overwrite?>] )
Rename( <source file>,<target file>[,<overwrite?>] )
Move( <source files>,<target directory>[,<overwrite?>] )
Delete( <files> )
DelTree( <files> )
CreateShortcut( <shortcut file>,<target file> )
Read and write text files
-------------------------
x = IniRead( <file/url>,<section>,<key>,<variable> )
x = ReadFile( <file/url> )
WriteFile( <file>,<contents>,<append?> )
COM access
----------
SetComInfo( <port>, <timeout> [, <baud rate> [, <parity> [, <bits>
            [, <stop bits> [, <control> ]]]]] )
port: "COM1:" to "COM9:"
baud rate: usually one of 4800, 9600, 19200, 38400, 57600, 76800, 115200
parity: "none", "even", "odd", "mark", "space"
bits: 4-8, usually 8
stop bits: 1, "1.5", 2
control: "none", "RTS/CTS", "XON/XOFF"

File system informations
------------------------
x = FileExists( <file> )
x = DirExists( <directory> )
x = FileCreateTime( <file> )
x = FileModifyTime( <file> )
x = FileSize( <file> )
x = FreeDiskSpace( <directory> )
x = FileAttribute( <file>, <attribute> )
SetFileAttribute( <file>, <attribute>, <set?> )
  Allowed values for 揳ttribute?
  directory (cannot be set), hidden, readonly, system, archive
SetFileAttribs( <file>,<readonly>[,<hidden>[,<archive>]] ) (1=set,0=remove,""/omit=keep)
x = FileVersion( <file> )
GetVersion( <file>,<variable>,<variable>,<variable>,<variable> )
Zip files
---------
Please note: ZIP doesn't support Unicode for filenames.
MortScript uses the old DOS encoding 437, like most popular ZIP progrograms.
I.e., you might get troubles with (un)zipping files with non-ASCII characters.
Rate: 0=no compression, 9=highest
ZipFile( <source file>,<zip file>,<filename in archive>[,<rate>] )
ZipFiles( <source files>,<zip file>[,<subdirectories?>[,<path in zip>[,<rate>]]] )
UnzipFile( <zip file>,<filename in archive>,<target file> )
UnzipAll( <zip file>,<target directory> )
UnzipPath( <zip file>,<path in archive>,<target directory> )
Connections
-----------
Connect( <connection name> )   for fixed connection name
Connect( <title>, <message> )  for selection of connections
Connect                        for default http connection
CloseConnection                closes only connection established by "Connect"
Disconnect                     closes all connections (GPRS, ActiveSync, ...)
x = Connected()
x = InternetConnected( [<url>] )
SetProxy( <proxy> )            not necessary if Connect was used
Download( <url>,<target file> )
Directory operations
--------------------
MkDir( <directory> )
RmDir( <directory> )
ChDir( <directory> ) PC version only!
SystemPath( <path> )
  valid values for path: ProgramsMenu, StartMenu, Startup, Documents, ProgramFiles,
                         ScriptExe, ScriptPath, ScriptName, ScriptExt
Registry
--------
RegWriteString( <root>,<path>,<key>,<value> )
RegWriteDWord(  <root>,<path>,<key>,<value> )
RegWriteBinary( <root>,<path>,<key>,<value> )
x = RegRead( <root>,<path>,<key> )
RegDelete( <root>,<path>,<key> )
RegDeleteKey( <root>,<path>,<values?>,<recursive?> )
x = RegKeyExists( <root>,<path> )
x = RegValueExists( <root>,<path>,<value> )
"root" values: HKCU (HKEY_CURRENT_USER), HKLM (HKEY_LOCAL_MACHINE),
               HKCR (HKEY_CLASSES_ROOT), HKUS (HKEY_USERS)
Binary values are handled as strings whith the hex dump, e.g. "01020A".
Dialog
------
x = Input( <message> [,<title> [,<numeric?> [, <multiline?> [, <default> ]]]] )
Message <text>[,<title>]
BigMessage <text>[,<title>]
SleepMessage( <seconds>,<message>[,<title>[,<allowOK>[,<condition]]] )
x = Question( <message> [,<title> [,<type>]] )  (Type=OkCancel,YesNo,YesNoCancel; Yes/OK=1,No=0,Cancel=2)
x = Choice( <title>,<message>,<default>,<timeout>,<array> ) (if only one text is given, it's assumed to be a array variable)
x = Choice( <title>,<message>,<default>,<timeout>,<text1>,<text2>{,<text3>} ) (if only one text is given, it's assumed to be a array variable)
Processes
---------
x = ProcExists( <process name> )
x = ScriptProcExists( <script name> )
x = ActiveProcess()
Kill( <process name> )
KillScript( <script name> )
Signals
-------
SetVolume( <value> )   (Windows Mobile only)
PlaySound( <wav file> )
Vibrate( <milliseconds> )
Display/screen
--------------
x = ColorAt( <x>,<y> )
x = RGB( <red>,<green>,<blue> )
Rotate( 0|90|180|270 ) (only Windows Mobile 2003 SE or higher)
SetBacklight( <battery>,<external> ) (PPC only)
ToggleDisplay( <on/off> ) (PPC only)
x = Screen( "landscape"|"portrait"|"vga"|"qvga" )
RedrawToday
ShowWaitCursor
HideWaitCursor
Clipboard
---------
SetClipText( <text> )
x = GetClipText()
======================
太长截去。。。
附件: 您所在的用户组无法下载或查看附件
虽然 看不懂  但还是顶了
很强大呵呵呵
1

TOP

LZ够义气,谢谢分享

TOP

建议班主任置顶
看不大懂,但是顶,有空学习
能详细说说MortScript是个什么软件吗?在哪写脚本?存在哪?怎么用?

TOP

发新话题