随笔- 182
文章- 1
评论- 28
阅读-
57万
01 2011 档案
some code
摘要:Option ExplicitPublic Const vbQuote = """"Dim wsSet ws = Wscript.CreateObject("Wscript.Shell")'获取当前路径Dim CurrentDirectoryCurrentDirectory = ws.CurrentDirectoryDim FSO,FileName,FilePathSet FSO = CreateObject("Scripting.FileSystemObject")'获取当前路径FilePath = FSO.GetFile(Wscript.scriptfullname).path'获取当前文
阅读全文
DeleteMyself.vbs
摘要:Option ExplicitDim FileSystem,FullFileNameSet FileSystem = CreateObject("Scripting.FileSystemObject")FullFileName = FileSystem.GetFile(Wscript.scriptfullname).pathFileSystem.DeleteFile FullFileName
阅读全文
Basic MSI工里中的CustomAction的Use 64Bit Scripting
摘要:Use 64Bit Scripting PropertyDescription:Specify whether 64-bit scripting is used in your custom action script file.Gerneral Information-Summary Infromation Stream-Template Summary Description:Use the Template Summary property to specify the processor type and default language that your installatio
阅读全文
Silent Installation Switches for Windows Apps
摘要:http://unattended.sourceforge.net/installers.php#installshieldIntroductionThe goal of this document is to collect instructions for performing unattended / silent installations of many popular application installers. Such instructions are useful for automating these installations.A quick word on term
阅读全文
某些操作权限不足的解决方法
摘要:Sometimes it demands administrator privilege to operate,there are two way to solve this problem:1、Run cmd as administrator2、Wscript script.vbs
阅读全文
VBS中解决路径带空格的三种方法
摘要:Set wshell=CreateObject("WScript.Shell")wshell.Run """C:\Program Files\360\360se\360se.exe""",5,True Set wshell = Nothingtemp="C:\Program Files\360\360se3\360se.exe"path = Chr(34) & temp & Chr(34)Set wshell=CreateObject("WScript.Shell")wshell.Run path,1,True Set wshell = NothingPublic Const vbQuote
阅读全文
MSI静默安装
摘要:Basic MSI工程生成BasicMSI.msi和Setup.exeCMD到BasicMSI.msi 的目录,静默模式,以下三个参数没什么问题msiexec.exe /i BasicMSI.msi /qbmsiexec.exe /i BasicMSI.msi /qrmsiexec.exe /i BasicMSI.msi /qf当用qn时会有问题,无法安装,打log发现并不是没有安装,而是安装终止,错误信息说没有权限msiexec.exe /i BasicMSI.msi /qn解决方法:用管理员权限运行CMD,然后再输入上述命令,安装正常完成。这是用msiexec执行MSI包的问题,当用Set
阅读全文
Vbs脚本经典教材
摘要:Vbs脚本经典教材(最全的资料还是MSDN) —为什么要使用Vbs?在Windows中,学习计算机操作也许很简单,但是很多计算机工作是重复性劳动,例如你每周也许需要对一些计算机文件进行复制、粘贴、改名、删除,也许你每天启动计算机第一件事情就是打开WORD,切换到你喜爱的输入法进行文本编辑,同时还要播放优美的音乐给工作创造一个舒心的环境,当然也有可能你经常需要对文本中的某些数据进行整理,把各式各样的数据按照某种规则排列起来……。这些事情重复、琐碎,使人容易疲劳。第三方软件也许可以强化计算机的某些功能,但是解决这些重复劳动往往事倍功半,我也尝试过使用计算机语言编写程序来解决这些问题,但是随之而来的
阅读全文
JavaScript/VBScript脚本程序调试(Wscript篇)
摘要:1. 在资源管理器里面双击一个.vbs文件。 2. 程序里面发生了一个错误,例如异常,或者编程逻辑错误。 3. 一行行阅读源文件,然后在估计发生错误的地方,添加很多的Msgbox.Show,打印一些变量的值。 4. 重新执行.vbs文件 5. “当当当”,一系列的 “确定”点完了以后,人也晕了,重新回到第三步继续…… 其实我们也是可以用Visual Studio调试这类WSH程序的,关键就在.vbs等WSH脚本程序的解释器wscript.exe和cscript.exe提供了调试支持: 1. 当我们在资源管理器里面双击一个.vbs文件时,资源管理器实际上是运行wscript.exe来解释和执行这
阅读全文
_CrtDbgReport: String too long or IO Error
摘要:_CrtDbgReport: String too long or IO Errorwprintf_s不能正常输出中文的解决办法使用如下方法调用wprintf_s输出中文时往往出现带?的乱码:wprintf_s(L"%s",(LPCWSTR)cmdLineArr[1]);解决方案:包含头文件locale.h,并在程序开始调用setlocale(LC_ALL, "chs");这样wprintf_s便能正常打印出中文字符串了://指定当前程序的编码为简体中文,这样才能用wprintf正确输出中文#includelocale.hsetlocale(LC_ALL,"chs");同样对于TRACE(
阅读全文
获取CListCtrl选种第几项
摘要:INT nItem = 0; POSITION pos = m_blcPlaylist.GetFirstSelectedItemPosition(); if (pos == NULL) TRACE0("No items were selected!\n");else { while (pos) { nItem = m_blcPlaylist.GetNextSelectedItem(pos); TRACE1("Item %d was selected!\n", nItem); // you could do your own processing on nItem here }
阅读全文
new操作符失败
摘要:================================================================================== 我们都知道,使用 malloc/calloc 等分配内存的函数时,一定要检查其返回值是否为“空指针”(亦即检查分配内存的操作是否成功),这是良好的编程习惯,也是编写可靠程序所必需的。但是,如果你简单地把这一招应用到 new 上,那可就不一定正确了。我经常看到类似这样的代码: int* p = new int[SIZE]; if ( p == 0 ) // 检查 p 是否空指针 return -1; // 其它代码 其实,这
阅读全文
IS文言
摘要:随便建个IS工程,看原始代码SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_MAINTUI_REMOVEALL )SdLoadString( IFX_MAINTUI_MSG )SdLoadString(IFX_SDFINISH_MSG1)MessageBox( szSdStr_NotEnoughSpace, WARNING );SetStatusExStaticText( SdLoadString( IDS_IFX_STATUSEX_STATICTEXT_FIRSTUI ) );SdLoadString( SD_STR_COMPONENT_MAINT_MSG
阅读全文
.RRA files
摘要:View Full Version : .rra files. How to prevent?kallen04-17-2002, 07:28 PMHelp... Has anyone had this problem.Our InstallShield program is 2 fold.The 2 options are:Install or Upgrade.If they select upgrade the basic intention is to laydown new application files in a specified app folder, then run dat
阅读全文
Data1.cab
摘要:View Full Version : Data1.cab file ??NewsArchive08-07-2000, 12:00 AMHi,I usually don't cross post, however after posting in General I figuredthis is a better group to post the question and I'm running a little shorton time.So sorry in advance.What exactly is the data1.cab file for ? does the client
阅读全文
Common File Extensions Used by Visual C++
摘要:SUMMARYVisual C++ writes and uses a number of files during the build process. This article describes the file extensions commonly used in a Visual C++ project. Back to the topMORE INFORMATIONFiles Used by Visual C++.C -- C language source file: This file is compiled as a C file. If it contains C++ c
阅读全文
Java、JavaScript和JScript
摘要:这三者没有必然的联系,它们是完全不同的事物,它们是分别由不同公司开发的,Java是由Sun公司创立、开发;JavaScript则是Sun和Netscape公司共同开发的产品;JScript是微软对ECMA262语言规范的一种实现。这三者的共同点是,语法与C语言相似。JS是JavaScript的简称。JScript应用于ASP,运行于服务器端。而Java、JavaScript都是运行于客户端。Sun公司后来又推出了JSP,以Java语言为基础,运行于服务器端。运行于服务器端的网页是动态网页,所以以JScript为基础的ASP、以Java为基础的JSP是动态网页,而Java、JavaScript则
阅读全文
VbScript和JavaScript
摘要:服务器端: 大家知道ASP支持这两中脚本语言,也就是在服务器端用哪个都行,但大部分人在服务器端用VBscript比较多,对于新手来说一般用VBscript就可以了。 客户端: 现在流行的主要是微软和网景这两大浏览器,微软的IE对VBscript和Javascript都支持, 而网景的浏览器却不支持VBscript,为了兼容我们应该在客户端使用JAVAscript脚本语言, 从另方面由于JAVAscript有十分强大的交互性,使的我们在客户端用它可以实现许多复杂的 功能。 所以说,由于是对于新手,在服务器端使用VBscript,在客户端应该使用JAVAscript, 如果你实在不熟悉JAVAsc
阅读全文
函数调用约定
摘要:函数调用约定 __stdcall是函数调用约定的一种,函数调用约定主要约束了两件事: 1.参数传递顺序 2.调用堆栈由谁(调用函数或被调用函数)清理 常见的函数调用约定:stdcall cdecl fastcall thiscall naked call __stdcall表示 1.参数从右向左压入堆栈 2.函数被调用者修改堆栈 3.函数名(在编译器这个层次)自动加前导的下划线,后面紧跟一个@符号,其后紧跟着参数的尺寸 在win32应用程序里,宏APIENTRY,WINAPI,都表示_stdcall,非常常见。MFC缺省调用约定 1、_stdcall是Pas
阅读全文
VBScript是什么?有什么优缺点?
摘要:VBScript是Visual Basic Script的简称,即 Visual Basic 描述语言,有时也被缩写为VBS。 VBScript是微软开发的一种脚本语言,可以看作是VB语言的简化版,与VBA的关系也非常密切。它具有原语言容易学习的特性。目前这种语言广泛应用于网页和ASP程序制作,同时还可以直接作为一个可执行程序。用于调试简单的VB语句非常方便。由于VBScript可以通过Windows脚本宿主调用COM,因而可以使用Windows操作系统中可以被使用的程序库,比如它可以使用Microsoft Office的库,尤其是使用Microsoft Access和Microsoft SQ
阅读全文
DrawImage调查
摘要:Status DrawImage( [in] Image *image, [in] const Point *destPoints, [in] INT count, [in] INT srcx, [in] INT srcy, [in] INT srcwidth, [in] INT srcheight, [in] Unit srcUnit, [in] ImageAttributes *imageAttributes, [in] DrawImageAbort callback, [in] VOID *callbackData);imageAttributes [in] ImageAttribute
阅读全文