|
-
Aug 20th, 2008, 06:33 PM
#1
Thread Starter
Frenzied Member
Vista: Drives me Nuts!
This is seriously doing my head in.
Im running XP alongside VISTA on a Virtualization with MS Virtual PC to test the app.
This is my code, very simple: Read Value Data from Registry. If the len >=1 or = vbNullstring then Skip
If Len(RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0))) >= 1 Then GoTo SkipThisOne
If Not RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0)) = vbNullstring Then GoTo SkipThisOne
MsgBox Len(RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0)))
MsgBox RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0))
'''More code
SkipThisOne:
Now guess what the MsgBoxes return: 0 & vbNullstring, but yet again it doesnt go to the SkipThisOne label
This works with XP.
'The Exe also has a manifest inserted with Resource Hacker, to allow admin elevation etc...
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Aug 20th, 2008, 06:55 PM
#2
Hyperactive Member
Re: Vista: Drives me Nuts!
Hmmm, not sure. Vista is pretty picky about the registry.
Have you thought about setting an intermediate value then evaluating that?
Code:
xLength = Len(RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0)))
If xLength >= 1 Then GoTo SkipThisOne
and maybe this will work better....
Code:
If IsNull(RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0))) Then GoTo SkipThisOne
or maybe try an intermediate value here also
Code:
If IsNull(RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0))) Then TempFlag = True else TempFlag = False
If TempFlag then GoTo SkipThisOne
-
Aug 20th, 2008, 08:05 PM
#3
Re: Vista: Drives me Nuts!
My suggestion:
Code:
Dim sValue As String
'... ...
sValue = "" & RGGetKeyValue(theRootKey, regKey & QueryKeys(X), getValues(0))
If Len(sValue) Then GoTo SkipThisOne
'... ...
SkipThisOne:
-
Aug 21st, 2008, 07:46 AM
#4
Thread Starter
Frenzied Member
Re: Vista: Drives me Nuts!
Thanx guys but no, no, no... Its still there!!!
Len = 0 but it still goes through when it shouldnt!!
Last edited by some1uk03; Aug 21st, 2008 at 07:50 AM.
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|