"Client" user

This topic contains 7 replies, has 3 voices, and was last updated by

 
Participant
2 months, 3 weeks ago.

  • Author
    Posts
  • #109141

    Participant
    Points: 0
    Rank: Member

    Hi,

    Does anyone know what determines the "Client" user getting created on a target machine, i.e. the folder at c:\users\Client?

    I'm using Azure Automation with DSC to install some packages with PDscResources and I'd been using that users temp folder to hold the log files of the installs.

    On some machines this Client folder has been created and using "$env:TEMP\filebeat_InstallLog.txt" for the log path was working nicely.

    On other machines there's no Client folder so I get an error due to the folder not existing.

    Any idea why?

  • #109145

    Keymaster
    Points: 12
    Team Member
    Rank: Member

    Are you using the File resource to to ensure that the directory exists?  If so, are you using DependsOn on whatever resource you're using for the package installation to ensure that the directory exists before the package attempts to run?

  • #109148

    Participant
    Points: 527
    Helping Hand
    Rank: Major Contributor

    @Will, I think, her is talking about a folder 'client' which is already there in Users folder.
    @OffColor – correct me if I'm wrong.

    • #109199

      Participant
      Points: 0
      Rank: Member

      The "client" folder isn't one that I've ever created. I was presuming that it's one that got created via DSC at some point as using $env:TEMP within a Configuration resolves to c:\users\Client as can be seen from where this has worked on other servers.

      So the question is more around what circumstances would result in that folder getting created and why it's not there on all servers.

    • #109477

      Keymaster
      Points: 12
      Team Member
      Rank: Member

      There's something external that's likely creating the directory.  Like I mentioned before, if you use the File resource, it can create the folder for you if it doesn't exist.  If it does exist, it simply won't do anything.

  • #109159

    Keymaster
    Points: 12
    Team Member
    Rank: Member

    @kvprasoon, that's possible, but the solution remains the same, if the folder doesn't exist, the installation will fail.  Thus you have a dependency on the folder existing.  So the File resource should be used to ensure the directory exists, and if not, create it.  Then, have the package configured with the DependsOn property to that File resource.

  • #109471

    Participant
    Points: 527
    Helping Hand
    Rank: Major Contributor

    IMO, DSC doesn't create any folders for the execution. There could be some other reason for the failure. Can you try creating the folder manually and try pushing the configuration.

  • #109717

    Participant
    Points: 0
    Rank: Member

    I'm using another folder instead now that I've got direct control over.

    I've no idea where the Client one comes from then, but given its location and that $env:TEMP resolves to it does seem to imply that it's related to DSC and/or Azure Automation.

You must be logged in to reply to this topic.