+ Reply to Thread
Results 1 to 3 of 3

Thread: Trying to put a '%' in a registry value

  1. #1

    Default Trying to put a '%' in a registry value

    I am trying to put a string into a registry value with the 'Create/Update Key and Value' command and running into problems.
    I have a string ("C:\Program Files (x86)\Some.exe" Parm1 "%1") that keeps throwing a syntax error.
    GEN1077 Syntax Error (1)
    Is there any way to escape this percent sign, or another method to achieve my goal?
    Thank you!

  2. #2

    Default Re: Trying to put a '%' in a registry value

    Quote Originally Posted by Adam Shaw View Post
    I am trying to put a string into a registry value with the 'Create/Update Key and Value' command and running into problems.
    I have a string ("C:\Program Files (x86)\Some.exe" Parm1 "%1") that keeps throwing a syntax error.
    GEN1077 Syntax Error (1)
    Is there any way to escape this percent sign, or another method to achieve my goal?
    Thank you!
    I had a colleague tell me, it's 2 percent signs: %%

  3. #3
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Trying to put a '%' in a registry value

    Thanks for the update. Yes, %% is the correct way to handle this.

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •