Sign in to follow this  
Aerofluxx

How to run repair without reboot?

Recommended Posts

Hello! :)

Are there any switches for the RepairTool? Because I've to rollout the repair to each workstation and the tool is asking for a restart at the end.

Can we have something like a ..\PaintDotNet.exe /repair /norestart /quiet

 

This would be awesome!

Thank you

Mike

Share this post


Link to post
Share on other sites

@Aerofluxx I've split your comment into its own thread. Please don't tack things onto existing threads like that unless it's actually the same conversation :)

 

In any case, all PdnRepair does is to execute MsiReinstallProductW(productCode, REINSTALLMODE_FILEREPLACE). The product code is stored at HKLM\Software\paint.net\ProductCode. When this is run, it returns an error code saying that a reboot is required, which is then relayed to you. PdnRepair doesn't do anything directly to require a reboot, but MSI says it's necessary and it's pretty obviously right -- otherwise the repair wouldn't have been necessary in the first place.

 

I'd be surprised if MsiReinstallProductW isn't available through some other MSI tool, and therefore automatable on its own. You might be able to avoid the reboot by killing PaintDotNet.exe and Explorer.exe, but I can't say for sure. You'd have to kill any process that might have loaded the Paint.NET shell extension (e.g. any app that uses an Open or Save dialog) and I'm not sure how you'd go about doing that.

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, Rick Brewster said:

I'd be surprised if MsiReinstallProductW isn't available through some other MSI tool, and therefore automatable on its own.

 

You can use msiexec.

The /fa switch is equivalent to calling MsiReinstallProductW with REINSTALLMODE_FILEREPLACE.

  • Like 2

Share this post


Link to post
Share on other sites

Pushing an uninstall and then install could also help. Someone else reported that it worked. (It's exactly what the Setup/Update UI wizard thing always does anyway)

  • Like 2

Share this post


Link to post
Share on other sites
15 hours ago, BoltBait said:

If a restart is required, then a restart really is required—let it restart. 
 

 

 

Thank you for the "hint" 😉 Of course I'll let him reboot, but to tell my deployment tool that the "repair is finished" the Repair Tool HAS to exit with at least any exit code. After this I'll trigger the restart for myself.

 

@Rick Brewster whoops. Sorry for the old thread re-use! And thank you so much for the info with the .msi repair. I can manage it easy with

MsiExec.exe /FA {2559A8FC-B856-44AB-813B-253D560F4DE8} /norestart /qn to fix this. :) Thanks!

Share this post


Link to post
Share on other sites
10 hours ago, Aerofluxx said:

... the "repair is finished" the Repair Tool HAS to exit with at least any exit code. After this I'll trigger the restart for myself.

 

Woops! Good catch. This is a suuuuuuuper old utility and it doesn't do the right thing here. I'll fix it shortly (well, it'll be released with 4.2.10). Although hopefully by then PdnRepair won't be necessary.

Share this post


Link to post
Share on other sites

I've consolidated the discussion here: https://forums.getpaint.net/topic/115940-solved-msi-deployment-of-429-missing-dlls-prompting-repair-and-reboot-msi-adgpo-createmsi-consolidated-thread/

 

 

tl;dr for the reboot issue: A reboot is not actually required in this case. The reason you're prompted to reboot is that the repair program (PdnRepair.exe) is in-use (because it's what you're running) and has to be repaired/replaced as well. Should be an easy fix in the next update, but I should also have a fix for the root cause too (the DLL stuff).

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this