Access parameter passed through custom protocol through .reg file - windows

I am currently trying to make enable making calls from our intranet software directly through dialer.exe.
I have prepared this registry script and added it to the local registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\sip]
#="URL:Telephone Dialer"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\sip\DefaultIcon]
#="\"C:\\Windows\\System32\\dialer.exe\",1"
[HKEY_CLASSES_ROOT\sip\shell]
"URL Protocol"=""
[HKEY_CLASSES_ROOT\sip\shell\open]
[HKEY_CLASSES_ROOT\sip\shell\open\command]
#="\"C:\\Windows\\System32\\dialer.exe\" \"%1\""
When a link with the following protocoll: sip:123456 gets called the registry realizes that its connected with the dialer exe. Unfortunately I can't access the passed throuhg value which would be necessary to have in the dialer.exe input field in order to just press "Dial" and call the number.
What should I do different here?

I found a solution.
The following steps need to be done:
Step1: Download the Beta software from here
Step2: Extract the Dial.exe into ..\Program Files\Dial\
Step3: Create a new registry entry as following:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\sip]
"EditFlags"=hex:02,00,00,00
#="URL:Sip Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\sip\shell]
[HKEY_CLASSES_ROOT\sip\shell\open]
[HKEY_CLASSES_ROOT\sip\shell\open\command]
#="\"C:\\Program Files\\Dial\\Dial.exe\" \"%1\""
Step4: Save it as .reg and execute the file.
Step5: Check if \Windows\System32\ contains the following file: msvcr100.dll
IF it doesn't, paste in the file from the zip folder.
If it does then it's done.
Now you only need to take care, that the number you want to dial starts with sip: Example: Dial

Related

Adding command to context menu in Windows fails

I have (exported from my Registry):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.md]
#="markdownfile"
with a default value "markdownfile". I also have
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\markdownfile]
[HKEY_CLASSES_ROOT\markdownfile\shell]
[HKEY_CLASSES_ROOT\markdownfile\shell\MarkAPL ==> HTML5]
[HKEY_CLASSES_ROOT\markdownfile\shell\MarkAPL ==> HTML5\command]
#="\"C:\\Programs\\..." \"%1\""
Yet "MarkAPL ==> HTML" does not show; instead it shows the filename in bold.
If I create ".aa" with a default value "markdownfile" then the command shows on any file with the extension ".aa". Clearly something else is having an impact here, but what?!
It appears that when a user chooses "Start files with this extension with that application" from the Windows Explorer then sometimes - but by no means always - that takes precedence over the mechanism I tried to use.
After deleting the offending Registry entries it worked:
HKEY_USERS...\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.md\OpenWithList...

File Replace during upgrade

We use Inno Setup(version 5.4.2) as the packaging tool to generate our installer. While upgrading our software from older version to current version,
we try to overwrite existing binaries/drivers. This is often leading to issues as some monitoring software like 'HP ArcSight Logger/Connector', 'SplunkUniversalForwarder' etc. are holding file handles on our binaries and casuing overwrite to fail. Our installer shows beolow popup message on encountering this issue each time.
"C:\Windows\System32\drivers\xxx.sys
An error occurred while trying to replace the existing file:
DeleteFile failed; code 5.
Access is denied.
Click Retry to try again, Ignore to skip this file(not recommended), or Abort to cancel installation"
Interestingly, even after above getting above pop-up, we were able to rename xxx.sys to xxx.sys.old manully. We used to suggest cusotmers to rename
xxx.sys to xxx.sys.old and 'Retry' the installation. After renaming, upgrade used to complete without any issues.
Questions
1) Is it possible to rename xxx.sys through program always, when we hit this issue.
2) Any process to reproduce the DeleteFile failed; code 5 issue?
Using the installer you can rename the existing file and install the new file using the correct file name with help from the windows registry.Remember to ask the user to reboot their computer to complete the install.Another option would be to either use the installer to rename the file and again using the window's registry to delete the unneeded file.
Window's registry allows you to delete or rename files on reboot as part of an install.
Reference to use of PendingFileRenameOperations:
http://support.microsoft.com/kb/181345
Example to rename from microsoft support:
The syntax used is (without quotes):
"\??\source file !\??\target file"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Value name: PendingFileRenameOperations Data type : REG_MULTI_SZ
Value data: \??\c:\temp\win32k.sys !\??\c:\winnt\system32\win32k.s
The same command can be used to delete a file as well although requires the use of nulls.
http://www.pcreview.co.uk/forums/pendingfilerenameoperations-delete-file-t1715654.html
Same example used to delete a file:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
Value name: PendingFileRenameOperations Data type : REG_MULTI_SZ
Value data: \??\c:\temp\win32k.sys\0\0\0
I hope this helps you!

