Page 1 of 1 1
Topic Options
#26502 - 2002-08-05 03:47 PM Reboot Question
franks Offline
Lurker

Registered: 2002-08-05
Posts: 3
Loc: TR, Quebec
Hello there

I'm pretty new at Kix, started fiddling with it not long ago...

How do I make a script answer a reboot question at the end of an installation of, let's say, a patch for IE. The "You have to reboot your computer bla bla bla. Yes/No"

Tried a couple of things. Can't seem to get it to work

Any help would be greatly appreciated.

Thanks

Top
#26503 - 2002-08-05 03:48 PM Re: Reboot Question
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
easiest one is to use the switches ie provides.
example, /silent normally removes the question.
_________________________
!

download KiXnet

Top
#26504 - 2002-08-05 03:50 PM Re: Reboot Question
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You could use SENDKEYS to send keystrokes. However, when installing patches I would use appropriate command line switches that do a silent install and suppress those questions completely. Then, at the end of the script I would issue a forced reboot fo the computer. I think this is a cleaner approach to installing applications, upgrades, and patches.
_________________________
There are two types of vessels, submarines and targets.

Top
#26505 - 2002-08-05 05:07 PM Re: Reboot Question
franks Offline
Lurker

Registered: 2002-08-05
Posts: 3
Loc: TR, Quebec
Thanks for the quick reply.

Here is a little more information about my problem. The particular patch I'm trying to install with Kix is the Q321232 for IE 5/5.5/6. The executable does provide a /q option for quiet install wich ONLY removes the "Do you want to install..." and "This update has been installed" messages (As I only see the french version of these messages, I'm translating as best I can. Anyway, you get the idea). The /q option does not remove the "You must reboot..." question at the end of the install.

I've tried it with SENDKEYS(). I've also tried to SETFOCUS() on the window of the question but it is not successful (non-zero returned).

From what I understand, control (focus) does not return to my logon script window until I answer the reboot question. Therefore, that makes me wonder if a ShutDown() would work in this case.

Do I make sense at all ?

Thanks again

Top
#26506 - 2002-08-05 05:12 PM Re: Reboot Question
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, you make sense.

then have to ask how you call your setfocus?

do you have loop like:

while setfocus("window name") sleep 1 loop

and right after that:
sendkeys("{enter}")

making a compination of:
while setfocus("window name") sleep 1 loop
sendkeys("{enter}")

this should reboot nicely... well depending of what happens when user just presses enter...
_________________________
!

download KiXnet

Top
#26507 - 2002-08-05 05:20 PM Re: Reboot Question
MartinD Offline
Fresh Scripter

Registered: 2002-05-07
Posts: 9
Loc: Germany
Perhaps you can use the parameter /R:N, what means: Reboot:No ... !

Common Command Line Switches
These switches do not work with all update files. If a switch does not work, the functionality is necessary for that package.
Switch Description
/q Specifies quiet mode, or suppresses prompts, when files are being extracted.
/q:u Specifies user-quiet mode, which presents some dialog boxes to the user.
/q:a Specifies administrator-quiet mode, which does not present any dialog boxes to the user.
/t:path Specifies the target folder for extracting files.
/c Extracts the files without installing them.
/c:path Specifies the path and name of the Setup .inf or .exe file.
/r:n Never restarts the computer after installation.
/r:i Restart if necessary - Automatically restarts the computer if it is necessary to complete installation.
/r:a Always restarts the computer after installation.
/r:s Restarts the computer after installation without prompting the user.
/n:v No version checking - Install the program over any previous version.
NOTE: The use of the /N:V switch is unsupported and may result in an unbootable system. If the installation is unsuccessful, you should consult your support professional to understand why it fails.
For more information, see the Internet Explorer Administration Kit (IEAK) .

[ 05 August 2002, 17:22: Message edited by: MartinD ]

Top
#26508 - 2002-08-05 05:22 PM Re: Reboot Question
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so there was a parameter [Big Grin]
_________________________
!

download KiXnet

Top
#26509 - 2002-08-05 05:48 PM Re: Reboot Question
franks Offline
Lurker

Registered: 2002-08-05
Posts: 3
Loc: TR, Quebec
So it was an optoin/parameter issue, not a Kix issue...

I must say that when typing Q321232 /?, the /R option is not documented as a possible option. All others listed by MartinD are. Didn't know there were "general" option that might or might not work with different update packages.

Since I don't think an immediate reboot is necessary for the update to be installed properly, the /R:N should do the trick. That option does suppress the "You must reboot..." question

Thanks to all for your help... [Smile]

Top
#26510 - 2002-08-05 06:36 PM Re: Reboot Question
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
What those reboots normally do is replacing files that are currently in use. The patch writes the files that are to be overwritten into a special registry key. Then, upon reboot, the operating system replaces those files with the updated ones as specified in the registry beofre the files are loaded.

See the UDF UpdateFileOnReboot - Schedules a file to be replaced on reboot
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.174 seconds in which 0.093 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org