Sign in to follow this  
Followers 0
Marcus

AutoIt Cannot Launch AVIs via Registry in XP?

12 posts in this topic

Hello folks.

This is a real stumper, and an OLD problem.

Here's a quote taken from a query which was posted all the way back in January:

Can someone please help me with the following avi problem?

If I open my script (small window with one avi clip) manually I have no errors. The avi plays without any errors. But I receive an error if I try to let windows open the script using the function:

RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "AUTO", "REG_SZ", "C:\MyScript.exe")

Upon reboot I receive the following error message: "The application or DLL C:\MyAvi.avi is not a valid Windows image. Please check this against your installation diskette."

Thanks in advance.

(Taken from: http://www.autoitscript.com/forum/index.php?showtopic=8103)

10 months and over 100 lookers so far; with no savvy ;)

The same phenomena occurs when a .avi is fired off from an AutoIt script when working without the Explorer.exe shell in XP.

Launch the script again from the Task Manager, and everything is suddenly just fine.

Real showstopper for us out here who like working without a net...

WHAT IS THIS???

Any guesses/workarounds???

Thanks again.


[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

Share this post


Link to post
Share on other sites



Please attach an example avi and script.


Who else would I be?

Share this post


Link to post
Share on other sites

Here 'tis.

#include <GUIConstants.au3>

GUICreate("AVI Test", 263, 65)
$AVI = GUICtrlCreateAvi("Test.avi", -1, -1, -1)
GUISetState(@SW_SHOW)
GUICtrlSetState($AVI, 1)

While 1
    $msg = GUIGetMsg()

    Select
      case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
    EndSelect

WEnd

Run it from the XP registry at startup (as Shell or (reportedly) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run) and it will bail every time...

BTW -- using an "intermediate" script as Shell to launch the above script doesn't make any difference: it still fails.

Thanks --


[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I am going to look into it.

EDIT: Did you compile the script or not?

Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

@this-is-me:

Yup. Compiled and tested.

Segmented from a larger (functional) program...

No dope on XP SP2 as Shell ... reported to be the same under reg RUN.

Thanks for looking.


[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

Share this post


Link to post
Share on other sites

No dope? Do you mean no problems, or do you mean it doesn't run?


Who else would I be?

Share this post


Link to post
Share on other sites

Will not run . . .


[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

Share this post


Link to post
Share on other sites

OK. As soon as I can get to a system that I can reboot I will see what happens.


Who else would I be?

Share this post


Link to post
Share on other sites

Thanks again.


[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

Share this post


Link to post
Share on other sites

A Bug Report has been posted here for this issue:

http://www.autoitscript.com/forum/index.php?showtopic=16632

Confirmed no launch under RUN or Shell with either XP or 9.x . . .

i know when i play an avi, a sperate codec program is run. perhaps executing the script the way you are, it's running before a service or codec is loaded to handle the file? if that's the case you could just add a loop that checks for necessary service or application is running in memory before gui is created...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

I was thinking that something similar was happening, too ;)

However, the "Bug" was in the helpfile:

Parameters

filename -- The filename of the video. Only .avi files are supported.

...

As it turns out, something as simple as a fully qualified path to the AVI file (whether or not it is in the same dir as the .exe) resolves the matter.

The real answer was very simple :P

A couple of regulars at the Bug Reports forum (http://www.autoitscript.com/forum/index.php?showtopic=16632) kindly helped solve the mystery once and for all...

Have a great day!


[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0