Windows 8 driver install and catalog/signature validation

I can't get windows 8 (release preview) to accept either the inf2cat or makecat approach described as solutions to the question at
What changed in the driver signature requirements for Windows 8?
unless I disable validation.
I am not signing these with any certificates at this point, just trying to get past the errors preventing the drivers from installing at all.
Windows 8 gives me a very nondescript error:
"A problem was encountered while attempting to add the driver to the store."
Looking in the event logs, there is nothing of use; only an informational entry from "Windows Error Reporting" indicating a PnPdriverimporterror.
When i use my original files with the cab files that don't match the inf, I get the error everyone else is listing:
The hash for the file is not present in the specified catalog file.
I have one .inf file that i need to generate a .cat for.
Perhaps I am doing something wrong. Ideas??
INF2CAT Approach
c:\win_xp_vista32_64>inf2cat /driver:"." /os:XP_X86,XP_x64,Vista_X86,Vista_x64,7_X86,7_X64,8_X86,8_X64
.......................
Signability test complete.
Errors:
None
Warnings:
22.9.10: usbser.sys in [drivercopyfiles.nt] is missing from [SourceDisksFiles] s
ection in \mchpcdc.inf; ok if file source is provided via LayoutFile in [Version
].
22.9.10: %driverfilename%.sys in [drivercopyfiles.ntamd64] is missing from [Sour
ceDisksFiles] section in \mchpcdc.inf; ok if file source is provided via LayoutF
ile in [Version].
Catalog generation complete.
c:\win_xp_vista32_64\mchpcdc.cat
MAKECAT approach
--- start of catalog.cdf file---
[CatalogHeader]
Name=mchpcdc.cat
ResultDir=.\
[CatalogFiles]
<hash>mchpcdc=.\mchpcdc.inf
---end of .cdf file ---
c:\win_xp_vista32_64>makecat catalog.cdf
These same files, w/ the cat from either approach install just fine in Windows 7.
I think this problem is to do with "windows driver signing enforcement". You can resolve this by disabling this option. Go through with below link:
http://tivadj-tech.blogspot.in/2012/09/certificate-check-error-when-installing.html
I just tested this on Windows 10 and 8 PRO now, to get this right, follow these steps:
1) From your Start menu, locate your DDK's "x64 Checked Build Environment" i.e. the custom DOS build screen. Right-click, run-as administrator...
2) Compile your source with the Build tools etc.
3) Go into your compiled code, and then create your test-certificate (you don't need to purchase one just yet, use your self-signed one created with the line below):
makecert -r -pe -ss PrivateCertStore -n CN=newhex.com(Test) NewhexTest.cer
The above means your certificate is called "newhex.com(Test)" and the generated file is "NewhexTest.cer"
4) Create / Edit your .CDF file which contains items about what your CAT file's contents.
5) Create your CAT file by executing:
makecat -v MyCDF.CDF
This should generate an un-signed CAT file that includes all files specified by your CDF.
6) Sign your CAT file as follows:
Signtool sign /v /s PrivateCertStore /n newhex.com(test) /t http://timestamp.verisign.com/scripts/timestamp.dll MyDriverWhatever.cat
This should result in a CAT file that is signed, but don't just install it, because your Windows can't trust Newhex's cert since it's not in the keystore, to fix this do:
7) Add your certificate to your private Key Store, remember this step MUST be done by an administrators access, otherwise you will get an error about (Keystore not found etc):
certmgr.exe -add NewhexTest.cer -s -r localMachine root
This should add into your keystore, Once done, you can then:
8) Go into your device manager, and add your new driver, you would get a warning but will be accepted and installed without the need to reboot with a forced (Don't check cert type account).
I tried this already and it works on Windows 10 and Windows 8 pro versions.
Kind Regards
Heider Sati
You are supposed to use inf2cat, not makecat, because you have an INF file.
You should work on addressing those warnings from inf2cat by fixing your INF file. Here is my INF file that uses usbser.sys and doesn't cause any warnings: https://gist.github.com/3647208
I was able to fix my INF file thanks to the advice from chinzei in the first post of this thread: http://www.microchip.com/forums/m488342-print.aspx
If you continue to have trouble, please edit your question to include the source of your INF file, or at least a link to the source.
I encounter the same problem and was able to install my driver with a TEST certificate using the instructions provided here:
http://msdn.microsoft.com/en-us/windows/hardware/gg487328.aspx

creating a registry file to run my application on windows startup

I have created a registry file that adds my application to start when windows starts,
here is the code,
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]
"Ghori"="e:\Test\test.txt"
but when i add it to the registry, it successfully imports but when i goto regedit and look for it , it doesn't appear there :S
try this
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]
"Ghori"="e:\\Test\\test.txt"
your
"Ghori"="e:\Test\test.txt" is missing '\\'
this is on my system and it works fine
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce]
"Edit2"="G:\\softwaremy\\RunOnce.exe"
with the double \\ try importing the registry file..it should work

