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 strongm 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. ajtsystems

    error handling in shellfolder

    Hi, My error handling doesn't seem to be working: sub backup (arrmem, backupdir) err.clear on error resume next set objShell = CreateObject("shell.application") set Shellfolder = objShell.NameSpace(backupdir) shellfolder.CopyHere (arrmem), 272 if Err.number = 0 then 'happy days else...
  2. ajtsystems

    Delete folder and not just subfolders

    Hi I have a script which deletes the files and folders within subfolders of a folder. I need to delete all folders below objFolders (C:\scripts). Here it is: strFolder = "C:\scripts" intDays = 0 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolders =...
  3. ajtsystems

    why doesnt this work

    Hi: objStartFolder = "d:\" LogFile = "file list.txt" Dim objLogFile:Set objLogFile = objFSO.CreateTextFile(logfile, 2, True) Set objFolder = objFSO.GetFolder(objStartFolder) Set colFiles = objFolder.Files For Each objFile in colFiles objLogFile.Write objFolder.Path & "\" & objFile.Name...
  4. ajtsystems

    Error Handling in shell application

    Hi I have a sub which copies files using shell.application and copyhere. It's working however I would like to get some error logging going for any files which dont copy. I've looked through the MSDN pages but there is nothing obvious so I have added my own but it doesnt work sub backup...
  5. ajtsystems

    Wmi echo

    Hi I have a WMI collection as below: Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") if instr (strComputer, "localhost") then Set objSWbemServices = objSWbemLocator.ConnectServer (strComputer, "root\WebAdministration", ms406) else Set objSWbemServices =...
  6. ajtsystems

    Moving Files Based on Modified Data Recursively

    I wrote this script , it uses 7-zip after finding the files older that a given time - dunno if its any good to you: Dim WSshell Set fso = CreateObject("Scripting.FileSystemObject") Set objShell = wscript.createObject("wscript.shell") 'Install path of 7 Zip, ignor if using Environment...
  7. ajtsystems

    WMI query compare on 2 different name spaces

    Hi, I have a script which pulls from IIS7 the application path, the application pool and the site name. The apppool comes from a different part of the WMI database so needs a different object to connect. Here is my code: Const strInFile = "hostlist.txt" Const ForReading = 1 Dim objFSO Set...
  8. ajtsystems

    Yes\No selection

    Hi, I have a script which has an array containing file paths. I am going to use this array to prompt the user with the path and then get user interaction using an explorer browse folder to find a folder to backup the array path to. Now, not all the paths in the array need backing up so is...
  9. ajtsystems

    X characters from the right

    Hi, I have a path which I need to trim down so that I have the last folder of it. The string I have is c:\windows\system32\copyfolder. I need to use \copyfolder as a variable elsewhere. I have looked at various functions but can seem to find anything which wors including Right, Left and...
  10. ajtsystems

    Copy Files

    Hi, I have a script which puls info from WMI and creates an array with the returned information. The path information I am going to use to copy some remote files to but I need to exclude 1 particular file and copy the remaining files and folders. Here is my code so far: Do Until...
  11. ajtsystems

    Shell.application

    Hi, I have a script which I have compilled to collect some file paths. it uses set objShell = CreateObject("shell.application") and then copies files using these properties shellfolder.CopyHere (arrmem), 20 I am getting an error on line 53 which says object required "shellfolder" but I know...
  12. ajtsystems

    Remote WMI into IIS7

    Hi, I've been trying to remotely query using WMI an instance of IIS7. I've ritten the code which includes all the username and password but I am getting access denied. Const strInFile = "hostlist.txt" Const strOutFIle = "results.txt" Const ForReading = 1 Const wbemFlagReturnImmediately =...
  13. ajtsystems

    VBSCRIPT with IIS7

    Hi, I have managed to get it to work but want to get the code to do remote machines from a text file using an array, this code works OK locally How hard would this be? Set oWebAdmin = GetObject("winmgmts:root\WebAdministration") Set paths = oWebAdmin.ExecQuery( "SELECT * FROM application" )...
  14. ajtsystems

    VBSCRIPT with IIS7

    Hi Geates, I have amde some changes as I can't really have and text files kicking around..it's still using appcmd.exe: set objShell = CreateObject("Wscript.Shell") set objFSO = CreateObject("Scripting.FileSystemObject") strSiteName = "jamess" 'Run appcmd and list complete config for the...
  15. ajtsystems

    VBSCRIPT with IIS7

    Hi, I am trying to query an install of IIS 7 using VBscript and WMI but am having some problems. From what I can see there are e ways this is possible 1: IIS 7 WMI using XML 2: WMI using IIS 6 3: IIS 7 WMI I'd like to use WMI IIS 7 and XML as the servers I will be working on only have this...
  16. ajtsystems

    Allowing a different subnet access through VLAN1 - IOS

    I have managed to get it working. Firstly the IP address I had given vlan1 on the 857 was clashing with th eIP address of the gateway interface to the other network - I only found this out by talking to the other network chap. The reason the Juniper had to go was because it was not ADSL 2+...
  17. ajtsystems

    Allowing a different subnet access through VLAN1 - IOS

    Hi, Unfortunately I do not look after this switch, however it does uplink to the Juniper
  18. ajtsystems

    Allowing a different subnet access through VLAN1 - IOS

    Hi Unclerico, Yes the 2 servers are plugged directly into the Cisco 857. The upstream kit and the network 2 are not mine, so past the HP switch I couldn't tell you what is configured but from experience I would say somewhere upstream possibly on the HP is a static route pointing to network 1
  19. ajtsystems

    Allowing a different subnet access through VLAN1 - IOS

    OK, here goes: There is an HP Procurve Layer3 switch which joins 2 networks: Network 1 - 10.3.128.0/24 Network 2 - 172.19.13.0/24 Hanging off this switch currently is a Juniper VPN router on Network 1 which has 2 servers connected on the same network (10.3.128.0/24) At the moment there are...
  20. ajtsystems

    Allowing a different subnet access through VLAN1 - IOS

    Hi, I need to allow a different LAN connected but a different switch access through my outer to its trusted interface. I am runnning a fairly complex VPN setup but currently dont have any access lists on the vlan1 interface If I create an access list for the subnet and then aplly this to the...

Part and Inventory Search

Back
Top