Jump to content

RunOnceEx Question


dobbelina
 Share

Recommended Posts

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
Link to comment
Share on other sites

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

does also work, try that!

Arjan

Link to comment
Share on other sites

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
Link to comment
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.

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

Link to comment
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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...