What if „Install” command is missing from the context menu in Windows 10 ?

After fresh installation of windows @10 rev 1903 I wanted to personalize my desktop , as I always do. Few things done , my favourite mouse cursor left.

Normally any inf file can be installed by opening mouse context menu , and selecting install command on file . But this time I was surprised . Install option was missing.

No matter what I tried , I was not able to bring my favourite cursor back! But, wait… I will try to install it with command line .

rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 .\Install_.inf

Worked .

Someone could ask what this number 128 in command means? So small explanation copied from MS page:

You should use a combination of the following values for mode. You must include 128 to set the default path of the installation to the location of the INF, otherwise a system-provided INF is assumed. Add values to specify rebooting. Note that only the values 128 or 132 are recommended, other values may cause the computer to reboot unnecessarily or not reboot when it required.

ValueDescription
0System provided INF.
128Set the default path of the installation to the location of the INF. This is the typical setting.
+0Never reboot the computer.
+1Reboot the computer in all cases.
+2Always ask the users if they want to reboot.
+3Reboot the computer if necessary without asking user for permission.
+4If a reboot of the computer is necessary, ask the user for permission before rebooting.

https://docs.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-installhinfsectiona

Edit:

I found source of my problem . File association for inf file was broken by Notepad++ configuration. Of course problem can be temporary fixed by using command line for future installations , or we can fix this permanently by restoring file association in registry. Copy text to txt file ,sa save as .reg and open it in explorer.


Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT.inf]

[HKEY_CLASSES_ROOT.inf]
@=”inffile”

[HKEY_CLASSES_ROOT.inf\PersistentHandler]
@=”{5e941d80-bf96-11cd-b579-08002b30bfeb}”

[-HKEY_CLASSES_ROOT\inffile]

[HKEY_CLASSES_ROOT\inffile]
@=”Setup Information”
„FriendlyTypeName”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
00,6f,00,6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,\
32,00,5c,00,73,00,65,00,74,00,75,00,70,00,61,00,70,00,69,00,2e,00,64,00,6c,\
00,6c,00,2c,00,2d,00,32,00,30,00,30,00,30,00,00,00

[HKEY_CLASSES_ROOT\inffile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,6d,00,\
61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,36,\
00,39,00,00,00

[HKEY_CLASSES_ROOT\inffile\shell\Install]
@=”&Install”
„MUIVerb”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
6f,00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
00,73,00,65,00,74,00,75,00,70,00,61,00,70,00,69,00,2e,00,64,00,6c,00,6c,00,\
2c,00,2d,00,32,00,30,00,30,00,32,00,00,00

[HKEY_CLASSES_ROOT\inffile\shell\Install\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,49,00,6e,00,\
66,00,44,00,65,00,66,00,61,00,75,00,6c,00,74,00,49,00,6e,00,73,00,74,00,61,\
00,6c,00,6c,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,00,22,00,00,00

[HKEY_CLASSES_ROOT\inffile\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
00

[HKEY_CLASSES_ROOT\inffile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00

[-HKEY_CLASSES_ROOT\SystemFileAssociations.inf]

[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts.inf]

[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts.inf]

And say hallo again to Install option in context menu.

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *

Sorry, this area is restricted.

This site uses Akismet to reduce spam. Learn how your comment data is processed.