Search Results

Search found 518 results on 21 pages for 'vbscript'.

Page 2/21 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • capture any error in VBScript?

    - by JoelFan
    I have a batch file that calls a VBScript (.vbs) program. After calling it, my batch script checks errorlevel to see if the .vbs program failed. I can signal failure with an exit code in the .vbs program with WScript.Quit(1). However, I can only do that explicitly. If some unexpected run-time error happens, the .vbs quits with an error dialog box, however the exit code is zero so my batch file thinks it suceeded! How can I change that behavior? And if you are thinking of saying, use on error goto, don't bother... that syntax is available in regular VB, but not in VBScript.

    Read the article

  • Problem running VBScript from my UIAccess VB app using MSScriptControl

    - by Ray
    I'm trying to run some VBSCRIPT from within my application. This works fine when I run my program from within VB. But once I add "UIAccess=true" to my manifest and digitally sign my exe with my certificate, I am unable to run the code any more. It gives errors when I try to interface with any program saying "429: ActiveX component can't create object: 'myApp.Application'". Anyone have any idea why it would run fine in the IDE but not with an application with uses UIAccess? Here is the code: Dim scriptRunner As New MSScriptControl.ScriptControlClass scriptRunner.Language = "VBScript" scriptRunner.AllowUI = True scriptRunner.Timeout = 3000 scriptRunner.AddCode(scriptStr) scriptRunner = Nothing

    Read the article

  • how can i access C# dll from VBScript on client machine

    - by maraheem
    i have created a C# dll file on my machine as shown below: namespace myDLL { public class myClass { public string myFunction() { return "I am Here"; } } } then i created a tlb file with "tlbexp" command, then i used the "regasm" command n registered this dll on my machine. When i created an object of type myClass on my machine using VBScript, everything is working fine... here i used the CreateObject() method as shown below: Set myObj = CreateObject("myDll.myClass") Now i want to create an object of type myClass from VBScript that is running on another machine, how can i do this. please help me how can i access that dll file, am using the CreateObject() function as shown below: Set HD = CreateObject("myDll.myClass","myMachineName") now am getting error as "permission denied"

    Read the article

  • How to encrypt in VBScript using AES?

    - by Jon
    I am looking to encrypt some data using Rijndael/AES in VBScript using a specific key and IV value. Are there any good function libraries or COM components that would be good to use? I looked at CAPICOM; it allows a passphrase only, and won't allow setting specific key and IV values.

    Read the article

  • vbscript multiple replace regex

    - by George
    How do you match more than one pattern in vbscript? Set regEx = New RegExp regEx.Pattern = "[?&]cat=[\w-]+" & "[?&]subcat=[\w-]+" // tried this regEx.Pattern = "([?&]cat=[\w-]+)([?&]subcat=[\w-]+)" // and this param = regEx.Replace(param, "") I want to replace any parameter called cat or subcat in a string called param with nothing. For instance string?cat=meow&subcat=purr or string?cat=meow&dog=bark&subcat=purr I would want to remove cat=meow and subcat=purr from each string.

    Read the article

  • Linux Browsers And VBScript

    - by Nathan Campos
    I've already done some little things using Visual Basic and some nice things with eMbedded Visual Basic, but now I want to go on the scripting way, then I want to know if Linux, BeOS and other OSes browsers will support VBScript pages.

    Read the article

  • VBScript - image to binary

    - by countnazgul
    Hi to all, i'm not a VB programmer but i need a vbscript that convert image file (from local disk) to be converted to binary data and the passed to webservice. I realize how to pass data to webservice but i can't find how to convert the image file to binary data. I spend a lot of time to find some kind of solution but with no luck. Can somebody help me? Thanks!

    Read the article

  • Execute a Application On The Server Using VBScript

    - by Nathan Campos
    I have an application on my server that is called leaf.exe, that haves two arguments needed to run, they are: inputfile and outputfile, that will be like this example: leaf.exe input.jpg output.leaf They are all on the same directory as my home page file(the executable and the input file). But I need that a VBScript could run the application like that, then I want to know how could I do this.

    Read the article

  • How to handle a Security Alert Pop Up on IE by VBScript

    - by eightants
    I need to create a VBScript (WSH) to automatically open Internet Explorer and navigate a security web page. However, it always pops up a security alert before displaying that website. Can anyone provide a solution for either disables the pop up function (security certification) in IE or accepts the pop-up by the script? Here is my script: Dim objIE Set objIE = CreateObject("InternetExplorer.Application") objIE.Visible = True objIE.Navigate "https://10.10.10.101:9000/Portal" ???? Set objIE = Nothing Thanks a lot.

    Read the article

  • passing variable from vbscript to batch file

    - by sushant
    i am using vbscript to call a batch file. my script looks like: dim shell set shell=createobject("wscript.shell") shell.run "a.bat" set shell=nothing my batch file is simple and looks like: D: cd D:\d winzip32.exe -min -a D:\a i want to pass a variable from a script to the batch file. lets say the destination folder. how do i do that? any help is very much appreciated.

    Read the article

  • Auto-formatting tool for VBscript

    - by katmoon
    I'm looking for a light, free tool to format my Vbscript code. The only way I've found so far is to auto-format it in VisualStudio. Although, it's too much to launch VisualStudio for this purpose. Is there any web app or a free light tool for this purpose? Maybe a plugin for Notepad++?

    Read the article

  • Stopping a service and waiting in VBScript

    - by BrettS
    How can I stop a service and wait for it to finish stopping in vbscript? I've got this so far: For Each objService in colServiceList If objService.DisplayName = "<my display name>" Then objService.StopService() End If Next Googling turned up a suggestion of using objService.WaitForStatus( ServiceControllerStatus.Stopped ), but running that gives me an error of "Object required: 'ServiceControllerStatus'".

    Read the article

  • Debuging VBScript in Visual Studios Express

    - by Wil
    I have read around the net that its possible to debug VBScript WSH files Visual Studios 2005 Express (I think Web Edition) but everytime I try cscript.exe myscript.vbs //X the script just executes. I have tried VS Express 2005, 2008 and 2010 all editions. I have also tried Visual Studios Premium 2010 which does infact debug scripts as I would expect however I want to be able to debug scripts with free tools (I don't want to get a VS 2010 licence for all the other people on my team). I know about Microsoft Script Debugger but it doesn't let you discover objects as well as Visual studios does.

    Read the article

  • Problem copying files through xcopy using VBScript

    - by sushant
    I am using VBScript to copy files using xcopy. The problem is that the folder path has to be entered by the user. Assuming I put that path in a variable, say h, how do I use this variable in the xcopy command? Here is the code I tried: Dim WshShell, oExec, g, h h = "D:\newfolder" g = "xcopy $h D:\y\ /E" Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec(g) I also tried &h but it did not work. Could anyone help me work out the correct syntax? Any help is appreciated.

    Read the article

  • vbscript calling svnadmin dump

    - by Dexton
    Hi, Running the following vbscript to call svnadmin dump fails (i.e. no dump is being created) Set objShell = CreateObject("WScript.Shell") Set objShellExec = objShell.Exec("svnadmin dump C:\svn_repos > C:\fullbackup") I discovered from another post, http://stackoverflow.com/questions/445121/svn-dump-fails-with-wscript-shell/2400011#2400011 that i had to create a new command interpreter using cmd as follows: Set objShellExec = objShell.Exec("%comspec% /c" & "svnadmin dump C:\svn_repos > C:\fullbackup") This successfully created the dump but I could never read the output information (i.e. * Dumped revision 100. * Dumped revision 101. etc). I tried Do While objWshScriptExec.Status = 0 Wscript.Echo objShellExec.StdOut.Readline Wscript.Echo objShellExec.StdErr.Readline WScript.Sleep 100 Loop but nothing ever gets displayed. May I know how i can read the output information and also why I needed to create a new command interpreter using "%comspec% /c" before the svnadmin dump command would execute correctly? Thanks. Regards, Dexton

    Read the article

  • vbscript xml problem

    - by user181421
    Hello Friends, I have this vbscript that calls a web service written in .net 2010. I'm getting an error at the last line. Can't figure it out. This is the webservice: http://www.kollelbaaleibatim.com/services/getinfo.asmx/GetFronpageInfo Dim xmlDOC Dim bOK Dim J Dim HTTP Dim ImagePathLeftCar, ImagePathRightCar Dim CarIDLeft, CarIDRight Dim ShortTitleLeftCar, ShortTitleRightCar Dim DescriptionLeftCar, DescriptionRightCar Dim PriceLeftCar, PriceRightCar Set HTTP = CreateObject("MSXML2.XMLHTTP") Set xmlDOC =CreateObject("MSXML.DOMDocument") xmlDOC.Async=False HTTP.Open "GET","http://www.kollelbaaleibatim.com/services/getinfo.asmx/GetFronpageInfo", false HTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" HTTP.Send() dim xmldoc2 set xmldoc2 = Server.CreateObject("Microsoft.XMLDOM") xmldoc2.async = False bOK = xmldoc2.load(HTTP.responseXML) if Not bOK then response.write( "Error loading XML from HTTP") end if response.write( xmldoc2.documentElement.xml)'Prints a good looking xml ShortTitleLeftCar = xmldoc2.documentElement.selectSingleNode("LeftCarShortTitle").text 'ERROR HERE

    Read the article

  • VBScript LDAP: Is there a way to query for physicalDeliveryOfficeName using the email address in Act

    - by phill
    I'm attempting to utilize VBScript to connect pull the physicalDeliveryOfficeName attribute in Active Directory by providing the email address. I know how to do it with a common name like the following: Set MyUser = GetObject ("LDAP://cn=" & uname & ",ou=" & strname & ",DC=bobdom,DC=net") However only the email address is available. How to do this? I've even tried Set MyUser = GetObject ("LDAP://mail=" & uname & ",ou=" & strname & ",DC=bobdom,DC=net") and that doesn't work.

    Read the article

  • I need to call a vbscript function from within an external javascript file :: function

    - by RadAdam
    heres what i got so far : This function is not directly in the html page , its in an external js file , 'main.js'. function createVBScript(){ var script=document.createElement('script'); script.type='text/vbscript'; script.src='vb/fldt.vbs'; document.getElementsByTagName('head')[0].appendChild(script); } the vbs file contains : <!-- // Visual basic helper required to detect Flash Player ActiveX control version information Function VBGetSwfVer() MsgBox "Hello there" End Function // --> thats all i want to do for the time being. how do i call VBGetSwfVer() from main.js ?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >