/build/static/layout/Breadcrumb_cap_w.png

Option "/norestart" doesn't work

Hi everybody,

I want to launch the follow command:

msiexec /fu {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} /norestart

... to reinstall all per user based registry settings.

But the Option "/norestart" doesn't work [X(]. In the .msi Package the option "Reboot" ist set to "force", but the "/norestart" must overwrite this setting. Or?

Thanks for help
privat

0 Comments   [ + ] Show comments

Answers (18)

Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
2
Are you using Windows Installer 3.0?

Run msiexec.exe to find out.
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
2
I felt bad about not spotting your problem sooner (and I had a few spare minutes) - so I wrote you a script.

Const sPRODCODE = "{17DAB648-906B-4C29-B296-6FD780708377}"
Const sREBOOTMODE = "ReallySuppress"

Const msiViewModifyUpdate = 2
Const msiOpenDatabaseModeDirect = 2

Set oInst = CreateObject("WindowsInstaller.Installer")

sDBPath = oInst.ProductInfo(sPRODCODE, "LocalPackage")

Set oDB = oInst.OpenDataBase(sDBPath, msiOpenDatabaseModeDirect)

sQuery = "SELECT `Value` FROM `Property` WHERE `Property` = 'REBOOT'"

Set oView = oDB.OpenView(sQuery)

oView.Execute

Set oRecord = oView.Fetch

oRecord.StringData(1) = sREBOOTMODE

oView.Modify msiViewModifyUpdate, oRecord

oView.Close

oDB.Commit

Set oInst = Nothing

Obviously, you need to change the sPRODCODE constant to reflect the ProductCode of your package.

This should change the value of the REBOOT property within the property table of the locally cached MSI. Unfortunately, it the script must be executed by a user who has at least "change" permissions to the local MSI (a local admin). You could use your deployment tool (SMS or other).

Once the script has been executed, your local MSI (in "C:\Windows\Installer") should have been changed, and you should find that running your "/fu" command should work (don't use the "v" flag).
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
2
By the way, Bob has just switched "ratings" on for this website - so if you feel my contribution to your problem was useful, please feel free to rate it!![:D]
Posted by: sini 19 years ago
Orange Senior Belt
1
Try to set this public property at the commandline msiexec /i <MSI or Productcode> REBOOT="ReallySuppress"
Posted by: private 19 years ago
Senior Yellow Belt
0
Thanks for the answers.

-> WiseUser
Yes, Windows Installer 3.0

-> sini
I try it on Monday (I am curently not at work). THX!

The background:

I have create a little .vbs that reinstall all user based settings for all .msi package are install at current machine. All works fine, except the "none-restart" [8|]

Greetings from Germany.
Posted by: private 19 years ago
Senior Yellow Belt
0
no, it doesn't work :-(
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
Do you know which particular package is rebooting your PCs? Might the restart be caused by a custom action?
Posted by: private 19 years ago
Senior Yellow Belt
0
I have repackaged Adobe Photoshop 6.0.1 and the PROPERTY "REBOOT" is set to "FORCE".
I have found this Custom Action:

If Not Installed AND WISEDELAYEDREBOOT then
ScheduleReboot
End

Is it true that I only can set a PROPERTY with msiexec when I install or deinstall an Application?

Thanks
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
This condition can be found in all Wise MSI files.

I don't understand your question - when else would you want to set a property value?
Posted by: private 19 years ago
Senior Yellow Belt
0
when I use: msiexec /fu - repair user settings
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
Good point private!!!

The "/f" option ignores any command line properties!

Doh!
Posted by: private 19 years ago
Senior Yellow Belt
0
OHHH YES, thats is !!! :)

After I execute your nice script I can do this:

On Error Resume Next
Dim fso, Datei,line, command,tmp
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Product",,48)
Set WSHShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set Datei = fso.CreateTextFile("c:\testfile.txt", True)
For Each objItem in colItems
'Wscript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
If (objItem.IdentifyingNumber="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" or objItem.IdentifyingNumber="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" or objItem.IdentifyingNumber="{CB2F7EDD-9D1F-43C1-90FC-4F52EAE172A1}" or objItem.IdentifyingNumber="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") Then
Else
Datei.WriteLine(objItem.IdentifyingNumber)
Set oExec = WshShell.Exec("msiexec /fuq "& objItem.IdentifyingNumber)
Do While oExec.Status = 0
WScript.Sleep 100
Loop
End If
Next
Datei.Close

Yes, your contribution was very useful!!! Thanks!
private greetings from germany
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
Thanks for my first rating private!

I'll take a look at that script of yours later when I have time - looks interesting!

I'm not sure "q" is an option for "/f" though?

Thanks again.
Posted by: private 19 years ago
Senior Yellow Belt
0
Hey,

when I execute your vbs with a valid GUID I get the follow run time error error:

Object necessarily: 'oRecord' 21,1

Any Idea? Thanks
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
I know exactly what that error is... The MSI in question has no "REBOOT" property set so the field cannot be found in the property table.

The script will work on your "Adobe Photoshop 6.0.1" package because it has been set to "Force".

The script could be modified to create the "REBOOT" property, but this shouldn't be necessary for your purposes. It is unlikely that a "u" repair will need to replace in-use files.
Posted by: private 19 years ago
Senior Yellow Belt
0
ohh, thats right. [:)] Thanks 4 your great help
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
No problem!

I said I'd have a look at your script - I wouldn't have used WMI myself but I suppose that's just personal choice.

Here's what mine would have looked like (I haven't included a log file in mine):

Const sPRODCODE = "{350C97B0-3D7C-4EE8-BAA9-00BCB3D54227}"
Const msiUILevelNone = 2
Const msiReinstallModeUserData = 256

Set oInst = CreateObject("WindowsInstaller.Installer")

'oInst.UILevel = msiUILevelNone

Set oProdLst = oInst.Products

For Each sProdID in oProdLst

If sProdID = sPRODCODE Then oInst.ReinstallProduct sProdID, msiReinstallModeUserData

Next

Set oProdLst = Nothing
Set oInst = Nothing

I've remarked out the line that makes the repair "silent" otherwise you can't see anything happening!
Posted by: private 19 years ago
Senior Yellow Belt
0
Do you know how I can check if the property REBOOT exists? I have tryed

sQuery = "SELECT `Value` FROM `Property` WHERE `Property` = 'REBOOT' AND Value= 'Force' AND EXISTS(SELECT `Value` FROM `Property` WHERE `Property` = 'REBOOT')"
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