Topic Options
#1366 - 09/04/03 09:17 AM Problems calling TGCtrl.CreateProcess from schedule.vbs
Kevin Offline
Junior Member

Registered: 08/14/03
Posts: 15
Is there any reason why TGCtrl.CreateProcess can't be called directly from the schedule.vbs file? When I try this:

If TGCtrl.CheckTime (0, tc, "0,5,10,15 8,11,14,17,20,23 * * 2,3,4,5,6") = true Then TGCtrl.CreateProcess CP_HIDE, "C:\_Programming\Perl\CQDefectExporter\CQDefectExporter.pl"

I get an error that says:

CreateProcessAsUser: is not a valid Win32 application.

Any ideas?

Top
#1367 - 09/04/03 10:45 AM Re: Problems calling TGCtrl.CreateProcess from schedule.vbs
Kevin Offline
Junior Member

Registered: 08/14/03
Posts: 15
As a matter of fact I can't use the CreateProcess.vbs file either. When I try to use the vbs file I get the error:

C:\_Programming\Perl\CQDefectExporter\CQDefectExporter.pl failed to start!

Do I need to pass perl.exe as the first parameter? Using ShellExecute works but there isn't an option to not create a window with ShellExecute that I can find.

Top
#1368 - 09/04/03 09:46 PM Re: Problems calling TGCtrl.CreateProcess from schedule.vbs
Luke Tomasello Administrator Offline
Member

Registered: 09/17/00
Posts: 740
Loc: San Jose, CA., USA
Yeah, the problem is that a .PL file is not an executable and CreateProcess can only create a process from and executable file.

You'll need to use Shell or make perl.exe the process, and the .PL file the argument.
_________________________
Regards,
Luke Tomasello

Top
#1369 - 09/05/03 06:02 AM Re: Problems calling TGCtrl.CreateProcess from schedule.vbs
Kevin Offline
Junior Member

Registered: 08/14/03
Posts: 15
That's what I thought it was but I thought I'd ask. It's working now and I don't have those annoying command windows popping up anymore. Thanks!

Top
#1370 - 09/05/03 08:50 AM Re: Problems calling TGCtrl.CreateProcess from schedule.vbs
Luke Tomasello Administrator Offline
Member

Registered: 09/17/00
Posts: 740
Loc: San Jose, CA., USA
Glad I could help!
_________________________
Regards,
Luke Tomasello

Top


Moderator:  Luke Tomasello