Sign in to follow this  
Followers 0
dobbelina

RunOnceEx Question

8 posts in this topic

#1 ·  Posted (edited)

Hi all wise people :)

I have a simple one,

If I make a compiled script exe, the splashscreen doesn't show if run it from this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

Ex:

SplashTextOn("","Test Message" & @CRLF & "Please Wait..","300","100","-1","-1",33,"Courier New","20","700")
Sleep (1000)

But it does if I add it here:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

I assume this is becasuse the desktop hasn't loaded yet in "RunOnceEx", Is there a way

to fix this so splashscreens can be seen here as well ?

I notice that installer windows can be seen, but not autoit splashy ones....

Edited by dobbelina

Share this post


Link to post
Share on other sites



HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

does also work, try that!

Arjan

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Yes, thanks i'm aware of that.

Problem is the script i'm compiling has to be run from RunOnceEx you see.

It's a script that automatically formats the D,E and F drives (If they exist).

It's going to be an option in WPI (Windows Post Install Wizard).

It works fine and all except for the splashscreen.

Is there perhaps another way for me to get some info up other than

splashscreen ?

Something like this perhaps(Not tested):

$hwnd = GUICreate("Animate Window", 300, 200)
GUICtrlCreateLabel("Testscreen", 50, 50, 200, 50)
GUICtrlSetFont( -1, 16, 800)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00080000)

#define AW_BLEND                    0x00080000
Edited by dobbelina

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Yeah, it won't work because the operating system has not yet fully loaded. In order for Autoit to call the correct API functions, dlls, etc, the operating system has to be fully active and operational. You can probably call system critical dlls like kernel32.dll and others like that. Try to see if you can find any functions in those system critical dlls that will allow you to create some sort of info window or splash screen.

Also, try Msgbox() on autoit. I bet the msgbox function would work even if the operating system is not fully on since that is a simple kernel32.dll call.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

Aha, ok thanks for the tip.

Yes I will try that.

I wonder what dll's are used for installer windows such as MSI or

even Winrar sfx's, as those can clearly be seen..?

Share this post


Link to post
Share on other sites

Yeah, it won't work because the operating system has not yet fully loaded. In order for Autoit to call the correct API functions, dlls, etc, the operating system has to be fully active and operational. You can probably call system critical dlls like kernel32.dll and others like that. Try to see if you can find any functions in those system critical dlls that will allow you to create some sort of info window or splash screen.

Also, try Msgbox() on autoit. I bet the msgbox function would work even if the operating system is not fully on since that is a simple kernel32.dll call.

From experience, that is all BS. A lot of AutoIt functionality is available during Windows setup and RunOnceEx. WMI is not for sure. IIRC, I have used SplashTestOn() during RunOnceEx without issue for 1st logon.

Share this post


Link to post
Share on other sites

I also use a gui before the desktop loads to autorun scanners and such and it all runs from runonceex.

Everything should work just fine. Should that is there must be something else going on with your script.

Share this post


Link to post
Share on other sites

Hmm, I wonder whazz going on here ?

I'll investigate, thanks for your help all.

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