Sep-24-2021, 06:26 PM
I found a different script online to 'remote' to a host. it is better.
it produces an error when trying to connect to a remote host:
'"Problem creating process: 8"
import wmi, time ip = 'xx.xx.xx.xxx' username = "user" password = "password!" SW_SHOWNORMAL = 1 from socket import * print ("Establishing connection to %s" %ip) c = wmi.WMI(ip, user=username, password=password) process_startup = c.Win32_ProcessStartup.new() process_startup.ShowWindow = SW_SHOWNORMAL process_id, result = c.Win32_Process.Create(CommandLine=r"C:\02\SubPrOc-Get-L_TESTING.py",ProcessStartupInformation=process_startup) if result == 0: print ("Process started successfully: %d" % process_id) else: print("Problem creating process: %d" % result)
it produces an error when trying to connect to a remote host:
'"Problem creating process: 8"