> > This may have been discussed before, but I can't find it. So I
> > apologize.
> > Has anyone had experience writing VB6 with SP6 in Windows 7 ???
> > What about running a VB6 app in Windows 7 ??
> > > This may have been discussed before, but I can't find it. So I
> > > apologize.
[quoted text clipped - 6 lines]
> Kind regards,
> Bruce.
Hello,
I'm running VB6 on Windows 7 release version, and everything appears
to work except for one thing: So far we haven't been able to get any
VB6 code to read a value from the registry. We have some legacy VB6
code that uses windows script host to read a string value, but this
throws an error "the system could not find the file specified." Now a
VB.NET program on the same machine can read the registry fine.
We thought we'd create a workaround by writing a VB.NET assembly to
get registry values, and register it for COM interop so we could call
it from VB6 code. But this didn't work either: it always returns an
empty string when called from VB6 code, but it returns the correct
value when called from VB.NET code. So something is definitely fishy
when it comes to VB6 + Win 7 + registry.
Does anyone knows a solution to this?
Thanks,
John
Jan Hyde - 24 Aug 2009 12:49 GMT
"JohnV@nn" <jmvannoy@gmail.com>'s wild thoughts were
released on Fri, 21 Aug 2009 18:10:52 -0700 (PDT) bearing
the following fruit:
>> > > This may have been discussed before, but I can't find it. So I
>> > > apologize.
[quoted text clipped - 23 lines]
>
>Does anyone knows a solution to this?
You would need to post the code you are using.
--
Jan Hyde
Stephen7405 - 09 Sep 2009 23:27 GMT
I am successfully reading Registry Key vales in VB6/Win7. Here's a sample of
code:
Dim WshShell As Object
Dim strRootKey As String
Dim strVariable As String
Set WshShell = CreateObject("WScript.Shell")
strRootKey = "HKEY_CURRENT_USER\Software\MyApps\MyApp\TestKey"
On Error Resume Next
Err.Clear
strVariable = Trim(WshShell.RegRead(strRootKey))
If Err.Number = 0 And strVariable <> "" Then
'ALL is OK
Else
'NO VALUE RETRIVED FROM REGISTRY
End If
Hope this gives you some help
> "JohnV@nn" <jmvannoy@gmail.com>'s wild thoughts were
> released on Fri, 21 Aug 2009 18:10:52 -0700 (PDT) bearing
[quoted text clipped - 32 lines]
> --
> Jan Hyde