vbscript

Need to read width/height from graphics file with VBScript/ASP classic

六眼飞鱼酱① 提交于 2020-03-16 09:16:21
问题 I need to read a graphics file and get the width/height in VBScript (ASP). I found a package called gfxSpex that seems to be what a lot of people use but the GIFs get the width right but not the height. PNGs don't work at all as the routine is looking for the type in 0-3 and that's %PN in the .png files. Function gfxSpex(flnm, width, height, depth, strImageType) Dim strPNG Dim strGIF Dim strBMP Dim strType strType = "" strImageType = "(unknown)" gfxSpex = False strPNG = Chr(137) & Chr(80) &

How can we programmatically know the syntax error using msscript.ocx?

巧了我就是萌 提交于 2020-03-06 10:45:10
问题 I have implemented msscript.ocx using c# and it works for VBScript. Consider the following VBScript code: For i = 0 To 5 'The following line has missing 'Then'. It should show an error. If i = 2 Exit For End If Next How can we tell if there is an error in line containing If (missing Then ) without running the script? 回答1: You get the error when loading. Set Arg = WScript.Arguments set WshShell = createObject("Wscript.Shell") Set Inp = WScript.Stdin Set Outp = Wscript.Stdout Sub VBSCmd

Convert Ascii To Hex using VBScript

我与影子孤独终老i 提交于 2020-03-06 02:23:56
问题 is there any to convert a string into Hex using Vb-script? here there is a simple guide doing this, but it seems it works only for numbers not alphabets. http://www.w3schools.com/vbscript/func_hex.asp 回答1: Here it is: strString = "test" strHex ="" For i=1 To Len(strString) strHex = strHex + Hex(Asc(Mid(strString,i,1))) Next WScript.Echo strHex 来源: https://stackoverflow.com/questions/24238568/convert-ascii-to-hex-using-vbscript

Renaming pdf files with a batch file

假如想象 提交于 2020-03-05 06:13:50
问题 I need to either write a batch file or a vbscript that will rename files. I need to keep everything in the file name up to the second "." but delete what comes after the second dot. This is a sample of what the file names look like: nnnnnnnnnnnnnnnn.xxxxxxxx.dddddddddd.pdf n = 16 numbers 0-9 x = date in this format ex:02232008 d = 10 numbers 0-9, this is the part of the file name that I want to delete . I need the d's from the sample above to be deleted but keep the rest of the file name the

browse files in folder

狂风中的少年 提交于 2020-03-03 10:13:43
问题 I am building a small hta with vbs. what it does is browse the folders and pickup folder or file by click first button then copy and paste to a selected location based on file type or folder name. I need help on "Browse the files inside each folder", so far i only made "folder browser" working. Is there a way that i can browser folder and file together, picking up folder or file as i need? <html> <head> <Title>File Copy </Title> <style> img.exco { position:absolute; bottom:10px; right:10px }

browse files in folder

自闭症网瘾萝莉.ら 提交于 2020-03-03 10:12:29
问题 I am building a small hta with vbs. what it does is browse the folders and pickup folder or file by click first button then copy and paste to a selected location based on file type or folder name. I need help on "Browse the files inside each folder", so far i only made "folder browser" working. Is there a way that i can browser folder and file together, picking up folder or file as i need? <html> <head> <Title>File Copy </Title> <style> img.exco { position:absolute; bottom:10px; right:10px }

In wix, using vbscript, how do I write to the log file?

只谈情不闲聊 提交于 2020-03-03 07:33:28
问题 I am trying the following inside a customaction: Session.Log("GetOfficeBitness =" & Session.Property("OfficeBitness")) And I am getting the error: Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action GetOfficeBitness script error -2146827850, Microsoft VBScript runtime error: Object doesn't support this property or method: 'Session.Log' Line 39,

WMI信息获取

。_饼干妹妹 提交于 2020-03-02 16:49:26
<html><head><title>WMI信息获取——请将本站点加入到可信站点</title></head><body><p align=center>List: <input type=button value="NetworkAdapter" onclick="vbscript:DoListNetworkAdapter"><input type=button value="NetworkAdapterCfg" onclick="vbscript:DoListNetworkAdapterCfg"><input type=button value="Computer" onclick="vbscript:DoListComputer"><input type=button value="Disk" onclick="vbscript:DoListDisk"><input type=button value="System" onclick="vbscript:DoListSystem"><input type=button value="CPU" onclick="vbscript:DoListCPU"><input type=button value="Memory" onclick="vbscript:DoListMemory"><input type=button

VBScript iterating through XML child nodes and retrieving values

孤街醉人 提交于 2020-02-27 07:16:46
问题 I have the following XML provided by a customer from which I need to extract items like: <CustomerProductName> <ProductName> <ProductAssetName> Treating each <CustomerProducts> section as a seperate order. I can get to <CustomerProducts> and extract the <CustomerProductName> without a problem and iterate over the value in each section. But I can't see how I get to the values below it. If someone could someone give me some pointers as to how to achieve thIs would be gratefull as I have been

VBS is executing through SSIS , but same cannot be done when scheduling the sql job

拜拜、爱过 提交于 2020-02-25 05:25:53
问题 I am executing a VBSCRIPT through SSIS, which is converting pivot to RAW CSV. In SSIS it's working but when scheduling it through SQL Server it's not working. Note: No error in SQL Job, it says step completed successfully returned 0. 来源: https://stackoverflow.com/questions/59499406/vbs-is-executing-through-ssis-but-same-cannot-be-done-when-scheduling-the-sql