Skip navigation
2927 Views 6 Replies Latest reply: Mar 30, 2012 7:19 AM by steve49423 RSS
tlman12 Rookie 10 posts since
Sep 27, 2011

Has received 1 of 9 achievements.
Currently Being Moderated

Nov 2, 2011 12:31 PM

Provisioning Template "Update Registry"

I'm trying to use the Update registry option in the vonfiguration part of the template but it dosn't give me the option to speicify 64bit keys because instead of changing the key i want it's changing the key of the same path under the wow3264node key. unfortuanatly this has no effect..


i've tried HKLM64 and that didn't work either. 

  • Currently Being Moderated
    1. Nov 18, 2011 8:40 AM (in response to tlman12)
    Re: Provisioning Template "Update Registry"

    You can also use the execute action and run regedit /s yourregfile.reg

  • Ascott860 Specialist 183 posts since
    Aug 18, 2009

    Has received 5 of 9 achievements.
    Currently Being Moderated
    2. Nov 30, 2011 12:20 PM (in response to tlman12)
    Re: Provisioning Template "Update Registry"

    It kills me that provisioning does not recognize 64-bit registry or system files. What I do is call cscript and run a vbsript to make changes to the 64-bit registry. Hopefully they fix this soon, it is a 64-bit age. As for having to make changes or add to anything in system32, I recently found out you can use the sysnative variable, although I have not tried it.


    I have had problems running more then one vbscripts that make changes to 64-bit registry. Actually got a ticket open on this one after this AM. But if you just deploy one vbscript in your template to make changes you should be fine.

  • Jhamill Rookie 16 posts since
    May 12, 2011

    Has received 1 of 9 achievements.
    Currently Being Moderated
    3. Jan 17, 2012 12:55 PM (in response to Ascott860)
    Re: Provisioning Template "Update Registry"

    I have just come across this issue, extremely frustrating but can be easily managed by other means. I'm currently using AutoIT to write to x64 registry. Does anyone know if this has been rectified in LDMS 9 SP3?

  • Apprentice 160 posts since
    Mar 18, 2010

    Has received 1 of 9 achievements.
    Currently Being Moderated
    4. Jan 24, 2012 11:03 AM (in response to Jhamill)
    Re: Provisioning Template "Update Registry"

    I use VBScript to do it.  I created a function that checks for the sysnative folder.  If it exists, I can assume that the script is running as a 32bit script on a 64bit system.  It then runs the script from the start, using the wscript.exe from the sysnative folder.  This in essence gives you a 64bit vbscript environment.  Once the script completes, it goes back to the first instance and quit.  Basically, just add this function and then call it first thing in your script.  You can then write your script assuming that you're in a 32bit script on a 32bit system, or you're a 64bit script on a 64bit system.



    'This is a function to force the script to run in 64bit mode.  Make sure you run this function from the start.
    Function Force64Bit
        'Declare scripting objects
        Set oShell = CreateObject("WScript.Shell")
        Set oFSO = CreateObject("Scripting.FileSystemObject")
        'Declare Environment variables
        eWinDir = oShell.ExpandEnvironmentStrings("%WINDIR%")
        'Declare Variables
        Dim sReturnCode, sArguments
        'Check to see if the sysnative folder exists.
        'This folder is invisible when running as 64 bit.
        If oFSO.FolderExists(eWinDir & "\sysnative") = True Then
            'Pull in all of the command line arguments.
            If WScript.Arguments.Count > 0 Then
                For i = 0 To WScript.Arguments.Count - 1
                    sArguments = sArguments & " " & WScript.Argument.Item(i)                                       
            End If       
            'Restart script in 64bit mode
            sReturnCode = oShell.Run(eWinDir & "\sysnative\wscript.exe """ & WScript.ScriptFullName & """ " & sArguments,0,True)
            'The script should have already ran in 64 bit mode, so just exit.  Return the exit code from the script
            WScript.quit sReturnCode
        End If
        'Returns true if already 64bit
        Force64Bit = True
    End Function
  • Rookie 1 posts since
    Mar 29, 2012

    Has received 1 of 9 achievements.
    Currently Being Moderated
    5. Mar 29, 2012 11:52 AM (in response to tlman12)
    Re: Provisioning Template "Update Registry"

    In order to work on non SysWOW hive of registry, you can replace the template action "Update Registry" by an action "Execute file" which executes the reg.exe tool from the Sysnative virtual directory.


    This will work only on 64 bits OS, as 32 bits OS don't even know about Sysnative directory.


    Here is the way I work with registry on 64 bits OS :

    Template action : Execute file

    Target path and file name : %%windir%%\Sysnative\reg.exe

    Command-line parameters : add HKLM\SOFTWARE\Company\Product\ /v KeyName /t REG_SZ /d Value /f


    Using standard reg.exe usage, you can with such a template action make any modification you need on 64 bits registry from a 32 bits process.

  • steve49423 Apprentice 87 posts since
    Feb 13, 2008

    Has received 3 of 9 achievements.
    Currently Being Moderated
    6. Mar 30, 2012 7:19 AM (in response to Kirika)
    Re: Provisioning Template "Update Registry"

    Or you could just create a batch file software distribution package that updates the registry (simple reg command) and enable the "run as 64bit application" option



    Then use a distribute software action in the template.  This is how I get round it - single line batch file and using something in LANDesk that automatically handles 32/64bit file and registry without having to re-engineer anything!

More Like This

  • Retrieving data ...

Bookmarked By (1)


  • Correct Answers - 20 points
  • Helpful Answers - 10 points
LANDESK Community powered by Jive SBS®  |  Legal Notices  |  Privacy Policy  |  Icon 

TweeterOn Twitter  |  Icon FacebookOn Facebook © 2007 LANDESK Software