vbscript

How to run a script on startup in hidden mode

血红的双手。 提交于 2021-02-10 20:41:50
问题 I have a batch file, named prova.bat , and I need to launch it at the startup of the computer, and I need to launch it in hidden mode (with no visible prompt). I have found on the net solutions to launch the batch at the startup OR solutions to launch the batch in hidden mode, but not solutions to fix both my problems. I have tried with a VBScript and set the script to run at the startup (in the SystemConfiguration). The OS where the batch have to run is Windows 8.1. Here's the content of the

Wrong number of arguments or invalid property assignment using classes

爱⌒轻易说出口 提交于 2021-02-10 19:47:16
问题 Could anyone explain why I get this error on line 12? It is clearly an array. Why can I not obtain the value in index position 0 in this way? Do I really need that extra variable (arr)? Option Explicit Dim obj Set obj = new ClsTest obj.singleval = "test" MsgBox obj.singleval ' test obj.repeatingval = split ("a,b,c", ",") MsgBox IsArray(obj.repeatingval) ' true MsgBox UBound(obj.repeatingval) ' 2 MsgBox obj.repeatingval(0) ' Wrong number of arguments or invalid ' property assignment:

VBScript, Text to Clipboard to Paste in Any Field

假如想象 提交于 2021-02-10 12:52:08
问题 I have put together a script that will copy my desired text into my clipboard so I can paste content in any text field. Dim string String = "This Is A script that allows me to copy text contained withing these quotes directly into my clipboard. Which yes is plenty fast as it is when compared to finding file, opening file, selecting desired content, copy content, and select location to paste content." Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "cmd.exe /c echo " & String

VBScript, MSXML and Namespaces

こ雲淡風輕ζ 提交于 2021-02-08 15:32:01
问题 Given the following XML: <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetMsisdnResponse xmlns="http://my.domain.com/"> <GetMsisdnResult> <RedirectUrl>http://my.domain.com/cw/DoIdentification.do2?sessionid=71de6551fc13e6625194</RedirectUrl> </GetMsisdnResult> </GetMsisdnResponse> </soap:Body> </soap:Envelope> I am trying to access the

How to open Start Menu with VBScript?

人走茶凉 提交于 2021-02-08 12:13:24
问题 I want a .vbs file that opens the Start Menu. Can someone give me a code that opens Start Menu, that works with Windows 8.1/10? 回答1: Something like that : a vbsript for opening the Start Menu Dim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") WshShell.SendKeys "^{ESC}" Set WSHShell = Nothing WScript.Quit(0) 来源: https://stackoverflow.com/questions/48803544/how-to-open-start-menu-with-vbscript

Vbscript type mismatch error apparently not justifiable

家住魔仙堡 提交于 2021-02-08 10:22:59
问题 I'm trying to figure out why I would get this error for the code below. I've searched on the web for possible causes but I couldn't find. Please have a look: Dim descr, code If WScript.Arguments.Count = 0 Then Set objShell = CreateObject("Shell.Application") objShell.ShellExecute "wscript.exe", Chr(34) & Script.ScriptFullName Chr(34) & " Run", , "runas", 1 Else descr = InputBox("restore point description","Crepo") If (descr) Then code = GetObject("winmgmts:\\.root default:Systemrestore")

Ping an IP, pop-up messages and save results to txt file - VBS

做~自己de王妃 提交于 2021-02-08 09:49:32
问题 I'm making a simple script that pings an address and save the results in a txt file. The purpose is solely to make it convenient for the lay user that don't know how to: open the "run" box; open cmd; ping an address; copy results; past to a txt file. So far, I have made this .bat file, but I wanted it on vbs for more functionalities and better visual. .BAT APPROACH @ECHO OFF :LOOPSTART time /T >> PingTest.txt ping 1.1.1.1 -n 100 >> %userprofile%\Desktop\PingTest.txt exit GOTO LOOPSTART .VBS

Send string parameters to a Start-Job script block

别来无恙 提交于 2021-02-08 06:53:25
问题 I need to initialize a job using the shell. The job will be a delay plus a call to a vbScript. The following code works fine. For my example, the vbScript is just a single line with a MsgBox "Hello world!" $functions = { Function execute_vbs { param ([string]$path_VBScript, [int]$secs) Start-Sleep -Seconds $secs cscript /nologo $path_VBScript } } $seconds = 2 Start-Job -InitializationScript $functions -ScriptBlock {execute_vbs -path_VBScript 'C:\Users\[USERNAME]\Desktop\hello_world.vbs' -secs

how do i make a vbscript data type subtype LONG to get it to be 2,147,483,647?

我怕爱的太早我们不能终老 提交于 2021-02-08 06:21:54
问题 I have a web page that displays 10 images at a time from a directory. In the directory I have now 55,000 images. Once zz below hits 32,767 it stops. How do I make ZZ into a subtype LONG to get it to be 2,147,483,647 (the code below is not accurate, just quickly done to show you the loop I am achieving) pp = Request("pp") ' pp could be at 40000 filecount = 0 dim zz For Each file in filecoll zz = zz + 1 If ZZ > PP then response.write 'show image here end if Next 回答1: The actual problem got

VBScript get temp folder

删除回忆录丶 提交于 2021-02-08 06:03:33
问题 fso.GetSpecialFolder(2) correctly returns the temp folder for me, when run from a VBS file. However, when run from within an Autodesk Revit journal file, which has historically been VBS compliant, I get back the proper path and a GUID after Temp. I had never seen this before, and I am unsure if this is perhaps a known issue in newer builds of Windows 10 (it's been about three years since I tested this), or is this more likely an issue with Autodesk's implementation of VBScript support? I