Jump to content

Registry Dependencies


Recommended Posts

Got the new version. Am I the only one still having problems with registry dependencies, not graying out installed apps? The file, folder and architecutre dependencies work great (I haven't tried the others). But registry keys are a no-go. I've tried this feature on all sorts of PCs. I've got admin rights. I've run WPI from a CD and a harddrive. There must be some reason this feature isn't working. I've got 64-bit Windows Ultimate. :no: As a test, I tried:

RegKeyExists("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folder")

this is how the code looks in the config.js file:

prog[pn]=['Shell Folders'];
uid[pn]=['SHELLFOLDERS'];
dflt[pn]=['no'];
forc[pn]=['no'];
bit64[pn]=['yes'];
cat[pn]=['Customizer'];
pfro[pn]=['no'];
cmds[pn]=['{REGEDIT} "%wpipath%\\Install\\Regs\\ShellFolders.reg"'];
gcond[pn]=['RegKeyExists("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folder")'];
desc[pn]=['Shell Folders'];
pn++;

The entry is not greyed out even though the key exists in my registry.

Edited by lurk&jerk
Link to comment
Share on other sites


About REGEDIT, you must use the switch: /S

Example(x86):


prog[pn]=['Archiveur WinRAR 4.0.1'];
uid[pn]=['ARCHIVEURWINRAR401'];
ordr[pn]=[9];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Applications'];
pfro[pn]=['no'];
cmds[pn]=['"%wpipath%\\Install\\WinRAR\\wrar401fr.exe" /S','REGEDIT /S %wpipath%\\Install\\WinRAR\\rarreg.key'];
desc[pn]=['Archiveur WinRAR 4.0.1'];
pn++;

Link to comment
Share on other sites

Regardless of the command (and the simple {REGEDIT} "%wpipath%\\Install\\Regs\\ShellFolders.reg" command pointing to to a .reg file works fine for me) the registry entry exists in my registry, after the installation. So when I close and open WPI, the entry should be grayed out. It is not. mritter tried to tackle this issue a while back and said he could not reproduce it. I can't believe I'm the only one with this issue. I've tried this on a number of clean installs on various PCs with the same result. I guess I'll just throw in the towel. :(

Link to comment
Share on other sites

Adding a "s" to \Shell Folder:

RegKeyExists("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders")

But, maybe you have created this reg key, with "ShellFolders.reg" ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folder")!

*Edit:

After testing, I have the same problem: doesn't work! (the registry entries are alredy installed but the grayed condition doesn't work).

Even if I select inside: Options Wizard | Features = if grayed condition is true, disable the check box.

config.js


prog[pn]=['ShellFolders'];
uid[pn]=['SHELLFOLDERS'];
ordr[pn]=[21];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Applications'];
pfro[pn]=['no'];
cmds[pn]=['{REGEDIT} "%wpipath%\\Install\\REG\\ShellFolders.reg"'];
gcond[pn]=['RegKeyExists("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folder")'];
desc[pn]=['ShellFolders'];

Edited by myselfidem
Link to comment
Share on other sites

I don't want to be a d*ck about this, I really don't. But the registry key feature must have a bug in it. For instance, in the sample code displayed when the user clicks the menu item "Registry Key Exists":

[RegKeyExists("HKEY_CURRENT_USER\Software\WPI\Theme")]

It was my understanding that that "Therme" key, if it exists, should be grayed out even if it doesn't have a value, e.g. "=C:\windows.theme". Like I said, whether the key is pre-existing, as in the example I gave in this post, or custom with a specific value, as I gave in my post some time ago:

 prog[pn]=['Cursors'];
uid[pn]=['CURSORS'];
dflt[pn]=['no'];
forc[pn]=['no'];
bit64[pn]=['yes'];
cat[pn]=['Customizer'];
cmds[pn]=['{REGEDIT} "%wpipath%\\Install\\MySetup\\Cursors.reg"'];
gcond[pn]=['RegKeyValue("HKEY_CURRENT_USER\\Control Panel\\Cursors\\Arrow")=="F:\\1SYSTEM\\1cons\\Cursors\\ Red.cur"'];
desc[pn]=['Cursors'];
pn++;

the entry is not grayed out by WPI at least in some PCs. I have UAC disabled; I don't know what the problem can be because, as I've said, with all due respect, I've tried this on a bunch of PCs.

Edited by lurk&jerk
Link to comment
Share on other sites

gcond[pn]=['RegKeyValue("HKEY_CURRENT_USER\\Control Panel\\Cursors\\Arrow")==F:\\1SYSTEM\\1cons\\Cursors\\ Red.cur&quot];

I see 3 errors in this line try this:

gcond[pn]=['RegKeyValue("HKEY_CURRENT_USER\\Control Panel\\Cursors\\Arrow")==F:\\SYSTEM\\icons\\Cursors\\Red.cur&quot];

Link to comment
Share on other sites

@ Kelsenellenelvian: I stand corrected. FINALLY! Thanks very much. Now it works. :thumbup

BTW, I see the spacing error before the file name, the path name, however, is otherwise correct. So I guess it was the space.

So all is working except

RegKeyValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellFolder\Personal")=="F:\1SYSTEM\DOCS"

But I think that's because Windows or maybe some security software I have access the "Explorer\Shell" key...

Edited by lurk&jerk
Link to comment
Share on other sites

Why do you have the path as:

"F:\1SYSTEM\DOCS"

shouldn't it be

"F:\SYSTEM\DOCS"

without the "1"?

That was one of the 3 errors that Kel tried to point out. The other one was "1cons" instead of "icons". But I guess you could have changed the names of some of the locations on purpose?

Cheers and Regards

Link to comment
Share on other sites

Yes. I changed the path and purposely put a "1" in front of the word "SYSTEM". But I do think that "Explorer\ShellFolder" registry key is protected.

Edited by lurk&jerk
Link to comment
Share on other sites

  • 1 month later...

RegKeyExists requires a final backslash in the key name or it won't work.

Source: MSDN (RegKeyExists is based on RegRead):

You can specify a key-name by ending strName with a final backslash. Do not include a final backslash to specify a value-name. A value entry has three parts: its name, its data type, and its value. When you specify a key-name (as opposed to a value-name), RegRead returns the default value. To read a key's default value, specify the name of the key itself. Fully qualified key-names and value-names begin with a root key. You may use abbreviated versions of root key names with the RegRead method. The five possible root keys are listed in the following table.

The RegKeyExists("HKEY_CURRENT_USER\\Software\\WPI\\Theme") example shown when you click to add the function is wrong because it doesn't include the final backslash.

Maybe WPI should add the final backslash if it's not already present in the key name?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...