No announcement yet.

batch file trouble - modify registry using reg add

  • Filter
  • Time
  • Show
Clear All
new posts

  • batch file trouble - modify registry using reg add

    greetings folks,

    can't figure out how I can use this command to allow a data field to have spaces but still be able to use a variable as the data field.

    reg add HKLM\Software\Classes\%extension1%_auto_file\shell \open\command /ve /t reg_sz /d %extpath1%

    where extpath1 = "C:\DREC Software\RptView32 for Windows\RptVw32.exe" "%1"

    im trying to use this in a script to register and associate certain file types
    is there some kind of delimiter for this action? i can't see any other way around it. when i try to execute the script i get a "too many command line perameters" error because of the space in the middle of the data field. is there some way around this? i'd appreciate any help