vbs

VBS using LIKE to compare strings “Sub or Function not defined”

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to make a script to connect a network printer to a user computer. The script uses the computer name who needs the printer as a parameter. Printers names are similar their printserver name, eg. server_USA has printers like printer_USA01, printer_USA02. But it's throwing the error "Sub or Function not defined" when arrives at the first like... why ? Set shl = WScript.CreateObject("WScript.Shell") strName = Wscript.Arguments.Item(0) 'input Printer name strPrinter = InputBox("Please enter share name of printer to install:", _ "Add

Download a file with VBS

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Ive got a VBS Script that generates an url to download a file from a server on my network. I now need to download the file to "C:\rWallpaper\wallpaper.png", the URL is stored in the variable "url" Id like it to work something like wget on linux, just download and save the file to a specified location. 回答1: You can download using XMLHTTP and leverage an ADO stream to write the binary data; dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP") dim bStrm: Set bStrm = createobject("Adodb.Stream") xHttp.Open "GET", "http://bla.com/xxx.png",

VBS To Event Log

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a script that I am currently using to check when that network goes up or down. Its writing to a pinglog.txt . For the life of me I can not figure out how to get it to write to the event log when the network goes down. Where it says: Call logme(Time & " - " & machine & " is not responding to ping, CALL FOR HELP!!!!",strLogFile) Thats what I need to write to the Event Log "Machine is not repsonding to ping, CALL FOR HELP!!!! 'Ping multiple computers and log when one doesn't respond. '################### Configuration ###################

vbs能调用的系统对象小结

匿名 (未验证) 提交于 2019-12-03 00:37:01
vbs能调用的系统对象小结 文件系统对象相关: (“scripting.filesystemobject”) 字典相关: (“scripting.dictionary”) 脚本外壳相关: (“wscript.shell”) windows外壳相关: (“shell.application”) 正则表达式相关: (“vbscript.regexp”) asp相关: (“mswc.adrotator”) (“mswc.nextlink”) (“mswc.myinfo”) 公用对话框相关: (“mscomdlg.commondialog”)? 编码与密码相关: (“scriptpw.password”)? (?”scripting.encoder”?) 邮件发送的组件相关: (“jmail.message”) (“cdonts.newmail”) (“cdo.configuration”) (“eudora.euapplication.1”) (“novellgroupwaresession”) 水晶报表相关: ?(“crystalruntime.application”)? ie浏览器相关:? (“internetexplorer.application”)? windows媒体播放相关:? (“wmplayer.ocx”) (“wmplayer.ocx.7”?) 助手角色相关: (

抖音做我女朋友 vbs 脚本

匿名 (未验证) 提交于 2019-12-03 00:33:02
更多相关教程 : 点击学习更多技巧 1、先打开记事本新建文件 gf.txt 2、复制以下代码写入: msgbox("做我女朋友可以吗?") msgbox("房产证上写你名") msgbox("保大") msgbox("我妈会游泳") Dim m m=Msgbox("做我女朋友好吗?", vbOKCancel) If m = vbOK Then Msgbox("爱你么么哒") If m = vbCancel Then MsgBox"不喜欢你了", vbCritical 3、保存并更改文件名为 gf.vbs 更多相关教程 : 点击学习更多技巧 4、双击执行即可。 更多相关教程 : 点击学习更多技巧 文章来源: 抖音做我女朋友 vbs 脚本

[非原创]Office 2019 增强版 批处理激活

匿名 (未验证) 提交于 2019-12-03 00:15:02
忘了原创网址了,在 https://www.52pojie.cn/ 上看到的,这里我备忘一下,希望知道原创网址的朋友告诉我一下,谢谢! 将下面批处理脚本存成.bat文件后,以管理员方式运行: @echo off (cd /d "%~dp0")&&(NET FILE||(powershell start-process -FilePath '%0' -verb runas)&&(exit /B)) >NUL 2>&1 title Office 2019 Activator r/Piracy echo Converting... & mode 40,25 (if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript ospp.vbs

激活Office2019

匿名 (未验证) 提交于 2019-12-03 00:10:02
说明 这是备忘录,写给自己看的。 下载链接 http://officecdn.microsoft.com/pr/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/zh-cn/ProPlus2019Retail.img 激活 @echo off ( cd / d "%~dp0" )&&( NET FILE ||( powershell start - process - FilePath '%0' - verb runas )&&( exit / B )) > NUL 2 >& 1 title Office 2019 Activator r / Piracy echo Converting ... & mode 40 , 25 ( if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd / d "%ProgramFiles%\Microsoft Office\Office16" )&( if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd / d "%ProgramFiles(x86)%\Microsoft Office\Office16" )&( for / f %% x in ( 'dir

常用VBS对象

匿名 (未验证) 提交于 2019-12-02 23:57:01
Set Obj_Shell = CreateObject("Wscript.shell") '读写删注册表,打开指定程序 Set Obj_WinHttp = Createobject("WinHttp.WinHttpRequest.5.1")'网页POST,GET Set Obj_DictionAry = CreateObject("Scripting.DictionAry")'字典 Set Obj_FilEsystem = CreateObject("Scripting.FileSystemObject")'文件相关对象,磁盘 Set Obj_Adodb = CreateObject("adodb.stream")'可以用于GET,POST下载网页图片等数据 Set Obj_ScriptControl= CreateObject("MSScriptControl.ScriptControl") '可以运行JAvaScript代码 Set Obj_RegExp = New RegExp ‘正则表达式 ’============================================================================== Obj_Shell.RUn 按WIn+R可以执行的所有功能,短整形运行式样,布尔值等待程序被关闭 运行式样:0

好玩的vbs

匿名 (未验证) 提交于 2019-12-02 23:36:01
前几天,朋友发我一段视频,试了一下,蛮好玩的 https://m.weibo.cn/status/4376530823759716 代码如下: do msgbox "系统受到了感染,需要重装系统!" loop 命名为xxx.vbs,记得编码集为UNICODE.

vbs进阶――循环

匿名 (未验证) 提交于 2019-12-02 23:34:01
版权声明:请不要“借鉴”我的博客,如有需要,请联系本人 https://blog.csdn.net/qq_44635637/article/details/90299953 循环 无限循环 条件循环 while循环 until循环 计数循环 for循环 无限循环 do 你想要做的事 loop 条件循环 while循环 while 需满足的条件 你想要做的事 wend 例: dim s s=inputbox("") while s="YES" msgbox"YES" wend 不能退出循环 until循环 do until 不满足什么条件 需要做的事 loop 例: dim s s=inputbox("") do until s="YES" msgbox"YES" loop 可以使用exit do来退出循环 计数循环 for循环 for 计数器变量=开始计数值 to 最后计数值 需要做的事 fext 例: for i=1 to 10 msgbox i next 可以使用exit for来退出循环 循环就介绍到了这里,下期再见 文章来源: https://blog.csdn.net/qq_44635637/article/details/90299953