djones Posted May 16, 2008 Posted May 16, 2008 Howdee, Continuing my script learning quest... I would like to add the necessary code to force a restart when a script has completed everything (e.g. installing software etc). All the options I can find at the moment are about 400 lines of code just to do this 'simple' task - an exaggeration I know! Is there a shorter/simple/quicker way to achieve what I want? Thanks, Dave.
mattx Posted May 16, 2008 Posted May 16, 2008 What language are you using ? Using basic batch commands you can use a: shutdown -r Or Autoit shutdown command: Shutdown(6) ;Force a reboot All the options I can find at the moment are about 400 lines of code just to do this 'simple' task Aggree 100% with that - I've always take the approach of keeping scripts as short as possible.
djones Posted May 16, 2008 Author Posted May 16, 2008 What language are you using ? Sorry, should have mentioned that! VB scripts. Dave
mattx Posted May 16, 2008 Posted May 16, 2008 Sorry, should have mentioned that! VB scripts. Arrr, thats why you are finding examples of bloated code.....:-) I never will understand why when looking at VB scripts it takes 10 lines to do something which takes say 2 or 3 in batch or AutoIT...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now