Menu

#54 Run a script after disk creation

open
nobody
None
2023-11-07
2023-07-04
No

It's a needed feature as sometimes you need to run things only after the ramdisk is created/available.
Like running anything trying to write to it (or else it fails), unpacking something, etc.

Discussion

  • v77

    v77 - 2023-07-04

    Could be interesting indeed. I'll see what I can do.

     
  • v77

    v77 - 2023-11-02

    I am thinking about the privileges given to the script or executable. By default, the GUI gives administrative privileges, and the service used at system startup gives the privileges of "System" user.
    And at startup, there is no window displayed.

    We also have to consider that at system startup, there may be no logged user.

    Are these conditions acceptable?

     
  • Paul Arakelyan

    Paul Arakelyan - 2023-11-07

    Typically at starup we don't have any user logged in unless they have fast fingers or no password at login. The only thing I'd be worrying about in this situation is the script integrity - that is it shouldn't be editable w/o admin priviledges to "sort of" prevent abuse by malware (and perhaps not runable if it is - like you can't login with ssh key if authorized_keys permissions are wrong). Having some sort of checksum in registry and verification of it before execution will be great as well.
    Not sure how to handle the permissions on files created while the script is run (like chown/chmod for Windows) - sometimes you may need things to user-writable, somentimes not - probably it can be handled in the script itself.

     
  • v77

    v77 - 2023-11-07

    The parameters are stored in HKEY_LOCAL_MACHINE, so in any case administrative privileges are required to select another script.
    So if the script has proper access rights, it should not need to add something else.

    I think I'll try to run it under session 0 ("System" user) even with the GUI, in order to keep exact same privileges at startup. But this means that no window will be displayed.
    Besides, it also means that you will be able to limit the access rights of the script to "System" user for even more security.

     

Log in to post a comment.