Sign in to follow this  
Followers 0
rainmanal

Run Script after reboot

4 posts in this topic

I am writing a script to remove software but i need to reboot the machine in order to finish uninstalling, is there a command to execute a script after reboot to finsh uninstalling?

Share this post


Link to post
Share on other sites



There is a nice registry key called RunOnce :D

Here's an example of writing to it:

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce","Script Name","REG_SZ",@ScriptFullPath)

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

I don't know about any command to do it, but you could use FileCreateShortcut to make a link to the script, and place it in the @StartupCommonDir, then delete it when the script finishes.

Share this post


Link to post
Share on other sites

Thanks, I'll give it a try!

There is a nice registry key called RunOnce :D

Here's an example of writing to it:

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce","Script Name","REG_SZ",@ScriptFullPath)

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  
Followers 0