My Libraries shortcuts don't work

I don't know why but my Libraries shortcuts don't work anymore,
When I press on them nothing happens (nor from the start menu nor from Windows Explorer)
I think that this is something from the registry but I don't know what,
Please help me!
Sounds like something has gone wrong in your file associations, save the following as a .reg file and run it to restore .library-ms:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.library-ms]
[HKEY_CLASSES_ROOT\.library-ms]
#="LibraryFolder"
"Content Type"="application/windows-library+xml"
[HKEY_CLASSES_ROOT\.library-ms\ShellNew]
"Handler"="{c7ca6167-2f46-4c4c-98b2-c92591368971}"
"NullFile"=""
"IconPath"=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,31,00,30,00,30,00,31,00,00,00
[HKEY_CLASSES_ROOT\.library-ms\ShellNew\Config]
"IsFolder"=""
"IsOptIn"=""
"NoEmptyFile"=""
[HKEY_CLASSES_ROOT\LibraryFolder]
#="Library Folder"
"NeverShowExt"=""
"NoOpenWith"=""
"IncludeShare"=""
"IncludeSync"=""
"CanRecursivelySearch"=""
"NoPreviousVersions"=""
"FriendlyTypeName"="#shell32.dll,-34560"
"EditFlags"=dword:00100000
"DefaultDropEffect"=dword:00000004
"TileInfo"="prop:System.ItemTypeText"
"ExtendedTileInfo"="prop:System.ItemTypeText"
"InfoTip"="prop:System.ItemTypeText;System.DateModified"
"PreviewDetails"="prop:System.DateModified;*System.SharedWith"
"FullDetails"="prop:System.ItemNameDisplay;System.ItemTypeText;System.DateModified;*System.SharedWith"
"NoJumpListPathTooltip"=""
[HKEY_CLASSES_ROOT\LibraryFolder\background]
[HKEY_CLASSES_ROOT\LibraryFolder\background\shellex]
[HKEY_CLASSES_ROOT\LibraryFolder\background\shellex\ContextMenuHandlers]
[HKEY_CLASSES_ROOT\LibraryFolder\background\shellex\ContextMenuHandlers\New]
#="{D969A300-E7FF-11d0-A93B-00A0C90F2719}"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shellex\ContextMenuHandlers\Sharing]
#="{f81e9010-6ea4-11ce-a7ff-00aa003ca9f6}"
[HKEY_CLASSES_ROOT\LibraryFolder\DefaultIcon]
#="%SystemRoot%\\System32\\imageres.dll,-8"
[HKEY_CLASSES_ROOT\LibraryFolder\shellex]
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\ContextMenuHandlers]
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\ContextMenuHandlers\LibraryFolder]
#="{0af96ede-aebf-41ed-a1c8-cf7a685505b6}"
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\IconHandler]
#="{14074e0b-7216-4862-96e6-53cada442a56}"
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\LibraryDescriptionHandler]
#="{fe5afcf2-e681-4ada-9703-ef39b8ecb9bf}"
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\PropertySheetHandlers]
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\PropertySheetHandlers\{66275315-bfa5-451b-88b6-e56ebc8d9b58}]
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\SharingHandler]
#="{fe5afcf2-e681-4ada-9703-ef39b8ecb9bf}"
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\{BB2E617C-0920-11D1-9A0B-00C04FC2D6C1}]
#="{9DBD2C50-62AD-11D0-B806-00C04FD706EC}"
[HKEY_CLASSES_ROOT\LibraryFolder\shellex\{e357fccd-a995-4576-b01f-234630154e96}]
#="{9DBD2C50-62AD-11D0-B806-00C04FD706EC}"
[HKEY_CLASSES_ROOT\LibraryLocation]
[HKEY_CLASSES_ROOT\LibraryLocation\ShellEx]
[HKEY_CLASSES_ROOT\LibraryLocation\ShellEx\ContextMenuHandlers]
[HKEY_CLASSES_ROOT\LibraryLocation\ShellEx\ContextMenuHandlers\OpenContainingFolderMenu]
#="{37ea3a21-7493-4208-a011-7f9ea79ce9f5}"
[-HKEY_CLASSES_ROOT\SystemFileAssociations\.library-ms]
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.library-ms]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.library-ms]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.library-ms\OpenWithList]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.library-ms\OpenWithProgids]
"LibraryFolder"=hex(0):
Just delete the non-working icons.
Then right click on library icon and press "Restore Original Icons".
so easy :p
Don't play with registry

Resources