registry

'proper' & reliable way to get all installed windows programs in Python?

I've seen numerous ways of retrieving installed programs on WinXP+ in python. What is the proper and most robust way of doing this? Currently I'm accessing HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall and reading each of the keys from there to get a list. (I've been told this isn't the proper way of doing things) I've...

Adding SMB to Windows, how safe is this?

I came across a small hack, which claims it enables smb:// on windows. The complaint was that things like <a href="\\computername\path\file.ext">text</a> weren't working. While true that you can use file:///// in your url's, the user wanted to use smb:// so that it's cross-platform. The hack goes as follows: 1) Create this Reg file, sav...

check if a registry key exists with WScript

im trying to check if a registry key exists and no matter what i try i always get the error message "unable to open registry key for reading" the code im using: keyPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\BOS\\BOSaNOVA TCP/IP\\Set 1\\Cfg\\Sign On\\"; try { var shell = new ActiveXObject("WScript.Shell"); var regValue = shell.RegRe...

How to read a REG_MULTI_SZ type value from the registry using RegQueryValueEx(..) in c++

In our vc++ win32 application we are reading a registry value of type reg_multi_sz, its working fine on 32-bit but giving empty buffer when i ran on 64- bit. How can I read values of 64 bit registry from my 32-bit application ? ...

Setting Registry Key For All Users In C#

I have an application that changes some registry values during installation. I am changing ProxyEnable and ProxyServer in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings. This works great when installing as "Just Me" in the .NET installer however I would like to set these values for all users on the comput...

Is there ANYTHING bad about the Registry design pattern?

Is the Registry design pattern a good solution for this in PHP? For a social network site (facebook, myspace). let's say I have a Database class which creates a single DB connection and lets me do DB stuff and a Sessions class which lets me handle sessions as well as a Cache class which lets me cache items and retrieve them. SO that...

How can I change the default startup directory for cmd.exe?

Hi. My Procedure last day as below Click Start, Run and type Regedit.exe Navigate to the following branch: HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor In the right-pane, double-click Autorun and set the startup folder path as its data, preceded by “CD /d “. If Autorun value is missing, you need to create one, of type...

Registry or Singleton pattern in PHP?

I am working with PHP classes and objects now. In this question the names of fields and methods are made up just so you get an idea of what I am talking about. It is related to using the singleton and registry design patterns. Now lets say I need to access a Database object, Cache Object, Core Settings object, Session object in al...

Batch file can't immediately see environment variables created by InstallShield script

Hello. We use InstallShield 2008 for our product installation. Product consists of several components. When a component is installed, a batch-file with some post-install routines specific to this component is executed. The problem: post-install batch files use some environment variables that are set during the installation of the prod...

Should I use CONSTANT's of method calls with a Registry pattern in PHP?

On my site I have a config file which has many settings that need to be accessed in many pages, including inside many class files. The config file is included into the header of every page build. Since I will be using a registry method to store some objects in, I am wondering if it would be better for me to store some setting in this c...

Is it ok to call a Registry Pattern object inside of the objects that make up the Registry?

I have asked a few question lately about the use of the singleton and registry patterns but here is a new question I have. Let's say I have 3 main class object in PHP that I need to have access to inside 20 other class files and sitewide. Database object Cache object Core object I then can use a Registry pattern to store all...

How do I make the 32-bit Perl read the 64-bit Windows registry?

I have a 32-bit perl installer. Using this I need to be able to install and uninstall both 32- and 64-bit applications. Installing 32- and 64-bit is fine. Uninstalling 32-bit is also ok. However, I have a problem while uninstalling 64-bit applications. The application just knows the name of the application as seen in Add Remove progra...

Registry Printer hack to change dialog box Print Range default from "all" to "selection"?

I have to regularly print a page from a browser; in XP the dialog box for printing, "Print range" defaults to "Print All" which I keep accidentally OK-ing. I'd really like for "Selection" to be the default -- I've hunted around the registry -- and the internet! -- for answer to no avail. Any ideas? ...

Add menu item to windows context menu only for specific filetype

Hi, i've dveloped an application that load an image using the context menu of window (right click on the file) and for the moment is working, but the reg key is on HKEY_CLASSES_ROOT\* and it works with all files. I want that the menu item on the context menu should be displayed only with .jpg files. Whow i can do that? Which regist...

Will a Registry Class in PHP work like this?

If I create a registry object to store other objects and settings in like this... $registry = Registry::getInstance(); And then create 2 other objects and pass the Registry object into them like this below... $core = new core($registry); $database = Database::getInstance($registry); and then later in the script I add some obje...

Secure a registry key via ACL to remove all access to non administrators

I'm trying to lock down a registry key with some important information that must be accessible at the client machine, I do not wan't non-administrators to have access to this key. If you are an admin you'll already be able to do more damage than what I'm storing in the key. What I'm currently looking to do is this: //Allow access only...

Setting Registry key write permissions using .NET

I'm trying to grant Write access to my application's registry settings to everyone or all users of a machine during the install process. My application does not have the appropriate permissions directly after install without requiring an administrator to grant them even though the keys and values exists, they cannot be updated? I've ...

GetMultiStringValue to read REG_MULTI_SEZ returns errocode 2.

I am trying to use GetMultiStringValue to read a REG_MULTI_SEZ from remote Registry. This function always returns the errorcode 2. And the array it supposed to fill with the REG_MULTI_SEZ is null. I am fighting with this since morning without any success. Here is the sample code I am using to read REG_MULTI_SEZ in C#. ConnectionOp...

C# - Import reg file to the registry without user confirmation box

C# winforms - How can I import a reg file into the registry? The following code is displaying a confirmation box to the user (yes/no). Process regeditProcess = Process.Start("key.reg", "/S /q"); // not working regeditProcess.WaitForExit(); ...

Cannot register an ActiveX control on only one computer.

I have run into an odd problem while attempting to register a vendor-supplied ActiveX control on two different computers. On one computer, I can register the part using regsvr32, and then use it in an Access 2007 form with no problems. On the other computer, after I register the same DLL, it is simply not recognized as a valid ActiveX p...