vbscript

How to retrieve all errors and messages from a query using ADO

爱⌒轻易说出口 提交于 2020-08-23 06:57:05
问题 When a SQL batch returns more than one message from e.g. print statements, then I can only retrieve the first one using the ADO connection's Errors collection. How do I get the rest of the messages? If I run this script: Option Explicit Dim conn Set conn = CreateObject("ADODB.Connection") conn.Provider = "SQLOLEDB" conn.ConnectionString = "Data Source=(local);Integrated Security=SSPI;Initial Catalog=Master" conn.Open conn.Execute("print 'Foo'" & vbCrLf & "print 'Bar'" & vbCrLf & "raiserror (

CURL request in classic ASP

二次信任 提交于 2020-08-22 06:39:30
问题 Can someone help me to create classic asp code from the CURL request below? curl -H 'Authorization: Token f2210dacd9c6ccb8133606d94ff8e61d99b477fd' "https://cloud.seafile.com/api2/beshared-repos/" I tried the sample code below, but it didn't work. Dim http: Set http = Server.CreateObject("WinHttp.WinHttpRequest.5.1") Dim url: url = "https://cloud.seafile.com/api2/beshared-repos/" Dim data: data = "token=f2210dacd9c6ccb8133606d94ff8e61d99b477fd" With http Call .Open("GET", url, False) Call

How to unzip multiple zip folders using VBscript?

大城市里の小女人 提交于 2020-08-20 14:19:41
问题 I need a VB script to unzip multiple different zip folders. I have this script - but it does not work. Sub Unzip() Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("C:\Dal\").Files If LCase(fso.GetExtensionName(f)) = "zip" Then Unzip f.path, "C:\Dal" End If Next End Sub 回答1: The NameSpace method doesn't support wildcards. Try something like this: Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("C:\").Files If LCase(fso

How to unzip multiple zip folders using VBscript?

心已入冬 提交于 2020-08-20 14:18:16
问题 I need a VB script to unzip multiple different zip folders. I have this script - but it does not work. Sub Unzip() Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("C:\Dal\").Files If LCase(fso.GetExtensionName(f)) = "zip" Then Unzip f.path, "C:\Dal" End If Next End Sub 回答1: The NameSpace method doesn't support wildcards. Try something like this: Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("C:\").Files If LCase(fso

How to unzip multiple zip folders using VBscript?

元气小坏坏 提交于 2020-08-20 14:16:06
问题 I need a VB script to unzip multiple different zip folders. I have this script - but it does not work. Sub Unzip() Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("C:\Dal\").Files If LCase(fso.GetExtensionName(f)) = "zip" Then Unzip f.path, "C:\Dal" End If Next End Sub 回答1: The NameSpace method doesn't support wildcards. Try something like this: Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("C:\").Files If LCase(fso

Task Scheduler running but not finishing or working properly VBscript

雨燕双飞 提交于 2020-08-20 12:07:40
问题 I have a vbscript that runs an excel macro. Everything seems right, but it is not working as I had hoped. The task starts but then just continuously running without doing anything. Let me show you everything I have... I don't get any errors, it just isn't running properly. Task scheduler Timeline Event 110 Task Triggered by user (Task Scheduler launched "{6569c7af-fed8-456b-8c8e-9d1653b8c15a}" instance of task "\Test" for user "tsee". Event 319 Task engine received message to start task Event

Create html alert that stays on the top and block other windows with vbscrips [closed]

ぃ、小莉子 提交于 2020-08-19 05:49:18
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 days ago . Improve this question There is a html file including alert message. And I want to load the html file at vbs file through internetExplorer. How can I make the alert stay on the top and block other windows using vbscript? But I can’t handle the html file. Can I control the alert in html with vbscript

How to convert folder to zip. file in asp classic

元气小坏坏 提交于 2020-08-11 05:42:04
问题 Can any one help me in how to convert folder to zip file in classic asp. <% Dim objZip Response.write("new") Set objZip = Server.CreateObject("Scripting.FileSystemObject") Response.write("yahoo") objZip.Pack "C:\inetpub\wwwroot\NewZIp\Images\SMM.JPEG", "C:\inetpub\wwwroot\NewZIp\Images.zip" objZip.Pack "C:\inetpub\wwwroot\NewZIp\Images\IMS.JPEG", "C:\inetpub\wwwroot\NewZIp\Images.zip" Set objZip = Nothing %> I am using this one code for convert folder to zip 回答1: This can be easily done in

Why is vbs able to find the INSTALLLOCATION when C# using both DTF and MSI API cannot?

让人想犯罪 __ 提交于 2020-08-10 03:38:39
问题 VBS works as I desired, but both COM API and DTF using C# is not locating the InstallLocation. Followings are what I have done so far. Thanks to this post, I was able to find a InstallLocation that is not available on registry using vbs. I understand that vbs is calling for COM API available on %WINDIR%\system32\msi.dll . C# COM API So I thought I would use C# to call this method up. But it failed. Even though I can confirm the existence and installation, it cannot open one of the product

How can I replicate programmatically in VBS what Word does when I insert a “built-in” property from the Insert->QuickPart->Document Property dropdown?

岁酱吖の 提交于 2020-08-08 07:00:29
问题 In Microsoft Word (Windows desktop version from around 2007 and later), I can use the Insert Tab, Text group, Explore Quick Parts dropdown, Document Property dropdown to insert a Content Control that allows display/entry/selection of the value of one of a number of types of Document Property , which might be one of the following: Built-in document properties "Content Type" metaproperties associated with a server such as Microsoft's SharePoint server How can I do programmatic insertion of