Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to prevent reboot on an uninstall (.net and msiexec call)

1,760 views
Skip to first unread message

Larry Williams

unread,
Aug 4, 2005, 11:08:19 AM8/4/05
to

I'm writing a program to uninstall a number of applications and I'm calling
MSIEXEC through the shell command.

Occassionally after the program uninstalls an application it will cause a
reboot even though my program is still running.

I have to use Version 2 or the Installer so the Reboot option is not
available.

Is there a registry entry I can set or another way to call MSIEXEC where I
could prevent a reboot?

If I should post somewhere else please let me know.

Luke Surace

unread,
Aug 4, 2005, 7:52:22 PM8/4/05
to
How are you uninstalling theses other products?
You will need to make sure that for each of these you suppress the reboot
uninstall you main programs has finished uninstalling.

If they are windows installer, then have a look at the REBOOT property. You
can use REBOOT=ReallySuppress to stop windows installer reboots happening.

cheers,

Luke

"Larry Williams" <LarryW...@discussions.microsoft.com> wrote in message
news:01A78D9E-1E3C-4A4D...@microsoft.com...

Greg Regan

unread,
Aug 8, 2005, 3:26:56 AM8/8/05
to
Hi

I am doing similar work using SMS Installer to uninstall a number of
applications, PCs are Win XP Pro SP2 with Windows Installer 3.1.

I am using the command

msiexec /x msiname.msi REBOOT=REALLYSUPPRESS /q

Some apps uninstall no problem, others reboot the PC.

When I uninstall manually from Add/Remove programs I get the prompt that
windows needs to be restarted and get the option to do it later.....

How can I mimic this behaviour quietly?

Yours hopefully

Greg


"Luke Surace" <lukesurac...@hotmail.com> wrote in message
news:Od8yQ%23UmFH...@TK2MSFTNGP10.phx.gbl...

Larry Williams

unread,
Aug 8, 2005, 9:00:21 AM8/8/05
to

Thanks. Finally found this within the documentation. I guess this option
has been available since release 1.1.

Thanks again.

Larry Williams

unread,
Aug 8, 2005, 5:03:14 PM8/8/05
to
Tried this but it appear to ignore it see the log details...

MSI (s) (34:A4): Command Line: REBOOT=ReallySuppress REMOVE=ALL
...
...

Property(S): REMOVE = ALL
Property(S): REBOOT = Force
Property(S): ProductState = 5
...
...
MSI (c) (BC:54): Performing reboot from the client process.
MSI (c) (BC:54): MainEngineThread is returning 1641
=== Verbose logging stopped: 2005/08/08 14:43:26 ===

Its like it is totally ignoring it.

Greg Regan

unread,
Aug 9, 2005, 5:57:25 AM8/9/05
to
Yes I am still having the exact same issue.......

I have derived a solution that I don't like it because it takes the control
away from SMS, however, my solution is as follows:

1 From within the script I copy the script file to a temp local folder,
checking to remove any previously copied versions
2 Set the RunOnce key to run the script file on next reboot
3 Set the Autologon registry keys
4 Add a domain user account to the local admin group
5 Perform my uninstalls, if a reboot takes place the PC autologs on and
continues with the uninstallations
6 When the last uninstall has completed I remove items 2, 3 & 4

Whilst I don't like this it does what I need it to do

Hope that helps.....but if anyone has any better ideas please share them
with us

Many thanks

Greg

"Larry Williams" <LarryW...@discussions.microsoft.com> wrote in message

news:1992F8B6-FBB3-4FB7...@microsoft.com...

Larry Williams

unread,
Aug 9, 2005, 8:27:09 AM8/9/05
to

I had done the runonce also.

Do you know is there a way programatically to add an admin id and password?
What is the name of the registry entry for autologon and the id and password
to use? I could accept the id and passwords as parameters to my program.

Which version of msiexec.exe are you using? I'm using 2.x not sure if its
worthwhile trying 3.x

Greg Regan

unread,
Aug 9, 2005, 9:34:08 AM8/9/05
to
Larry

Auto logon info at
http://support.microsoft.com/default.aspx?scid=kb;en-us;315231

This adds specified domain\username to local admin group, refer Win XP Pro
help for further usage of net localgroup or
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_localgroup.mspx,
it's fully documented:

net localgroup administrators <domain>\<user name> /add

We use Windows Installer 3.1 and have the same issue so I don't think you'll
gain much benefit by upgrading.

Good luck

Greg

"Larry Williams" <LarryW...@discussions.microsoft.com> wrote in message

news:E02BCD97-F85C-479A...@microsoft.com...

Larry Williams

unread,
Aug 9, 2005, 10:01:02 AM8/9/05
to
Thanks Greg you've saved me a bunch of time.

I'll just set the autologon option programatically then remove it when its
done.

Greg Regan

unread,
Aug 9, 2005, 12:19:11 PM8/9/05
to
No problem Larry, however, I would like to understand the issue rather than
just come up with a work around.

Enjoy

Greg

"Larry Williams" <LarryW...@discussions.microsoft.com> wrote in message

news:680B2CE1-D623-4B24...@microsoft.com...

Larry Williams

unread,
Aug 9, 2005, 1:10:03 PM8/9/05
to
Let me know if you ever resolve it.
0 new messages