The Artima Developer Community
Sponsored Link

.NET Buzz Forum
32-bit registry access from WSH script running in x64 Windows

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jeff Key

Posts: 481
Nickname: jeffreykey
Registered: Nov, 2003

Jeff Key is legally sane, but questionably competent.
32-bit registry access from WSH script running in x64 Windows Posted: Apr 26, 2005 9:02 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Jeff Key.
Original Post: 32-bit registry access from WSH script running in x64 Windows
Feed Title: Jeff Key
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/jkey/Rss.aspx
Feed Description: Topics revolve around .NET and the Windows platform.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Jeff Key
Latest Posts From Jeff Key

Advertisement
We use a hybrid approach for pulling the latest "good" binaries to our machines every day. A VBS bootstrapper starts the process, and one of the things it does is check the registry. Sounds reasonable, right? It was for the past few years, but now there's a problem when running this script on a 64-bit OS: It doesn't find the registry values.

64-bit Windows uses a number of things to make 32-bit apps live happily in a 64-bit world. One of these is the registry redirector. Simply, the OS gives 32-bit apps their own view of certain parts of the Windows registry, including HKLM\Software. Our VBS file looks for a value that's added by the .NET installer, which is a 32-bit process. The gotcha is that VBS files are associated with the 64-bit wscript.exe, so when it runs and looks for the value insterted by the 32-bit .NET installer, it can't find it.

Luckily, a 32-bit version of wscript is included in the %windir%\SysWOW64 directory. Launching a VBS with this version will give you access to the 32-bit sections of registry.

Read: 32-bit registry access from WSH script running in x64 Windows

Topic: I Want a New Add-in - Class Organizer Previous Topic   Next Topic Topic: Refactoring pattern quiz number 1

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use