Re: Win32_Processnot visible on remote machine

From: NayJo (CrawNOSPAMforMEford_at_mindspring.com)
Date: 01/05/05

  • Next message: Gerry Hickman: "Re: Rebooting a PC while not logged-on"
    Date: Wed, 5 Jan 2005 16:15:42 -0500
    
    

    I should have read a little more closely (el rute and Michael Harris).

    If this is turned off, is it available through the straight API?

    NayJo
    "NayJo" <CrawNOSPAMforMEford@mindspring.com> wrote in message
    news:eZcqwe18EHA.1392@tk2msftngp13.phx.gbl...
    > I am starting a process on a remote machine using the exec.vbs script
    > included with the Windows 2000 Resource Kit. This script uses WMI to
    start
    > a Win32_Process on a remote machine. The process I start waits for an
    event
    > then it displays a window and runs a batch file in a separate command
    > window. Both windows are there to show the progress of the application.
    > Successful completion of the task results in a system reboot.
    >
    > If I run this program from Explorer then I do see the windows. But if I
    > start the program from a remote machine using exec.vbs the program runs
    > successfully but never displays anything that I can see.
    >
    > It is almost as if the program is running on another desktop. How do I
    make
    > it visible to the user?
    >
    > I hope that MS does not mind me posting a little code here but I assume
    this
    > may be the relevant portion - as I've said the process is created - it is
    > just not visible.
    >
    > '---------------------
    > ' From exec.vbs Version 1.0
    > '* Copyright (C) 1999 Microsoft Corporation
    >
    > '---------------------
    > ' To connect to WMI...
    > 'Create Locator object to connect to remote CIM object manager
    > Set objLocator = CreateObject("WbemScripting.SWbemLocator")
    > If Err.Number then
    > Call Wscript.Echo( "Error 0x" & CStr(Hex(Err.Number)) & _
    > " occurred in creating a locator object." )
    > If Err.Description <> "" Then
    > Call Wscript.Echo( "Error description: " & Err.Description &
    > "." )
    > End If
    > Err.Clear
    > blnConnect = True 'An error occurred
    > Exit Function
    > End If
    >
    > 'Connect to the namespace which is either local or remote
    > Set objService = objLocator.ConnectServer (strServer, strNameSpace, _
    > strUserName, strPassword)
    > ObjService.Security_.impersonationlevel = 3
    > '---------------------
    > ' To create the process... (J)
    > '---------------------
    > strMessage = ""
    > intProcessId = 0
    >
    > Set objInstance = objService.Get("Win32_Process")
    > If blnErrorOccurred(" occurred getting a " & _
    > " Win32_Process class object.") Then Exit Sub
    >
    > If objInstance is nothing Then Exit Sub
    >
    > intStatus = objInstance.Create(strCommand, null, null, intProcessId)
    > If blnErrorOccurred(" occurred in creating process " & _
    > strCommand & ".") Then Exit Sub
    >
    >
    > '---------------------
    > Is it security related or process related? Many thanks in advance.
    >
    > John C.
    >
    >


  • Next message: Gerry Hickman: "Re: Rebooting a PC while not logged-on"

    Relevant Pages

    • RE: How to start/stop windows service on a remote machine?
      ... impersonate the client user(authenticated via integrated windows ... authentication in IIS) and access some remote protected resource(windows ... the problem you meet is a typical windows ... want to continue access other remote machine, ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Workspace/desktop switching
      ... or even CPU time on a remote machine (won't help if it's local, ... opening/closing individual app windows in actual computer ... Zope products (web apps). ... directory, 3) swap desktops, swap tabs, click "refresh" wait ...
      (Debian-User)
    • Re: A question about windows service access netdriver privilege
      ... Go to the remote machine, open the event log, and check for logon events. ... > the machin account. ... > appdir on Windows 2000 as a network drive. ...
      (microsoft.public.vc.language)
    • Re: remote x-windows via DSL not working
      ... I am having some trouble using X windows via my DSL ... I am able to connect to the remote machine using ... But when I run matlab on the remote machine, ...
      (comp.os.linux.misc)
    • Re: Question about .NET Runtime
      ... Microsoft MVP ... Get Windows XP Service Pack 2 with Advanced Security Technologies: ... "NayJo" wrote: ... | Runtime but I thought the .NET Runtime was part of Windows XP. ...
      (microsoft.public.windowsxp.general)