2 Replies Latest reply on Aug 16, 2011 2:25 PM by cunningt

    Question about Default User settings when provisioning


      When using provisioning to build either a Win7 or WinXP image, I would like to know how the community handles custom settings that are intended to be saved within the Default User profile, so that users get these custom settings when they login to a computer for the first time?


      Prior to our recent LANDesk purchase, we used to build images by letting Windows setup autologon as Administrator at which point our various corporate applications would install via scripts and we'd also import any custom HKEY_CURRENT_USER registry settings for the Administrator user, then we'd run sysprep and let it copy the "customized" Administrator's profile over top of the Default User's profile.  This way our users would get any settings that the applications installed plus our custom settings.


      I'm trying to find the easiest way with LANDesk to accomplish this.  Within provisioning when using either the "Execute file" action or the "Distribute software" action, these all run under the LocalService "account" and so any settings are not initially added to either the Administrator or Default User profile folder.


      Is it possible to have provisioning run as the current user (aka Administrator) instead of as LocalService?


      I've thought about not worrying about any application-installed settings and instead just importing any of our custom registry settings via a "reg.exe load" command to the Default User registry hive... but I'd like to hear if the community has any other suggestions.  I've thought about doing "RunAs.exe /profile /user:Administrator" but the Administrator's profile is already in use due to it being logged in.


      Thank you,



      Fyi - we have LD 9.0 SP2 MCP

        • 1. Re: Question about Default User settings when provisioning
          EMiranda Expert

          unfortunately, provisioning always runs as local system. i filled out an enhancement request on this a while ago.


          However, you can "trick" it by using one of LANDesk's own utilities "startasuser" which is the C:\Program Files\LANDesk\LDclient directory.  This tool just launches the appliction as the user that is currently logged in.


          So you could create an Execute File action and do something like this:



          %ProgramFiles%\landesk\ldclient\startasuser.exe %pathtoapplication%\application.exe



          More info here: http://community.landesk.com/support/message/42498#42498


          Enhancement request here: http://community.landesk.com/support/ideas/1457#comment-6365

          • 2. Re: Question about Default User settings when provisioning

            Hi EMiranda, that's such a simple and elegant solution, thank you!  I searched for a long time and never came across your old post about startasuser.    Great utility, no need for RunAs and piping passwords either, very nice.


            I haven't thoroughly tested this solution yet with 3rd party exe/msi applications but I ran a couple quick tests with Execute File with "cmd /c set" and importing a .reg file into CURRENT_USER and both worked like a charm.


            As a side note, it looks like the LD_CLIENT_DIR environment variable isn't available to Execute File children (as compared to distribution packages) so I created a new StartAsUser public templates variable containing the string  %%ProgramFiles%%\LANDesk\LDClient\startasuser.exe  and that worked.  From now on I simply need to specify %StartAsUser% as the target within each Execute File action whenever I need this level of functionality.


            Many thanks again!