I faced a problem of checking a specific application is already installed.
I know that I can check from the registry key for which application that is already installed but I cannot find Expression Encoder4 (window 64bit) in HKLM registry key.
Any ideas?
thanks
The registry key to check is:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Expression\Encoder\4.0
I use the following code to check the encoder version and my dev computer is Windows 7 64bit:
string encoderVersion = string.Empty;
RegistryKey localKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Default);
localKey = localKey.OpenSubKey(#"SOFTWARE\Microsoft\Expression\Encoder\4.0");
if (localKey != null)
{
encoderVersion = localKey.GetValue("Version").ToString();
}
Related
When I try to install macOS in VMware Workstation I get a popup error when I try to login with my Apple ID:
ICLOUD_UNSUPPORTED_DEVICE
That's all it says.
How do I make my VM appear as an iCloud supported device?
Shut down the VM gracefully, then add the following to the end of your virtual machine's .vmx file to make VMware believe it is running on Mac hardware:
board-id = "Mac-551B86E5744E2388"
hw.model.reflectHost = "FALSE"
hw.model = "MacBookPro14,3"
serialNumber.reflectHost = "FALSE"
serialNumber = "C02XXXXXX153"
smbios.reflectHost = "FALSE"
efi.nvram.var.ROM.reflectHost = "FALSE"
efi.nvram.var.MLB.reflectHost = "FALSE"
efi.nvram.var.ROM = "3c0754a2f9be"
Boot the VM.
Open iTunes, click Account menu, then Sign In.
Source for the above lines
I am a beginner in Sahi Automation Tool.
I set the following changes to run my script.
1) In Sahi/Userdata/bin
SET SAHI_EXT_CLASS_PATH=%EXT_CLASS_PATH%;d:\Sahi\extlib\db\mysql_connector_java_5.1.34_bin.jar;
2) Downloaded and installed the 64 bit ODBC drivers (AccessDatabaseEngine.exe)
3) Set the proxy and port in userdata.properties
Here is my code.
var db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:Driver={Microsoft Excel Driver(*.xlsx)};DBQ=d:\\Sahi\\userdata\\scripts\\My_works\\Login.xlsx;readOnly=false","","");
if(db != null)
{
var $rs = db.select("select * from [Sheet1$]");
}
I am encountering below ERROR.
--Stopped Playback: FAILURE--
Kindly help me please.
Lissy, I would suggest you not to use db APIs to work with the excel files. _getExcel and _readExcelFile should work perfectly for you.
I am developing on a Qt project, and have installed Qt from their installer onto my computer. In Visual Studio it is simple to debug-step into Qt sources: when I enter a function in an unknown file, it will open a file browser to let me locate the original Qt source code.
Is there an equivalent function in Xcode or LLDB?
The debug information records the location of the QT source files when they were built. You can find this information by doing:
(lldb) image lookup -va main
Address: hello[0x0000000100000f40] (hello.__TEXT.__text + 0)
Summary: hello`main at hello.c:5
Module: file = "/private/tmp/hello", arch = "x86_64"
CompileUnit: id = {0x00000000}, file = "/tmp/hello.c", language = "ISO C:1999"
Function: id = {0x00000026}, name = "main", range = [0x0000000100000f40-0x0000000100000f6d)
FuncType: id = {0x00000026}, decl = hello.c:4, clang_type = "int (void)"
Blocks: id = {0x00000026}, range = [0x100000f40-0x100000f6d)
LineEntry: [0x0000000100000f40-0x0000000100000f56): /tmp/hello.c:5
Symbol: id = {0x00000004}, range = [0x0000000100000f40-0x0000000100000f6d), name="main"
but substitute some QT function for "main". Then look at the CompileUnit line and see what the "file" entry says. Suppose it says
"/BuildDirectory/sources/SomeSubdirectory/SomeFile.cpp"
Now presumably you've downloaded the QT sources, and they live somewhere on your local machine, say in
"/Users/ME/QT/sources"
So what you want to do is tell lldb: "when you see a source file rooted at /BuildDirectory/sources, look in /Users/ME/QT/sources instead." You do that with the lldb "target.source-map" setting. In this example, you would say:
(lldb) settings set target.source-map /BuildDirectory/sources /Users/ME/QT/sources
You can type that in on the command line or put it in your .lldbinit file for more general use. lldb will update its source maps automatically, but if you are running in Xcode, you'll have to step once after issuing the command to get it to update.
When installing a signed driver (i.e. with a properly signed .CAB) on Windows 7 through DpInst, unless it's a WHQL-signed driver, you cannot install it silently. If you run DpInst in the non-silent mode, it'll prompt you to trust the "publisher". If you run DpInst in silent mode, it would fail with a signing-related error code (something like 0x800b0109 -- check your setupapi.app.log).
While ilya's answer is good, the solution on Windows 7 is even easier. The command below deploys the certificate to both the current user and the system trusted publisher certificate stores. It requires administrative privileges and is provided by Microsoft.
For Windows 7
certutil.exe -addstore TrustedPublisher cert.cer
I verified that this works on Windows 7 64-bit to deploy signed, but not WHQL-certified, drivers - without prompting the user.
Windows XP
WHQL Certification
It appears that on XP you still need to have the drivers WHQL-certified in order to avoid prompts on install.
Pre-Installing SPC on Windows XP
For Windows XP you'll need to download the Windows Server 2003 Admin Tools Pack from Microsoft and extract certutil.exe and certadm.dll. Then the command above will work on XP as well.
Admin Tools Pack: http://www.microsoft.com/download/en/details.aspx?DisplayLang=en&id=16770
Note that the extracted msi file can be inspected by 7-zip, so you don't need to install it to obtain the exe and dll you need.
The straightforward way to do it is to add the signing certificate to the TrustedPublishers. You can do it programatically (the implementation of win32exception is left as an exercise to the reader):
#include <windows.h>
#include <wincrypt.h>
#include "win32exception.h"
void InstallTrustedPublisherCertificate(LPCTSTR CertificateFilePath)
{
DWORD dwContentType;
PCCERT_CONTEXT pCertContext = NULL;
if (!CryptQueryObject(
CERT_QUERY_OBJECT_FILE,
CertificateFilePath,
CERT_QUERY_CONTENT_FLAG_ALL,
CERT_QUERY_FORMAT_FLAG_ALL,
0,
NULL,
&dwContentType,
NULL,
NULL,
NULL,
(const void **)&pCertContext))
throw win32exception("CryptQueryObject");
if (dwContentType != CERT_QUERY_CONTENT_CERT)
throw exception("Incorrect content type of crypto object.");
__try
{
HCERTSTORE hCertStore = CertOpenStore(
CERT_STORE_PROV_SYSTEM,
0,
0,
CERT_STORE_OPEN_EXISTING_FLAG |
CERT_SYSTEM_STORE_CURRENT_USER,
_T("TrustedPublisher"));
if (hCertStore == NULL)
throw win32exception("CertOpenStore");
__try
{
if (CertAddCertificateContextToStore(hCertStore, pCertContext, CERT_STORE_ADD_NEWER, NULL))
{
// Added certificate to TrustedPublisher store.
}
else
{
DWORD err = GetLastError();
if (err == CRYPT_E_EXISTS)
{
// Certificate already exists in TrustedPublisher store.
}
else
throw win32exception("CertAddCertificateContextToStore", err);
}
}
__finally
{
CertCloseStore (hCertStore, 0);
}
}
__finally
{
CertFreeCertificateContext(pCertContext);
}
}
And the question is? If the driver is not WHQL-certified, it can't be installed silently. This is a security measure of Windows.
The Drivers have to go through WHQL Certification to avoid any kind of un-signed pop-ups.
If you are looking for any third-party WHQLTesting Service providers let us know, we would be happy to help you in this regards.
We have this code, but it doesn't work any more:
def get_vcvarsall(generator):
value = None
type = None
key_name = r'SOFTWARE\Microsoft\VisualStudio\SxS\VC7'
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key_name)
if generator.startswith('Visual Studio 8'):
value,type = _winreg.QueryValueEx(key, '8.0')
elif generator.startswith('Visual Studio 9'):
value,type = _winreg.QueryValueEx(key, '9.0')
elif generator.startswith('Visual Studio 10'):
value,type = _winreg.QueryValueEx(key, '10.0')
else:
raise Exception('Cannot determin vcvarsall.bat location for: ' + generator)
path = value + 'vcvarsall.bat'
if not os.path.exists(path):
raise Exception("'%s' not found.")
return path
This seems to have stopped working since I upgraded to Python 2.6 x64 from x86 (but I can't be sure). Could have been upgrading to Win7 that caused the problem.
It's the x64 part.
Since Visual Studio is a 32-bit application, it's registry entries get shoved in the 32-bit WoW dungeon. You'll want to look in
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7
Note that if you run Python as a 32-bit executable, it'll get redirected as well -- so everything "just works". It's only when you look for 32-bit information from a 64-bit application or vice versa that you run into problems.