I have a problem that I can't figure out. I have tested in Windows 2003 and Windows Vista. I have a component that requires a reboot when it is selected. When this component is selected the 'Restart now' checkbox appears on the finish panel and it is checked. If you click finish, the machine never reboots.
My code is below. I have stepped the code and SILENT equals FALSE, REBOOTCOMPUTER equals TRUE, and SUCCESS equals REBOOT. It hits the Reboot computer command and seems to go right past it. No reboot and no errors logged.
Is anyone else experiencing this? Anyone have a solution? It executes the command so I don't know why I don't get at minimum some kind of an error in the event log or something.
Thanks!
-----
Comment: End of Installation
Hide Dialog
Display Dialog: finish, wait for dialog to return (modal)
if Variable SILENT Equals FALSE
if Variable REBOOTCOMPUTER Equals TRUE
if Variable SUCCESS Equals REBOOT
Reboot Computer
end
end
if Variable RUNAPP Equals TRUE
if Variable REMOVE Equals FALSE
if Variable SUCCESS Equals COMPLETE
Comment: TO-DO: Insert command that starts your application here
end
end
end
end
'Restart now' not working
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Hello Michael,
The reboot computer operation completes successfully in a test script which contains just the single command.
Which still leaves me with the same question, what could possibly be keeping it from functioning in my normal setup script? I am using the default code provided by InstallAware for my particular interface panels. I can see that it passes through the variable tests and executes the reboot command, it just doesn't reboot.
I'm completely stuck because I have no error or other information to go off of. Any ideas? Would a command line log of the installer perhaps provide additional information?
Thanks,
Jeff
The reboot computer operation completes successfully in a test script which contains just the single command.
Which still leaves me with the same question, what could possibly be keeping it from functioning in my normal setup script? I am using the default code provided by InstallAware for my particular interface panels. I can see that it passes through the variable tests and executes the reboot command, it just doesn't reboot.
I'm completely stuck because I have no error or other information to go off of. Any ideas? Would a command line log of the installer perhaps provide additional information?
Thanks,
Jeff
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I really don't know. I'd eliminate parts of the script progressively until it starts working again so you know exactly what part of your code is preventing the reboot. Then you can send us that exact fragment once you've narrowed it down and we'll take a look under the microscope.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Jeff,
If you want to make sure the code is genuinely being reached at runtime maybe display a MessageBox just before the reboot statement? What I'm getting at is you'll eliminate any effect debugging might have. I'm sure it makes no difference.
I recall a developer who being new to programming was given the task to change a small application. He observed that when he debugged it it seemed to do something different to when he ran it normally. As he said to me "it works when I run it slowly."
If you get my meaning?
If you want to make sure the code is genuinely being reached at runtime maybe display a MessageBox just before the reboot statement? What I'm getting at is you'll eliminate any effect debugging might have. I'm sure it makes no difference.
I recall a developer who being new to programming was given the task to change a small application. He observed that when he debugged it it seemed to do something different to when he ran it normally. As he said to me "it works when I run it slowly."
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
Check your computer's system event log. You may see an entry claiming that the attempt to reboot the computer failed. If so, you know that IA is trying to perform the reboot, but Windows is blocking it for some reason. Perhaps you have a service component that is not responding to the stop request issued by the reboot attempt, or your application is running in some zombied state.
using InstallAware 9 R2 (Build Moya.sp3.070910)
Hey everyone,
Thanks for the feedback. I will spend some time trying to figure out what part of the script is cauing the problem. This installer is pretty basic so I don't know what could possibly be causing the line of code to not be executed. I will insert a dialog box before the reboot to see what happens. Generally, triggering a reboot is an easy process.
I have checked in the event log. There is absolutely no indication of a reboot or an error in attempting to reboot. It looks like the command is never exectued but when stepping the code, the line is executed. Very baffling.
Will keep you posted.
Thanks!
Thanks for the feedback. I will spend some time trying to figure out what part of the script is cauing the problem. This installer is pretty basic so I don't know what could possibly be causing the line of code to not be executed. I will insert a dialog box before the reboot to see what happens. Generally, triggering a reboot is an easy process.
I have checked in the event log. There is absolutely no indication of a reboot or an error in attempting to reboot. It looks like the command is never exectued but when stepping the code, the line is executed. Very baffling.
Will keep you posted.
Thanks!
Hey everyone,
OK, I did a bunch of testing yesterday. When working through the wizard, when it lands on the last panel "Reboot Now" is checked. If I click "Finish" no reboot happens. If I run the setup, uncheck "Reboot Now" and recheck it again, the reboot happens.
In both cases, if I step the code it looks like the reboot command is executed.
Ideas?
Thanks,
Jeff
OK, I did a bunch of testing yesterday. When working through the wizard, when it lands on the last panel "Reboot Now" is checked. If I click "Finish" no reboot happens. If I run the setup, uncheck "Reboot Now" and recheck it again, the reboot happens.
In both cases, if I step the code it looks like the reboot command is executed.
Ideas?
Thanks,
Jeff

