Jump to content

RegRead uac information


Recommended Posts

Hi

I hope someone can clarify an issue that I am having with regread reporting under W7 were I have administrative rights on the machine

The situation is that I am performing the following code in a for loop against an ini file under but I am getting contradictory results depending on whether I engage UAC for the script

$Transaction = RegWrite($vidBranchPath & "\" & $iniFileSectionUSB[$i][1])
$Transaction = RegRead($vidBranchPath & "\" & $iniFileSectionUSB[$i][1], "")

If I run the script without UAC the script does not error branch even though the previous regwrite has not successfully completed the write task. If I engage UAC the registry entries are created.

My concern is not that the entries are not being created but that under non-UAC the regread is reporting their existence.

Link to comment
Share on other sites

What happens i think is that whithout UAC it writes the registry with Regwrite, and reads the values with Regread , but doesnt save the changes,

so when the script finishes there are no changes to the registry done. You can test it by rinning the script with NO UAC and manually checking the registry

after script finishes.

Link to comment
Share on other sites

What happens i think is that whithout UAC it writes the registry with Regwrite, and reads the values with Regread , but doesnt save the changes,

so when the script finishes there are no changes to the registry done. You can test it by rinning the script with NO UAC and manually checking the registry

after script finishes.

Juvigy

Thanks for the response. I had already tested this anomally but was not able to site temporary registry entry creation by examining the registry as the script was running. At no time did there appear registry entries to match the coding. At this point it is not a major concern as the script was developed for an XP environment but at some point we will move forward to W7

If your suspicion is correct then I am wondering how long the entries would exist for if indeed this is the case or if regread is actually returning a false result? Is this a question I should be asking in dev?

Link to comment
Share on other sites

At the basic level certainty of operation so a test of true existence on non-existence, and as indicated previously there will be a requirement to support this functionality in the W7 environment which is probably the same thing that that is certainty of success of failure of an operation.

Link to comment
Share on other sites

This had already been done. The rub is that in developing the script for xp without the #RequireAdmin in W7 for the XP environment still indicated that there were no errors when testing and developing the script. Doing the regread to confirm key entry was returning a true result while the key had not been written permanent hence the original question "How long do they exist for and when could a valid test be performed that would return a result of false without the #RequireAdmin in the W7 environment for use in the W7 environment

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
 Share

×
×
  • Create New...