How many time my application is run in memory (SOLVED)

Re: How many time my application is run in memory (SOLVED)

Postby MarcoBoschi » Tue May 17, 2022 9: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
User avatar
MarcoBoschi
 
Posts: 1055
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: How many time my application is run in memory (SOLVED)

Postby MarcoBoschi » Tue May 17, 2022 9: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
User avatar
MarcoBoschi
 
Posts: 1055
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: How many time my application is run in memory (SOLVED)

Postby MarcoBoschi » 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
User avatar
MarcoBoschi
 
Posts: 1055
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: How many time my application is run in memory (SOLVED)

Postby Jimmy » Tue May 17, 2022 11:14 pm

hi,

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

this is Xbase++ Code
Code: Select all  Expand view
   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
User avatar
Jimmy
 
Posts: 1686
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: How many time my application is run in memory (SOLVED)

Postby MarcoBoschi » Fri May 27, 2022 1: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
User avatar
MarcoBoschi
 
Posts: 1055
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: How many time my application is run in memory (SOLVED)

Postby Jimmy » 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: Select all  Expand view
get-service winrm


If it is stopped, type:
Code: Select all  Expand view
enable-PSRemoting -force


Add access permission to the remote host.
Code: Select all  Expand view
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
Image
when all is enable try
Code: Select all  Expand view
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
Last edited by Jimmy on Mon May 30, 2022 1:24 pm, edited 1 time in total.
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1686
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: How many time my application is run in memory (SOLVED)

Postby MarcoBoschi » Mon May 30, 2022 11:16 am

8)
User avatar
MarcoBoschi
 
Posts: 1055
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: How many time my application is run in memory (SOLVED)

Postby Otto » 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?
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6252
Joined: Fri Oct 07, 2005 7:07 pm

Re: How many time my application is run in memory (SOLVED)

Postby Jimmy » Mon May 30, 2022 1:25 pm

hi Otto,

using WMI "just" get Hard-/Software Information of PC, no Screen or "Input"
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1686
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: How many time my application is run in memory

Postby Jimmy » Mon May 30, 2022 1: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: Select all  Expand view
compmgmt.msc
look at "Share Folder" -> "Session" and/or ""Open Files"
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1686
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: How many time my application is run in memory (SOLVED)

Postby Antonio Linares » Mon May 30, 2022 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41852
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 94 guests