Hi All, I need to create a Runonce key on a 64 bit computer using Vb Script. On installing the vbs file manually, the registry is getting created under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce. But when i deploy the same vbs thorugh SCCM the Runonce key is created under W

SetRegKey "HKLM", "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "RealVNC",  "C:\Program Files (x86)\VNC\Install.vbs", "RegSZ"

Answer Summary:
Use CScript.exe under the sysnative folder
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



What do you mean created under W?.. 

Answered 06/13/2012 by: GAKIS
Fourth Degree Green Belt

  • Under water.....
    or perhaps Wow6432Node? I like to think (s)he meant under water though.
Please log in to comment

Use the cscript.exe under the sysnative folder to trigger the vbs.


SetRegKey "HKLM", "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "RealVNC",  "%windir%\Sysnative\cscript.exe C:\Program Files (x86)\VNC\Install.vbs", "RegSZ"



Answered 06/14/2012 by: adilrathore
Fourth Degree Black Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja