Jump to content

WMIC command to know Internet Explorer URL


Recommended Posts

Hello everyone,

I am currently doing a program to monitor 14 meeting room displays.

I have a WMI command in console mode to check the processes that run on remote stations (especially that of Internet Explorer).

I would like to know the URL of the page that appears in Internet Explorer on the remote station to be able to check this one.

I did not find the WMIC command that is fine for that, if anyone knows it, thanks to him.

Koumla

 

; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
#include <AutoItConstants.au3>
; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
Opt("GUIOnEventMode", 1)
Opt("MouseCoordMode", 2)
Opt("GUIDataSeparatorChar", "_")
Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",1)
opt("TrayAutoPause",1)
; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
$commande_wmic = "PROCESS GET Name"
$output = @scriptdir & "\ListeApps.txt"
$login = "login_admin"
$passw = "mot_de_passe"

wmic("nom_du_pc")
; ----------------------------------------------------------------------------
; ----------------------------------------------------------------------------
Func wmic($nom_machine)

$cnx = "wmic /node:" & $nom_machine & " /user:" & $login & " /password:" & $passw & " " & $commande_wmic

ConsoleWrite($cnx & @CRLF)

$pid=Run(@ComSpec &' /c ' & $cnx, "",@SW_HIDE ,$STDOUT_CHILD)

$line=""

        While 1

                $line &= StdoutRead($pid)

                        If @error Then ExitLoop

        Wend

ConsoleWrite($line & @CRLF)

$out=@ScriptDir&"\ipconfig_out.txt"

        If FileExists($out) Then FileDelete($out)

FileWrite($out,$line)

$Position = StringInStr($line, "iexplore")

        If FileExists($out) Then FileDelete($out)

        If $Position = 0 Then

                ConsoleWrite("Iexplore non present : " & $Position & " Erreur" & @CRLF)

        Else

                ConsoleWrite("Iexplore est present : " & $Position & " OK!" & @CRLF)

        EndIf

EndFunc
@echo off

wmic /node:nom_du_pc /user:compte_admin /password:mot_de_passe /output:"C:\listeApps.txt" PROCESS GET Name

wmic quit

pause

 

Link to comment
Share on other sites

I doubt you will get the url from WMI or WMIC -- even if it were
on a local machine.

And, I'm drawing a blank on how to do it otherwise,
unless a local script on each machine retrieves it
from the address bar and then relays it back to you.

Maybe someone else has a better solution.

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

Hello @Koumla

Could you please detail more about why you want to do this?

Getting remote browsing urls from other people should only be allowed when the users are aware of it. Otherwise it's privacy invasion.

Edited by Neutro
Link to comment
Share on other sites

Hello,

Thank you for your answers.

So we have 14 meeting room, and we have to make sure that each room properly displays the correct URL on the current and upcoming meetings on the outside screens.


We do not have the right to install aplication.

If this is not possible with WMI, I will go with PSEXEC, but it is a less simple solution.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...