Jump to content
Sign in to follow this  
cotax

Reboot after install then resume script

Recommended Posts

cotax

Hi.

Is it possible to reboot afer installing alcohol120%, and after reboot that the script will resume the installation?

I searched the forum, found some french input but dont understand it, so i can only read the script.

It has something to do with register, but i dont have a clue how that works.

Is there anyone here who can help me?

I want to know how to resume installation after a reboot.

Thanks alot

Edited by cotax

Share this post


Link to post
Share on other sites
blckpythn

I don't know of a registry method, buy you could have your script install something into the startup folder before it reboots then have the script in the startup folder delete itself after.

Share this post


Link to post
Share on other sites
zorphnog

You can add an entry to the HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce key before the reboot. It needs to be a REG_SZ the name doesn't matter, just give it some random name. The data should contain the path to your script. For example:

RegWrite("HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce", "after_alcohol", "REG_SZ", @ScriptFullPath)

Share this post


Link to post
Share on other sites
MHz

This is an old script I made for Daemon Tools which maybe similar to Alcohol as they both use the SPTD driver which needs to be installed 1st, then reboots and then the main application installs. If similar, then you may need to use the "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" key to handle the main application install as the Alcohol120 registry entry maybe in the same key.

So you could call a function like this to add the registry entry to restart your script at the correct time when the desktop loads.

Func _RunOnce()
    ; Add 2nd part to installation.
    Local $key = 'HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce'
    RegWrite($key, '_Alcohol120', 'Reg_sz', '"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptFullPath & '" /postrun')
EndFunc

Set the script to check for the /postrun switch on restart to handle the install as needed.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.