Results 1 to 3 of 3

Thread: OS_SHELL - Strange results using WMIC

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Nov 2014
    Posts
    4
    Rep Power
    0

    OS_SHELL - Strange results using WMIC

    Hello,
    When I attempt to create a file containing a list of Windows Hotfixes using the WMIC command, I encounter the following error: Invalid XSL format (or) file name.

    If I paste the command that is placed on the clipboard by the script directly into a CMD dialog box, it works fine. Also, if I shorten the command to just
    wmic qfe list full /format:htable
    , this also works. Below is the script.

    Hoping someone can help.
    Cheers


    ' Create file containing list of Windows Hotfixes
    ' using the Windows Management Instrumentation Command (WMIC)
    ' command. This can produce and HTML file (cmdh) or a TXT file
    ' (cmdt).
    
    Uses "OS"
    
    Dim wm As String Value "wmic qfe list full "
    
    Dim h1 As String Value "/format:htable > "
    Dim h2 As String Value "%USERPROFILE%\hotfix.html"
    
    Dim t1 As String Value "/format:texttablewsys > "
    Dim t2 As String Value "%USERPROFILE%\hotfix.txt"
    
    Dim cmdh As String 
    Dim cmdt As String 
    
    cmdh = wm & h1 & $DQ & h2 & $DQ
    cmdt = wm & t1 & $DQ & t2 & $DQ
    OS_Shell(cmdh, %OS_WNDSTYLE_MAXIMIZED, %OS_SHELL_SYNC)
    ClipBoard_SetText(cmdh)
    MsgBox(0, cmdh)
    
    Last edited by ErosOlmi; 20-11-2014 at 16:16.

Similar Threads

  1. TBGL_EntitySetFOV gives strange results
    By ReneMiner in forum TBGL General
    Replies: 4
    Last Post: 20-03-2013, 19:09
  2. Help file: results of your efforts
    By ErosOlmi in forum Samples for help file
    Replies: 7
    Last Post: 30-05-2007, 17:23
  3. Speed Test Results
    By catventure in forum General
    Replies: 3
    Last Post: 17-10-2006, 19:04

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •