Is it possible to run comserver without requiring elevation.
For example I am able to run code from Python.TestServer (below) but it requires elevation.
Python.TestServer code is at: Consuming Python COM Server from .NET
Is it possible to run com server which doesn't require elevation so that I can run com object without having Administrative password.
for example
import pythoncom
from win32com.server import localserver
class demoObj(object):
_reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER
_reg_clsid_ = "{FA501660-8BB0-42F6-842B-A757FA3098DC}"
_reg_desc_ = "Demo COM server"
_reg_progid_ = "Python.Demo"
_public_methods_ = ['hello']
def hello(self, who):
return "Hellow " + who
localserver.serve('B83DD222-7750-413D-A9AD-01B37021B24B')
I have tried above code but it says pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)
how to make the valid class string for local server?
Example vba :
Sub demodemo()
Set obj = CreateObject("Python.Demo")
Debug.Print obj.Hello("World")
End Sub