/build/static/layout/Breadcrumb_cap_w.png

Need help with a VBScript to create a Runonce key on 64bit Windows

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"


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Use CScript.exe under the sysnative folder
Posted by: GAKIS 11 years ago
Fourth Degree Green Belt
1

What do you mean created under W?.. 


Comments:
  • Under water.....
    or perhaps Wow6432Node? I like to think (s)he meant under water though. - etipton 11 years ago
Posted by: adilrathore 11 years ago
4th Degree Black Belt
1

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

Example:

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

 

 

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