FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How many time my application is run in memory (SOLVED)
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Tue May 17, 2022 09:23 AM

Jimmy,
It's Fantastic!

In this way I can verify from client if there is a running application in my server

  oWMI := oLocator:ConnectServer( "srvmng" , ,  user , password  )

Many thanks

Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Tue May 17, 2022 09:48 AM
In this url
https://stackoverflow.com/questions/677867/run-application-or-process-on-a-remote-computer

it seems that I can execute in a remote server a program
Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Tue May 17, 2022 12:34 PM
Hi,
maybe someone have already translate this function from delhpi to fivewin?

https://stackoverflow.com/questions/677867/run-application-or-process-on-a-remote-computer

I'd like to test just one thing

many thanks
marco
Marco Boschi
info@marcoboschi.it
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Tue May 17, 2022 11:14 PM
hi,

WMI can access "REMOTE" ... but you need "Rights"

this is Xbase++ Code
Code (fw): Select all Collapse
   IF VAL( OS(OS_VERSION) ) > 6
      IF strComputer == "Localhost"
         objWMIServices  := CreateObject( "WbemScripting.SWbemLocator" ):ConnectServer(strComputer, "Root\CIMv2")
      ELSE
         IF EMPTY(cPassword)
            MSGBOX("Need Password")
            QUIT
         ELSE
            objWMIServices  := CreateObject( "WbemScripting.SWbemLocator" ):ConnectServer(strComputer, "Root\CIMv2",strComputer+"\"+cUser,cPassword)
         ENDIF
      ENDIF
   ELSE
      objWMIServices  := GetObject("WinMgmts:{impersonationLevel=impersonate}\\"+strComputer+"\Root\CIMv2") 
   ENDIF

Is it possible to read Open Files in Shared folders via WMI?. (My Computer, Manage, System Tools, Shared folder, Open Files)

as i know you "can" find out "share" Files ... but only "on Server"
greeting,

Jimmy
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Fri May 27, 2022 01:27 PM

Hi Jimmy i've tried but I'm not capable :(
I'd Like to test a function to launch some applications server side
many thanks
marco

Marco Boschi
info@marcoboschi.it
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Sat May 28, 2022 10:23 AM
hi,

you need to enable "winrm" Service on Remote PC

try Powershell on Remote PC and check with
Code (fw): Select all Collapse
get-service winrm


If it is stopped, type:
Code (fw): Select all Collapse
enable-PSRemoting -force


Add access permission to the remote host.
Code (fw): Select all Collapse
winrm s winrm/config/client '@{TrustedHosts="REMOTECOMPUTERNAME/IP"}'


REMOTECOMPUTERNAME = Name "see" under Network
IP = 192.xxx.xxx.xxx

---

also Windows Firewall is blocking the Remote Access.
goto Firewall and select WMI

when all is enable try
Code (fw): Select all Collapse
get-wmiobject CIM_Memory -computername "192.xxx.xxx.xxx" -credential "username"

you will ask for Password ... and hope now you got access of Memory Information

---

when all work in Powershell you can run you harbour App
greeting,

Jimmy
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Mon May 30, 2022 11:16 AM

8)

Marco Boschi
info@marcoboschi.it
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: How many time my application is run in memory (SOLVED)
Posted: Mon May 30, 2022 11:53 AM

Hello Jimmy,
maybe you can just explain what the difference is between RDP and run remote as described here?

Where is the screen displayed when "Run remotely".

Kind regards
Otto

PS: What about a Tirol holiday?

Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: How many time my application is run in memory (SOLVED)
Posted: Mon May 30, 2022 01:25 PM

hi Otto,

using WMI "just" get Hard-/Software Information of PC, no Screen or "Input"

greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: How many time my application is run in memory
Posted: Mon May 30, 2022 01:37 PM
hi,
Horizon wrote:Is it possible to read Open Files in Shared folders via WMI?. (My Computer, Manage, System Tools, Shared folder, Open Files)

i need to know "Win32_xxx" to "generate WMI Code using "WMI Code Creator"
https://www.microsoft.com/en-us/download/details.aspx?id=8572
it will not "generate" xBase OOP Code but it it easy to "translate"

if you tell me which "Win32_xxx" you are looking for i can "generate" xBase OOP Code

---

"on Server" you can run
Code (fw): Select all Collapse
compmgmt.msc
look at "Share Folder" -> "Session" and/or ""Open Files"
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How many time my application is run in memory (SOLVED)
Posted: Mon May 30, 2022 02:11 PM

Dear Marco,

Using Harbour hbnetio you can execute remote Harbour code on the server.

Ritzan explained that to us recently

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion