Scheduling reboot file operations at runtime - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Scheduling reboot file operations at runtime

Hello everyone.

We are trying to perform some necessary file/directory operations (in our installation folder) in a custom action script, but it can't overcome locked files/folders.

So we would like to schedule the file/directory operations at runtime of the installer to be performed at reboot.

How can we do this with JScript custom actions?



With best regards

Clemens Anhuth
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Scheduling reboot file operations at runtime

Hi Clemens,

I'm afraid that this is not supported by Windows Installer (the reboot actions are determined automatically).

However, you can try this approach:
- create an EXE which calls your script
- use the Registry page to create a registry value in this key:

Code: Select all

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
- the data of the registry value you created should be set to the path of the EXE which calls the script
- the EXE should remove this registry entry after the script is executed

This way the EXE which calls the script will run when the user logs on after the installation (after the reboot is performed). The script does what its supposed to and the EXE removes the registry entry so it will not be launched the next time the user logs on.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: Scheduling reboot file operations at runtime

Hello Cosmin,

thank you for your answer.

I found the following, where someone claims to have modified the MoveFile table at runtime of the installer:

http://osdir.com/ml/windows.devel.wix.u ... 00485.html



With best regards

Clemens Anhuth

Return to “Common Problems”