Valnurat

RunOnce

6 posts in this topic

I only have this in the msgbox.exe

MsgBox(0,"1","Test")

I have added a key to the RunOnce registry and it works.

RegWrite("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "SCCM", "REG_SZ", "%logonserver%\netlogon\msgbox.Exe")

But when I reboot and I login to the computer I expect a msgbox to apear, but it does not.

Why can that be?


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites



Did you compile the executable to require admin credentials?

 

Share this post


Link to post
Share on other sites

Programs in RunOnce are run before the user has logged in.  I wrote a small script to delete every instance of index.dat on my C: drive.  I set it to RunOnce.  It could delete all the index.dat files because the user had not logged in yet(even if there is no explict login screen because the user login is automatic with no password.)  What happened in my case is I could see the system wait for all the files to be deleted before I got the desktop.

I guess it is similar to running a program as a service in that there should be no user interface.  RunOnce is most used by installers that clean up no longer needed files during the reboot after an install.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

5 hours ago, MattHiggs said:

Did you compile the executable to require admin credentials?

 

#include <MsgBoxConstants.au3>

#RequireAdmin

If IsAdmin() Then MsgBox($MB_SYSTEMMODAL, "", "The script is running with admin rights.")

I tried this, but I get no messagebox.

Edited by Valnurat

Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites
5 hours ago, MilesAhead said:

Programs in RunOnce are run before the user has logged in.  I wrote a small script to delete every instance of index.dat on my C: drive.  I set it to RunOnce.  It could delete all the index.dat files because the user had not logged in yet(even if there is no explict login screen because the user login is automatic with no password.)  What happened in my case is I could see the system wait for all the files to be deleted before I got the desktop.

I guess it is similar to running a program as a service in that there should be no user interface.  RunOnce is most used by installers that clean up no longer needed files during the reboot after an install.

 

How is it possible for me to continue a installation after a reboot?


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

I just learned this by searching now.  There is a program in system32 called runonce.exe.  Evidently it is a wrapper for the RunOnce key that kludges around the login issue.  You might ask on Inno Setup forum as that install maker is pretty open and the author may be willing to discus the nuances of the install spanning booting.

 

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

  • Similar Content

    • messilm10
      By messilm10
      how do i get the crash report of any application and any running script?????
    • ronaldo97
      By ronaldo97
      Hello How can I make the GUI is compatible with all screen sizes ??  
      #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 623, 445, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZE)) GUISetBkColor(0x1E1E1E) $Label1 = GUICtrlCreateLabel("Welcome Back !!", 424, 64, 161, 29) GUICtrlSetFont(-1, 16, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0x800000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd How do I make Gui interface compatible with all screen sizes ?? 800*600
      1024*768
      1280*1024
    • messilm10
      By messilm10
      respected sir,
      how could I calculate the time difference using auto IT function ?
    • Xandy
      By Xandy
      Waxworks Code Wheel.
      Written in AutoIt with SDL.
      Source
    • mazz3d
      By mazz3d
      hello  everyone,
      I'm new with AutoIT and just looking for a way to open Firefox with random window size
      i have tried too many different samples from the web, some how it works but i can't make it works with Firefox 
      MozRpel and ff.au3 installed 
      right now i can open Firefox with this code, but i still can't control the window of Firefox
      ; open firefox #include <ff.au3> _FFStart() ; open firefox with random size