Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't write the SysWow64 value to registry with vbscript for Screensaver
    text
    copied!<p>Scripts, registries, screen-savers, oh my!</p> <p>I'm trying to use a screen-saver on a Windows XP 64 bit machine which uses a .NET app which makes an interop call which relies on some x86 Shockwave Dlls (some Shockwave animation). Everything should be in the %systemroot%\WINNT\SysWOW64 directory. When the timeout for the screensaver occurs, the process should looks like this:</p> <p>Screensaver.scr -> .NET app -> shockwave animation.</p> <p>During installation I want a vbscript to my screen-saver file to copy the Screensaver.scr to the SysWow64 directory and then set the proper registry key to this file for Windows to launch the screen-saver.</p> <p>The code is something like this:</p> <pre><code>Dim sScreenSaver, tScreenSaver sScreenSaver = "C:\SourceFiles\bin\ScreenSaver.scr" 'screensaver tScreenSaver = "C:\winnt\SysWOW64\" Set WshShell = WScript.CreateObject("WScript.Shell") 'script shell to run objects Set FSO = createobject("scripting.filesystemobject") 'file system object 'copy screensaver FSO.CopyFile sScreenSaver, tScreenSaver, True 'set screen saver Dim p1 p1 = "HKEY_CURRENT_USER\Control Panel\Desktop\" WshShell.RegWrite p1 &amp; "SCRNSAVE.EXE", (tScreenSaver &amp; "ScreenSaver.scr") </code></pre> <p>After installation, I can verify the the Screensaver exists in the correct directory. <strike>(It actually seems to be in both the system32 and the sysWOW64 directories---whether that's the install script or something I did post-install I'm in the process of verifying.)</strike> </p> <p>However, the registry entry is not correct. In both the 32 and 64 bit regedit I see the HKCU\ControlPanel\Desktop\SCRNSAVE.EX is set to:</p> <pre><code> C:\WINNT\system32\Screensaver.scr </code></pre> <p>This isn't right. The screen-saver won't run from this directory. It only runs from SysWOW64. If I manually edit the registry with regedit to the correct SysWOW64 path everything works fine.</p> <p>Is this a problem with using the script or is this a Windows registry redirection, or filesystem redirection problem? You'd think this would be simple...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload