I am attempting to create a password manager that runs on startup and autofills passwords using a certain keybind.
Currently, when running on startup the application creates a window and I researched ways to make the window hidden and I have found a VBScript example that allows for this to happen.
The script I found goes as following:
Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.Run "c:\x\myapp.exe", 0
Set WShell = Nothing
I have added code to detect if my program is being ran out of the Startup directory.
I am working on creating code to execute the VBScript in the Python file yet my function returns quite a meaningless exception I cannot understand.
My python function goes as following:
def run_vbscript(script:str):
shell = win32com.client.Dispatch("WScript.Shell")
shell.Run(script)
The exception I currently am recieving goes as following:
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147024894), None)
Have I made any obvious mistake in my Python function which is preventing the VBScript from executing?