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. LeighTT

    Object status fails with REG.EXE

    When I run the following command the status always remains 0 and program hangs. This only occurs on Windows XP machines running the REG.EXE program, ok on NT4 set oExec = objshell.exec ("reg query ""Hklm\software\microsoft\windows nt\CurrentVersion""") do while oExec.status = 0 wscript.sleep...
  2. LeighTT

    redirecting stdout using run command

    The script is running on XP however the registry query will be across NT/2000 & 2003
  3. LeighTT

    redirecting stdout using run command

    The machines I need to query do not have WMI installed and its not possible to role out WMI within timeframe hence the use of Reg.exe.
  4. LeighTT

    redirecting stdout using run command

    I have tested both of your suggestions but the problem persists.
  5. LeighTT

    redirecting stdout using run command

    Do until status = 0 would imply continue before the command has completed WshRunning ( = 0) The job is still running. WshFinished ( = 1) The job has completed My script needs to confirm the command has completed before moving on and there lies the problem when using the req.exe command.
  6. LeighTT

    redirecting stdout using run command

    I have substitued the command line with Set oExec = objshell.exec ("calc.exe") and this works fine, so it seems to be something related to the Reg.exe command line not terminating correctly any ideas as i'm stumped
  7. LeighTT

    redirecting stdout using run command

    I've changed it to a simplified version as below, if I remove the do while loop then output is ok. The oExec status always remains 0 Dim x const ForAppending = 8, forwriting = 2 Set objShell=CreateObject("WScript.Shell") Set objfso=CreateObject("Scripting.FileSystemObject") set stdout =...
  8. LeighTT

    redirecting stdout using run command

    When I substitue the RUN with EXEC command the program gets stuck in the loop below and gives no output. Do While X.Status = 0 WScript.Sleep 100 Loop
  9. LeighTT

    redirecting stdout using run command

    I'm having trouble capturing stdout from the run command using script below any ideas???? const ForAppending = 8, forwriting = 2 Set objShell=CreateObject("WScript.Shell") Set objfso=CreateObject("Scripting.FileSystemObject") set stdout = wscript.stdout Set X = objshell.run ("%comspec% /c...
  10. LeighTT

    Files Exist

    Thanks for your responses, its now working a treat
  11. LeighTT

    Files Exist

    I have a script that runs a net use command to remote workstations Admin$. Once the Net use authentication takes place I need to confirm I have access to files within the share. If I were using shell script I would run the following command. If file Exists \\Workstation\admin\*.* However as...
  12. LeighTT

    Ras users

    I'm looking to run a logon script that detects whether the user is connected via RAS before commencing. Is there a VBSCript command that I can run for this. Note the check will be for windows 9.X and 2000
  13. LeighTT

    Folder size

    I have written as script that checks the last accessed date and and size of shares on a server. This works fine on servers with fairly small share'd area's. The problem I have is with large dept shares that maybe 50GB plus. I,m using the Getfolder command as below to accertain the size Set f =...
  14. LeighTT

    array out of range

    The source file is the share info pulled out of the Registry and is in the form shown below. What I am trying to do is to extract the sharename and Share path and then check for the existance of the directory. The complete script is as follows. Dim MyString, myarray, myarray2, myarray3...
  15. LeighTT

    array out of range

    I am new to Vbscript and have come up against a problem using an array to split a string. The error is (subscript out of range). The error occurs after reading the 10th line of text. I have been looking at ways to destroy and recreate the array before looping back but cannot see a way to do this...

Part and Inventory Search

Back
Top