Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 54433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:13:09+00:00 2026-05-10T17:13:09+00:00

As part of a build setup on a windows machine I need to add

  • 0

As part of a build setup on a windows machine I need to add a registry entry and I’d like to do it from a simple batch file.

The entry is for a third party app so the format is fixed.

The entry takes the form of a REG_SZ string but needs to contain newlines ie. 0xOA characters as separators.

I’ve hit a few problems.

First attempt used regedit to load a generated .reg file. This failed as it did not seem to like either either long strings or strings with newlines. I discovered that export works fine import fails. I was able to test export as the third party app adds similar entries directly through the win32 api.

Second attempt used the command REG ADD but I can’t find anyway to add the newline characters everything I try just ends up with a literal string being added.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:13:10+00:00Added an answer on May 10, 2026 at 5:13 pm

    You could create a VBScript(.vbs) file and just call it from a batch file, assuming you’re doing other things in the batch other than this registry change. In vbscript you would be looking at something like:

    set WSHShell = CreateObject('WScript.Shell')   WSHShell.RegWrite 'HKEY_LOCAL_MACHINE\SOMEKEY', 'value', 'type' 

    You should be able to find the possible type values using Google.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use a batch file to help setup a build project. As
As part of the build I'm processing DocBook file that produces multiple HTML files
I have created an exe file as a part of pre build event. I
As part of my Ant build process, I'd like to upload files to a
As part of our web application's build process, I have set up our XSLT
I'm using jQuery .append() to build part of a website with data I get
As part of our build process and evolving database, I'm trying to create a
We are using continuous integration as part of our build automation. For every check
I have a project which as part of the build process creates an XMLBeans
While programming, the longest part is a build on my ASP.NET Website project is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.