Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. PhilJackson

    Delete Image when done using it

    Could be you just need to call the .Dispose() method of the acquired Image. Phil
  2. PhilJackson

    run a vbscript in dos file

    Hi, What about: WScript.Quit(data) The value used by Quit is the error code that would work with the command line given by PHV Spong
  3. PhilJackson

    Updating a value in an XML Document

    Hi, How about (once you have confirmed that the node exists): gsPCPhotoDir.Text = "C:" ' make sure you save the XML at the end oXMLObject.Save strFileNameYouOpened Spong
  4. PhilJackson

    XML DOM - How do i check if tag exists?

    Why not just do this? Dim Dom As Object Set Dom = CreateObject("MSXML.DomDocument") Dom.async = False Dom.Load gsBASE_PATH & "\" & gsENV_PATH & "\" & gsDATA_PATH & "\System.xml" Set gsPCPhotoDir = Dom.selectSingleNode("//SystemParams/Params/PCPHOTODIR") if Not...
  5. PhilJackson

    How to Add Domain Group to Local Group

    Try this: Option Explicit Dim strComp, oGrp, oUsr On Error Resume Next strComp = "." Set oGrp = GetObject("WinNT://" & strComp & "/Power Users") Set oUsr = GetObject("WinNT://YourDomain/Domain Users") oGrp.Add(oUsr.ADsPath) Spong
  6. PhilJackson

    Default Printer Help

    Hi, I do not know if you have looked at this yet, but this works for me. Set objNetwork = CreateObject("Wscript.Network") objNetwork.AddWindowsPrinterConnection "\\10.0.0.1\HPLaserJet6MP" ' Set the printer to be the default printer objNetwork.SetDefaultPrinter "\\10.0.0.1\HPLaserJet6MP"...
  7. PhilJackson

    Simple Question (I Think)

    ScarEye This link may give you all the info you need http://www.tek-tips.com/viewthread.cfm?qid=886788 Hope this helps Spong
  8. PhilJackson

    Map Drives and 80070043 error

    Change your script to: Set objNetwork = WScript.CreateObject("WScript.Network") objNetwork.MapNetworkDrive "Z:", "\\myserver\myshare" Set objNetwork = Nothing The MapNetworkDrive does not accept the mapping with a trailing slash. Spong
  9. PhilJackson

    DHCP to Static IP

    You have not specified how you are reading your values in. Also, If you have set On Error Resume Next, you will not see the reason for the failure. It could be that you have a type mismatch on the parameter type. Try the following: strComputer = "." strIPAddress = Array("10.1.1.2")...
  10. PhilJackson

    Print a .TXT file

    This should be more what you are looking for: Set Shell = WScript.CreateObject("WScript.Shell") Sub Printtxtfile(filename) Shell.Run "Notepad /p " & filename End Sub Spong
  11. PhilJackson

    Print a .TXT file

    Just realised I was in the VBScript page... Sorry. Ignore my above comments.
  12. PhilJackson

    Print a .TXT file

    I would have used ShellExecute with the print verb. URL:http://www.tek-tips.com/viewthread.cfm?qid=53365 The above link may help you get started on this. Spong
  13. PhilJackson

    Adding Users to Local Administrators Group

    Try this for an alternate solution: strComputer = "." Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators") Set objUser = GetObject("WinNT://DomainNameHere/UserNameHere") objGroup.Add(objUser.ADsPath) You can substitute a list of PCs in the strComputer list. Spong
  14. PhilJackson

    Changing the local name of mapped network drives

    Try this: Dim objShell Dim strDrive Set objShell = CreateObject("Shell.Application") strDrive = "H:\" objShell.NameSpace(strDrive).Self.Name = "HR" Spong
  15. PhilJackson

    Script to execute a URL

    How about the following: Function doSomething(a, b) On Error Goto doSomethingError ' do some work here doSomethingExit: Exit Function doSomethingError: MsgBox "Error occured" Resume doSomethingExit End Function I have not tested the above but should work for your problem...
  16. PhilJackson

    VBScript in outlook 2000

    Not quite sure how much other script you have set up. this Microsft kb item may help you. http://support.microsoft.com/kb/q168022/ Spong
  17. PhilJackson

    Adding some kind of progress notification to a script.

    Hi Patrick, If you created the object using this as an example: Set objIE = CreateObject("InternetExplorer.Application") Set objDoc = objIE.Document Then you could shut the window using this: objDoc.Close objIE.Close Spong
  18. PhilJackson

    document owner information

    If FileServ1 is the name of your server, then put quotes "" around the name. As it is, it is taken as a variable. Tsuji was correct. Start the loop with: Do While Not txtFileName.atendofstream=true Spong
  19. PhilJackson

    ctrl+F

    You could use Sendkeys as follows: Set objShell = WScript.CreateObject("WScript.Shell") objShell.AppActivate "WordPerfect" objShell.SendKeys "^{F4}" Spong
  20. PhilJackson

    scripting tcp/ip settings

    I should have added this at the beginning... it would be useful! strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colNetAdapters = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE") Spong

Part and Inventory Search

Back
Top