task scheduler shows the console!!!

Dear all,
I created an exe file using pyinstaller with --noconsole argument and it works fine (No console is shown on click)...
I added it to the windows  task scheduler and got it working onlogon (tried instantly and with a minute delay) but the problem is the task shows the exe console (a BLANK command-prompt-like black screen with the exe location on top) for a couple of seconds and disappears :-( I tried to change the runas user to system but the exe fails as it needs to run as the user...
Can anyone help me with this problem...
Shahab GhosniNetwork Infrastructure EngineerAsked:
Who is Participating?
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
You can bootstrap with a VBS
Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.Run "C:\Temp\DummyApp.exe /Argument1 /Argument2", 0
Set WShell = Nothing

Open in new window

0
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
I tried to change the runas user to system but the exe fails as it needs to run as the user...
Can anyone help me with this problem...
Change it to run whether a user is logged on or not and set account to the user
1
 
Shahab GhosniNetwork Infrastructure EngineerAuthor Commented:
That is one of the things I'm limited on as it needs the user's password and this will be installed on over 500 computers and I can only run it as the admin...
Plus prompting the user's passwords is not desirable...
0
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
You can hide it completely with cmdow. First deploy cmdow with a GPO file preference
https://ritchielawrence.github.io/cmdow/
1
 
Shahab GhosniNetwork Infrastructure EngineerAuthor Commented:
There are 2 problems:
1- I want to avoid deploying any extra stuff which I can't be sure of the source code on the PCs
2- We have NOD32 (Based on their reports NOD32 and many AVs detect it as trojan) on the workstations and creating exceptions for this file requires going through a process which this file might not pass.
I know it is a mind numbing problem but I have to follow our companies needs and rules.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.