I want to run a .reg file inside an NSIS installer. My registry file is:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{adeba497-0484-4d69-aff3-d7c759f21d15}]
#="SampleV2CredentialProvider"
[HKEY_CLASSES_ROOT\CLSID\{adeba497-0484-4d69-aff3-d7c759f21d15}]
#="SampleV2CredentialProvider"
[HKEY_CLASSES_ROOT\CLSID\{adeba497-0484-4d69-aff3-d7c759f21d15}\InprocServer32]
#="SampleV2CredentialProvider.dll"
"ThreadingModel"="Apartment"
I tried to run:
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{adeba497-0484-4d69-aff3-d7c759f21d15}" "SampleV2CredentialProvider"
WriteRegStr HKCR "CLSID\{adeba497-0484-4d69-aff3-d7c759f21d15}" "SampleV2CredentialProvider"
These are not working for me, and also, I don't know what I should say about the last registry. Can you please help me?
I've solved the problem using SetRegView. As I was working on a 64-bit operating system, it was trying to look to the registries as a 32bit register by default. Because of that, nothing was happening to my registry file. Setting SetRegView to 64 solved the problem for me.
SetRegView 64
WriteRegStr "HKLM" "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{adeba497-0484-4d69-aff3-d7c759f21d15}" "" "SampleV2CredentialProvider"
WriteRegStr "HKCR" "CLSID\{adeba497-0484-4d69-aff3-d7c759f21d15}" "" "SampleV2CredentialProvider"
WriteRegStr "HKCR" "CLSID\{adeba497-0484-4d69-aff3-d7c759f21d15}\InprocServer32" "" "SampleV2CredentialProvider.dll"
WriteRegStr "HKCR" "CLSID\{adeba497-0484-4d69-aff3-d7c759f21d15}\InprocServer32" "ThreadingModel" "Apartment"
Related
I built an MSI using the WIX Toolset. In the MSI I use:
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize"/>
to set the InstallLocation regkey. When testing with the App Cert Kit I get the failure:
A non-optional value 'InstallLocation' is missing or invalid for program.
After checking the registry on my PC and another's the correct registry key
InstallLocation: C:\Program Files\*program_name*\
is present on both in the correct location
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}.
I tried consulting a related question but honestly have no idea what the solution is saying. I also tried running the Cert Kit on the other computer but to no avail. Is this a known bug in the Cert Kit or is that not a valid InstallLocation?
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
I'm working with a new property schema, and have been in the habit of checking the registry when I register or unregister a new version. One of the primary places to check this is HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA.
Interestingly, I occasionally lose access to this registry location in Regedit. I see see this (note the absence of PropertySchema):
I know the schemas are still registered, because I can use the prop.exe tool and propschema SDK sample application to describe them. The properties are available in Windows Explorer and in Search.
Also, I can use PowerShell to list the contents of this hive:
C:\Users\carlton> cd hklm:
HKLM:\>
C:\Users\carlton> cd hklm:
HKLM:\> cd SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA
HKLM:\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA> dir
Hive: HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\PROPERTYSYSTEM\PROPERTYSCHEMA
Name Property
---- --------
0000 (default) : C:\Program Files\Internet Explorer\ie9props.propdesc
SchemaId : {D9B5ABA1-5E8A-4902-B6A1-50B3C0311C2E}
URI : ie9props.propdesc
CompactURI : 5376bae4b39f43768806afcb6b8ff5464bf9c989d1a819c6e6d99ba1e8ce2512
0001 (default) : C:\Program Files\Microsoft Office\Office14\Custom.propdesc
SchemaId : {537AAAB1-1D85-48DC-A99E-16EB8C309FE5}
URI : custom.propdesc
CompactURI : 2e3be58e5cbbc0da093956b46a3905f11cf0f5bbf11987a8619e25f7261ee8be
0002 (default) : C:\apps\MSOffice\Office14\VisioCustom.propdesc
SchemaId : {18503526-0466-4942-AC6E-41C1D380EABA}
URI : visiocustom.propdesc
...
Anyway, I don't understand how this happens, and whether I should be worried about it. Exporting this key from a colleague's machine and re-importing it can temporarily help, as it will show keys in Regedit that were hidden/missing (even if they weren't on my colleague's machine).
I'm in the Administrators group, running Windows 7 SP1.
The 32bit program data on 64bit systems available in 'Wow6432Node' folder of the registry (in above case 'SOFTWARE\Wow6432Node\MICROSOFT\WINDOWS...'). This is transparent to the applications, hence you can read data from applications but you don't see that in Regedit.
Harry Johnston's intuition was correct. I re-ran regedit from a command line with the path c:\windows\regedit, and I once again see what I expected under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertySchema. I could've sworn it wasn't showing it either, but it's working now, apparently.
I confirmed as much by exporting the parent key (PropertySystem) from the 64-bit and 32-bit regedit's and running Beyond Compare. The propdesc files are verily not there in the 32-bit version.
See 32-bit and 64-bit Application Data in the Registry (MSDN)
I code signed my Installer/Uninstaller.exe using the below code:
signtool sign /f "mycert.pfx" /p Westell1 /t http://timestamp.verisign.com/scripts/timstamp.dll "Installer.exe"
After the code sign, when I tried to run the Installer.exe on Windows Vista 32/64 bit systems, the UAC screen not displaying the application name correctly ("Installer.exe"). It displays the application name as "Insf3e3.tmp".
Thanks in advance for the help
The text that UAC displays isn't the filename, it's the FileDescription field from the version resource in your executable.
If you're building Installer.exe yourself, you need to add a suitable version resource in your .rc file:
VS_VERSION_INFO VERSIONINFO
...
VALUE "FileDescription", "My Application"
If Installer.exe comes from an install builder, you need to look up how to set that string when you build your installer. For example, with InnoSetup you would say:
[Setup]
VersionInfoDescription=My Application
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