Search Results

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

Page 9/21 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Delete a folder in the currently logged in user's profile

    - by Dan Cole
    I am trying to create a login script, or bat file to delete the folder located in the following directory. I would like the whole folder deleted with all of its contents "Juniper Networks". This is on a terminal server - C:\Users(username)\AppData\Roaming\Juniper Networks I can write a script for each username, but want a script to put in the startup folder that deleted the folder of the current user each time they login.

    Read the article

  • VBS script works on XP 32-bit but not on 7 64-bit

    - by neurolysis
    This script (a modification of one of Rob van der Woude's) works fine on XP 32-bit, but fails on 7 64-bit at Set objDialog = CreateObject( "UserAccounts.CommonDialog" ), with something similar to the error (translated from Dutch) ActiveX cannot create the object "UserAccounts.CommonDialog". Is there some different way that I have to do this for it to be compatible with Windows 7? MsgBox("Your input avi MUST be exported at 60fps, or this script will not work."),0,"IMPORTANT!" MsgBox("Please select the location of your AVI."),0,"AVI location" WScript.Echo GetFileName( "", "AVI files (*.avi)|*.avi" ) Function GetFileName( myDir, myFilter ) Dim objDialog Set objDialog = CreateObject( "UserAccounts.CommonDialog" ) If myDir = "" Then objDialog.InitialDir = CreateObject( "WScript.Shell" ).SpecialFolders( "MyDocuments" ) Else objDialog.InitialDir = myDir End If If myFilter = "" Then objDialog.Filter = "All files|*.*" Else objDialog.Filter = myFilter End If If objDialog.ShowOpen Then GetFileName = objDialog.FileName Else GetFileName = "" End If End Function

    Read the article

  • WS2008 subst in Logon script does not "stick"

    - by Frans
    I have a terminal server environment exclusively with Windows Server 2008. My problem is that I need to "map" a drive letter to each users Temp folder. This is due to a legacy app that requries a separate Temp folder for each user but which does not understand %temp%. So, just add "subst t: %temp%" to the logon script, right? The problem is that, even though the command runs, the subst doesn't "stick" and the user doesn't get a T: drive. Here is what I have tried; The simplest version: 'Mapping a temp drive Set WinShell = WScript.CreateObject("WScript.Shell") WinShell.Run "subst T: %temp%", 2, True That didn't work, so tried this for more debug information: 'Mapping a temp drive Set WinShell = WScript.CreateObject("WScript.Shell") Set procEnv = WinShell.Environment("Process") wscript.echo(procEnv("TEMP")) tempDir = procEnv("TEMP") WinShell.Run "subst T: " & tempDir, 3, True This shows me the correct temp path when the user logs in - but still no T: Drive. Decided to resort to brute force and put this in my login script: 'Mapping a temp drive Set WinShell = WScript.CreateObject("WScript.Shell") WinShell.Run "\\domain\sysvol\esl.hosted\scripts\tempdir.cmd", 3, True where \domain\sysvol\esl.hosted\scripts\tempdir.cmd has this content: echo on subst t: %temp% pause When I log in with the above then the command window opens up and I can see the subst command being executed correctly, with the correct path. But still no T: drive. I have tried running all of the above scripts outside of a login script and they always work perfectly - this problem only occurs when doing it from inside a login script. I found a passing reference on an MSFN forum about a similar problem when the user is already logged on to another machine - but I have this problem even without being logged on to another machine. Any suggestion on how to overcome this will be much appreciated.

    Read the article

  • How can you enable forms scripting for outlook 2010 on Citrix servers ?

    - by Florent Courtay
    I'd like to deploy Office 2010 on Citrix servers, but i can't enable form scripting support. With outlook 2007, it was solved by adding Outlvbs.dll in the office directory, and running msiexec /i {<Outlook GUID>} ADDLOCAL=OutlookVBScript /qb But it seems this does not work anymore with Outlook 2010, I get the following error : Error 2711. An internal error has occured. (OutlookVBScript). I don't get much help from microsoft support site, as there isn't a lot of informations on office 2010 yet. Have anyone succeded in installing and using outlook 2010 with form scripting in a citrix environment ?

    Read the article

  • Using IIS6 to run kill process. Executable hangs

    - by David
    I'm using the following code (any tried many variations) in a web page that is supposed to kill a process on the server: Process scriptProc = new Process(); SecureString password = new SecureString(); password.AppendChar('p'); password.AppendChar('s'); password.AppendChar('s'); password.AppendChar('w'); password.AppendChar('d'); scriptProc.StartInfo.UserName = "mylocaluser"; scriptProc.StartInfo.Password = password; scriptProc.StartInfo.FileName = @"C:\WINDOWS\System32\WScript.exe"; scriptProc.StartInfo.Arguments = @"c:\windows\system32\killMyApp.vbs"; scriptProc.StartInfo.UseShellExecute = false; scriptProc.Start(); scriptProc.WaitForExit(); scriptProc.Close(); The VBS file is supposed to kill a w3wp.exe process, but never works. There are no errors in the application log. It works locally. I noticed WScript.exe is in task manager every time I run the page, and never goes away. The process WScript.exe (and I tried others such a psexec.exe) is being run as a local user with admin rights (and I tried other types of users including domain admins) when run from IIS, but it works when run from the command line on the server.

    Read the article

  • Move every 3 rows into a column in excel

    - by Eliane El Asmr
    Please i need your help. I need to move every 3 rows into a new colomn. --Let's suppose i have this: Ambassade de France S.E. M. Patrice PAOLI 01-420000-420150 Ambassade de France Mme. Jamilé Anan 01-420000-420150 Ambassade de France Mme . Marie Maamari 01-420000-420150 --I need them to be Like this: Ambassade de France S.E. M. Patrice PAOLI 01-420000-420150 Ambassade de France Mme. Jamilé Anan 01-420000-420150 Ambassade de France Mme . Marie Maamari 01-420000-420150 I have this code. Can you help me Please. It's giving me error. Out of range. What should i change? It's urgent:(the code is for every 7, i need for every 3) Sub Every7() Dim i As Integer, j As Integer, cl As Range Dim myarray(100, 6) As Integer 'I don't know what your data is. Mine is integer data 'Change 100 to however many rows you have in your original data, divided by seven, round up 'remember arrays start at zero, so 6 really is 7 If MsgBox("Is your entire data selected?", vbYesNo, "Data selected?") <> vbYes Then MsgBox ("First select all your data") End If 'Read data into array For Each cl In Selection.Cells Debug.Print cl.Value myarray(i, j) = cl.Value If j = 6 Then i = i + 1 j = 0 Else j = j + 1 End If Next 'Now paste the array for your data into a new worksheet Worksheets.Add Range(Cells(1, 1), Cells(101, 7)) = myarray End Sub Thank you.

    Read the article

  • cmd files to hta

    - by Frode Eskil
    I have a lot of cmd files i use daily for example to add users to local groups, installing printers, run as admin tasks etc. I like to take the scripts i use most frequently and add them to a tabbed hta file, but i have trouble finding a good guide on how to easily do it. Anyone having a good site to share with me? Or do i finally have to start with vb scripting? I have done some but it's so much faster to do a cmd file for me.

    Read the article

  • .VBS scripts have stopped running... No idea why!

    - by Django Reinhardt
    We have two .vbs scripts that are run by our Task Scheduler that have suddenly stopped working for no reason we can fathom. We haven't significantly altered our system configuration in the last 24 hours, and the scripts have run without a hitch for months. According to the Task Scheduler the scripts just keep running and never stop, which is never the case. I stopped all running versions through the Scheduler and manually attempted to run one of the .vbs scripts. I got the following error message: Line: 15 Error: The system cannot locate the resource specified. Code: 800C0005 Source: msxml3.dll Line 15 (or 16 to be more accurate - line 15 itself is blank, but so is line 1) is: xml.Send Would could have suddenly caused this? Looking in system32\ and sysWOW64\ shows that msxml3.dll exists. Anybody got any ideas? Thanks a lot!

    Read the article

  • Create timestamp formula for Excel

    - by flpgdt
    The idea is simple, I'd like a function I could do something like =MOD_DATE_OF(A1:A4) and when any of the cells in such range is modified, the cell I assigned that formula gets the current date. I have found some similar questions on the web and even here, but none of them quite it. The closest I've got was this code somewhere (sorry, lost track of the source): Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Column = 1 Then Target.Offset(0, 1).Value = Date End If End Sub But it is still not a function.. I am using Excel from Office 2010 thanks

    Read the article

  • printer assignments for windows xp workstations within an active directory environment

    - by another_netadmin
    I'm using the following script to handle removing any old networked printers from machines and then assigning the propper ones and making one of them the default. This script is assigned to the OU the workstations reside in and uses group policy loopback so all users that login will get the appropriate printers mapped for them. I tried to use the new Printer Manager as part of W2K3 R2 but when assigning the default this way I get an error that the printer doesn't exist so I'm back to using the script. One flaw that I'm noticing is that it won't remove any printers that happen to be mapped from an RDP session (we don't see this everywhere but there are a few locations). Is there any way to enumerate all RDP printers and remove them similar to how I'm enumerating and removing networked printers? ' ' Printers.vbs - Windows Logon Script. ' RemovePrinters AddPrinters Sub RemovePrinters() On Error Resume Next Dim strPrinter Set objNetwork = WScript.CreateObject("WScript.Network") Set colPrinters = objNetwork.EnumPrinterConnections For i = 0 to colPrinters.Count -1 Step 2 strPrinter=CStr(colPrinters.Item(i+1)) If Not InStr(strPrinter,"\\") = 0 Then objNetwork.RemovePrinterConnection strPrinter, True, True End If Next End Sub Sub AddPrinters() On Error GoTo 0 Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection "\\printers1\JH120-DELL5310" objNetwork.SetDefaultPrinter "\\printers1\Jh120-DELL5310" End Sub

    Read the article

  • Scripting Windows Shares - VBS

    - by Calvin Piche
    So i am totally new to VBS, never used it. I am trying to create multiple shares and i found a Microsoft VBS script that can do this(http://gallery.technet.microsoft.com/scriptcenter/6309d93b-fcc3-4586-b102-a71415244712) My question is, this script only allows for one domain group or user to be added for permissions where i am needing to add a couple with different permissions(got that figured out) Below is the script that i have modified for my needs but just need to add in the second group with the other permissions. If there is an easier way to do this please let me know. 'ShareSetup.vbs '========================================================================== Option Explicit Const FILE_SHARE = 0 Const MAXIMUM_CONNECTIONS = 25 Dim strComputer Dim objWMIService Dim objNewShare strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objNewShare = objWMIService.Get("Win32_Share") Call sharesec ("C:\Published Apps\Logs01", "Logs01", "Log01", "Support") Call sharesec2 ("C:\Published Apps\Logs01", "Logs01", "Log01", "Domain Admins") Sub sharesec(Fname,shr,info,account) 'Fname = Folder path, shr = Share name, info = Share Description, account = account or group you are assigning share permissions to Dim FSO Dim Services Dim SecDescClass Dim SecDesc Dim Trustee Dim ACE Dim Share Dim InParam Dim Network Dim FolderName Dim AdminServer Dim ShareName FolderName = Fname AdminServer = "\\" & strComputer ShareName = shr Set Services = GetObject("WINMGMTS:{impersonationLevel=impersonate,(Security)}!" & AdminServer & "\ROOT\CIMV2") Set SecDescClass = Services.Get("Win32_SecurityDescriptor") Set SecDesc = SecDescClass.SpawnInstance_() 'Set Trustee = Services.Get("Win32_Trustee").SpawnInstance_ 'Trustee.Domain = Null 'Trustee.Name = "EVERYONE" 'Trustee.Properties_.Item("SID") = Array(1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0) Set Trustee = SetGroupTrustee("domain", account) 'Replace ACME with your domain name. 'To assign permissions to individual accounts use SetAccountTrustee rather than SetGroupTrustee Set ACE = Services.Get("Win32_Ace").SpawnInstance_ ACE.Properties_.Item("AccessMask") = 1179817 ACE.Properties_.Item("AceFlags") = 3 ACE.Properties_.Item("AceType") = 0 ACE.Properties_.Item("Trustee") = Trustee SecDesc.Properties_.Item("DACL") = Array(ACE) Set Share = Services.Get("Win32_Share") Set InParam = Share.Methods_("Create").InParameters.SpawnInstance_() InParam.Properties_.Item("Access") = SecDesc InParam.Properties_.Item("Description") = "Public Share" InParam.Properties_.Item("Name") = ShareName InParam.Properties_.Item("Path") = FolderName InParam.Properties_.Item("Type") = 0 Share.ExecMethod_ "Create", InParam End Sub Sub sharesec2(Fname,shr,info,account) 'Fname = Folder path, shr = Share name, info = Share Description, account = account or group you are assigning share permissions to Dim FSO Dim Services Dim SecDescClass Dim SecDesc Dim Trustee Dim ACE2 Dim Share Dim InParam Dim Network Dim FolderName Dim AdminServer Dim ShareName FolderName = Fname AdminServer = "\\" & strComputer ShareName = shr Set Services = GetObject("WINMGMTS:{impersonationLevel=impersonate,(Security)}!" & AdminServer & "\ROOT\CIMV2") Set SecDescClass = Services.Get("Win32_SecurityDescriptor") Set SecDesc = SecDescClass.SpawnInstance_() 'Set Trustee = Services.Get("Win32_Trustee").SpawnInstance_ 'Trustee.Domain = Null 'Trustee.Name = "EVERYONE" 'Trustee.Properties_.Item("SID") = Array(1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0) Set Trustee = SetGroupTrustee("domain", account) 'Replace ACME with your domain name. 'To assign permissions to individual accounts use SetAccountTrustee rather than SetGroupTrustee Set ACE2 = Services.Get("Win32_Ace").SpawnInstance_ ACE2.Properties_.Item("AccessMask") = 1179817 ACE2.Properties_.Item("AceFlags") = 3 ACE2.Properties_.Item("AceType") = 0 ACE2.Properties_.Item("Trustee") = Trustee SecDesc.Properties_.Item("DACL") = Array(ACE2) End Sub Function SetAccountTrustee(strDomain, strName) set objTrustee = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_Trustee").Spawninstance_ set account = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_Account.Name='" & strName & "',Domain='" & strDomain &"'") set accountSID = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_SID.SID='" & account.SID &"'") objTrustee.Domain = strDomain objTrustee.Name = strName objTrustee.Properties_.item("SID") = accountSID.BinaryRepresentation set accountSID = nothing set account = nothing set SetAccountTrustee = objTrustee End Function Function SetGroupTrustee(strDomain, strName) Dim objTrustee Dim account Dim accountSID set objTrustee = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_Trustee").Spawninstance_ set account = getObject("Winmgmts:{impersonationlevel=impersonate}!root/cimv2:Win32_Group.Name='" & strName & "',Domain='" & strDomain &"'") set accountSID = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_SID.SID='" & account.SID &"'") objTrustee.Domain = strDomain objTrustee.Name = strName objTrustee.Properties_.item("SID") = accountSID.BinaryRepresentation set accountSID = nothing set account = nothing set SetGroupTrustee = objTrustee End Function

    Read the article

  • How does the "Last Result" column of Scheduled Tasks in Windows Server 2003 get set from a process or script?

    - by leeand00
    The Last Result column of the Scheduled Tasks Window on Windows Server 2003, displays the result of the execution of the .exe, .vbs, .ps1, .bat, .cmd, etc... that has been run at the scheduled time. There is also an archived history of this value that appears in the Scheduled Tasks Log (Found on the Scheduled Tasks Window under the Advanced->View Log) Now my question is, if I'm running a scheduled task that is a .exe, .vbs, .ps1, .bat, .cmd, etc... how do I use that process to return a specific Last Result when the process ends? P.S. If you think this question should be split up into smaller parts since I'm painting pretty broadly with it, just let me know and I'll split it into subsequent smaller questions

    Read the article

  • How to Read XML and Generate SQL Insert

    - by hackerkatt
    I am trying to write a VB Script to read a XML file (downloaded daily) and insert the information into a MSSQL DB. The content of the XML is a list if CDRs (Call Data Records). I need to parse the file and insert the cdr's into a table. I'm a Ruby,Perl,PHP,Javascript,SQL,... programer. But I've really never written any VB Script. I've done some googling and find a number of examples on how to generate XML from a SQL Query, but not the reverse. Any help/suggestions would be greatly appreciated. Thank you!

    Read the article

  • The instruction at “0x7c910a19” referenced memory at “oxffffffff”. The memory could not be “read”

    - by ClareBear
    Hello guys/girls I have a small issue, I receive the following error before the .vbs terminates. I don't know why this error is thrown. Below is the process of the .vbs file: Call ImportTransactions() Call UpdateTransactions() Function ImportTransactions() Dim objConnection, objCommand, objRecordset, strOracle Dim strSQL, objRecordsetInsert Set objConnection = CreateObject("ADODB.Connection") objConnection.Open "DSN=*****;UID=*****;PWD==*****;" Set objCommand = CreateObject("ADODB.Command") Set objRecordset = CreateObject("ADODB.Recordset") strOracle = "SELECT query here from Oracle database" objCommand.CommandText = strOracle objCommand.CommandType = 1 objCommand.CommandTimeout = 0 Set objCommand.ActiveConnection = objConnection objRecordset.cursorType = 0 objRecordset.cursorlocation = 3 objRecordset.Open objCommand, , 1, 3 If objRecordset.EOF = False Then Do Until objRecordset.EOF = True strSQL = "INSERT query here into SQL database" strSQL = Query(strSQL) Call RunSQL(strSQL, objRecordsetInsert, False, conTimeOut, conServer, conDatabase, conUsername, conPassword) objRecordset.MoveNext Loop End If objRecordset.Close() Set objRecordset = Nothing Set objRecordsetInsert = Nothing End Function Function UpdateTransactions() Dim strSQLUpdateVAT, strSQLUpdateCodes Dim objRecordsetVAT, objRecordsetUpdateCodes strSQLUpdateVAT = "UPDATE query here SET [value:costing output] = ([value:costing output] * -1)" Call RunSQL(strSQLUpdateVAT, objRecordsetVAT, False, conTimeOut, conServer, conDatabase, conUsername, conPassword) strSQLUpdateCodes = "UPDATE query here SET [value:costing output] = ([value:costing output] * -1) different WHERE clause" Call RunSQL(strSQLUpdateCodes, objRecordsetUpdateCodes, False, conTimeOut, conServer, conDatabase, conUsername, conPassword) Set objRecordsetVAT = Nothing Set objRecordsetUpdateCodes = Nothing End Function It does both the import and update and seems to throw this error after. If I comment out the ImportTransactions it doesnt throw a error, however I have produced similar code for another vbs file and this does not throw any errors Thanks in advance for any help, Clare

    Read the article

  • ASP FPDF, problem with inserting image

    - by Dels
    Hi there, I have some problem with inserting image when i generate pdf using FPDF library (ASP port version) you can get it here ASP FPDF I have tried this code (this was ASP VBScript): pdf.Image Server.MapPath("map.jpg"), 10, 10, 800, 400 pdf.Image "map.jpg", 10, 10, 800, 400 pdf.Image "http://localhost/pdf_test/map.jpg", 10, 10, 800, 400 None of the codes above work... it keeps throw an error: Microsoft JScript runtime error '800a138f' Object expected /pdf/libs/fpdf.asp, line 817 And from fpdf.asp line 817 (This was ASP JScript): type=SupposeImageType(xfile); However, without inserting image(s) a.k.a text-only pdf it works fine. Can someone help me fix this thing? Thanks Dels

    Read the article

  • Can't connect twice to linked table using ACE/JET driver

    - by Tmdean
    I'm trying to connect to an MS Access database linked table in VBScript. It works fine connecting the first time on one connection but if I close that connection and open a new one in the same script it gives me an error. test.vbs(13, 1) Microsoft Office Access Database Engine: ODBC--connection to '{Oracle in OraClient10g_home1}DB_NAME' failed. This is some code that triggers the error. TABLE_1 is an ODBC linked table in the test.mdb file. Dim cnn, rs Set cnn = CreateObject("ADODB.Connection") cnn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data source=test.mdb" Set rs = cnn.Execute("SELECT * FROM [TABLE_1]") rs.Close cnn.Close Set cnn = CreateObject("ADODB.Connection") cnn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data source=test.mdb" Set rs = cnn.Execute("SELECT * FROM [TABLE_1]") '' crashes here rs.Close cnn.Close This error does not occur if I try to access an ordinary Access table. Right now I'm thinking it's a bug in the Oracle ODBC driver.

    Read the article

  • Is there a Windows API to modify file type associations for an extension?

    - by JohnFx
    I'm looking for a way to programatically tweak the particulars of a file association on a Windows system. For example, the "Application User to Perform this Action" setting for the "Open" action for a particular file type. Clearly I could do this by modifying the registry directly, but if there is an API I'd prefer to use that as it would likely be more resilient to changes in the OS handling of mapping extensions to applications. For my purposes I'm needing to write this in VBScript (.VBS) file because it is part of a package to be used with VMWare ThinApp that mandates it. However, I'll port/wrap/whatever I need to make this week, so I am open to any solution (including using the .NET framework)

    Read the article

  • Script for run script

    - by user280926
    Hello everybody I have a script on vbscript Dim WSHShell, WinDir, Value, wshProcEnv, fso, Spath Set WSHShell = CreateObject("WScript.Shell") Dim objFSO, objFileCopy Dim strFilePath, strDestination Const OverwriteExisting = True Set objFSO = CreateObject("Scripting.FileSystemObject") Set windir = objFSO.getspecialfolder(0) objFSO.CopyFile "\\dv.rt.ru\SYSVOL\DV.RT.RU\scripts\shutdown.vbs", windir&"\", OverwriteExisting strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2") JobID = "1" Set colScheduledJobs = objWMIService.ExecQuery _ ("Select * from Win32_ScheduledJob") For Each objJob in colScheduledJobs objJob.Delete Next Set objNewJob = objWMIService.Get("Win32_ScheduledJob") errJobCreate = objNewJob.Create _ (windir & "\shutdown.vbs", "********093000.000000+660", _ True, 1 OR 2 OR 4 OR 8 OR 16 OR 32 OR 64, ,True, JobId) How make that shutdown.vbs not run once at 9:30 but run for 9:30 to 12:00

    Read the article

  • How can I clear the cache in an Outlook client pro grammatically?

    - by Curtis Inderwiesche
    I am executing the following routine often in order to clear the local cache of many Outlook clients (Outlook 2003) in order to fix corrupted Forms stored on the users local drive. On the Tools menu, click Options, and then click the Other tab. Click Advanced Options. In the Advanced Options box, click Custom Forms. In the Custom Forms box, click Manage Forms. In the Forms Manager box, click Clear Cache. Is there a way I can program this to occur on the local client? I am looking for a solution that could be included in Outlooks VBScript in order to include it in yet another 'Organizational Forms Library' Forms client side validation code. Would this question better fit Server Fault Stack Exchange via an admin script/tool?

    Read the article

  • Converting BMPs to avi

    - by Lucas
    I want to convert folders with video-frames in bitmaps into avi or mpeg files. I already have a VBScript which does a lot of stuff on those files, so it would be neat to integrate a functionallity to convert those folders automatically from my script. I can only find solutions that seem pretty low level and unfortunatley I don't know a whole lot about video file formats. What is the easiest approach to achieve that without reinventing the wheel? My problem is that there is seem to be so much information that I am not sure where to start.

    Read the article

  • document.getElementByID - checking whether an element has been found or not

    - by be here now
    Hi, guys. Here's a sample code, that opens an internet explorer window, navigates to google, and gets some element on the page by its unique id: set ie = CreateObject("InternetExplorer.Application") ie.navigate("www.google.com") ie.visible = true while ie.readystate <> 4 wscript.sleep 100 WEnd set some_object = ie.document.getelementbyid("xjsc") MsgBox some_object.tagname, 0 This sample brings me a DIV popup, which satisfies me completely. But at the next step I'd like to check whether some id exists in the page, or not. Unfortunately, I can't just be, like, set some_object = ie.document.getelementbyid("some_non_existant_id") if some_object.tagname = "" then ... because it gives me the following error: ie.vbs(12, 1) Microsoft VBScript runtime error: Object required: 'some_object' So, what's the best practice to check whether an element has been found or not?

    Read the article

  • Call a subroutine/function in Global.asa from an ASP page?

    - by Don Zacharias
    Hi all, In Classic ASP, shouldn't a subroutine in global.asa be available to all .asp pages in the session? For some reason I am having trouble calling the sub. Before I look at whether something specific to my application is causing the problem I wanted to make sure I understood properly. global.asa: <SCRIPT LANGUAGE="VBScript" RUNAT="Server"> sub foo session("foo") = true end sub </SCRIPT> myinclude.inc, included in all pages: call foo I get 'Type Mismatch' runtime error referencing foo. Am I totally misunderstanding this?

    Read the article

  • Saving XML in UTF-8 with MSXML

    - by stung
    I'm trying to load a simple Xml file (encoded in UTF-8): <?xml version="1.0" encoding="UTF-8"?> <Test/> And save it with MSXML in vbscript: Set xmlDoc = CreateObject("MSXML2.DOMDocument.6.0") xmlDoc.Load("C:\test.xml") xmlDoc.Save "C:\test.xml" The problem is, MSXML saves file in ANSI instead of UTF-8 (despite the original file being encoded in UTF-8). The MSDN docs for MSXML says that save() will write the file in whatever encoding the XML is defined in but this is clearly not working at least on my machine. How can MSXML save in UTF-8?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >