Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    How do I access Windows environment variables within BuildMaster

    Scheduled Pinned Locked Moved Support
    buildmastervariableswindows
    4 Posts 2 Posters 9 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jstarbird_7831
      last edited by

      I have some files that need to get copied to the Windows OS folder and then also register a DLL there. How can I use Windows environment variables instead of having to create new variables?

      Product: BuildMaster
      Version: 4.9.2

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        Simply use a PowerShell script in your deployment plan to do the copy, and access them using: $env:EnvironmentVariableName

        1 Reply Last reply Reply Quote 0
        • J Offline
          jstarbird_7831
          last edited by

          Yeah I knew about that option. Just wanting to use the built in functions. Copying was just the simple one but there are a few others that it would be nice to be able to use them with as well.
          Won't 5.0 have a way to access them? I seem to recall a way to do it, it might have been using PS to get the value and pass it back into BuildMaster but at least you could use it elsewhere in the deployment if needed rather than having to re-write functions whenever you wish to utilize one.
          Grant it this may be a rare need, just an old app to support here.

          Thanks!

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Yes, in the new/v5 execution engine, we wrote a variable function called $EnvironmentVariable(name) that returns the machine environment variable.

            The current/v4 execution engine does not provide agent/server context in a variable function, so there's no way to write a variable function that executes on a remote machine.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation