More information would help tbh. Is that script triggered by a scheduled task?
I'd go about trying to debug this as follows:
Devise your script into 2 parts.
- Part 1 : Start the process
- Part 2 : Test if the SendKeys() work
Test each part individually.
My guess is that the user-context you are running your script in, does not have sufficient permissions to start that process. Maybe it has no access to the path?
Chances of you not having permission to send a key, are low i'd say.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…