CMD Echoing issue

December 6, 2011 at 19:18:05
Specs: Windows 7
The purpose: Extract information from a configuration file,aline it into a functional VBS file, and echo it into the VBS file. (where later it'll be activate to allow the user a more professional display of there set configuration to allow them to altar these configurations in a more efficient matter,plus it look awesome!)

Problem: While echoing I receive error code 9009
Found Solution:Add " " to both ends of the echoing prompt,BUT then it breaks the vbs scripts as "" can not be apart of the code, and will cause an error in the vbs file.

@echo off
SetLocal EnableDelayedExpansion
FOR /f "tokens=* delims= " %%a in (config.ini) do (
set /a N+=1
set v!N!=%%a
)

SET A=!v1!
SET B=!v2!
SET C=!v3!

ECHO X=MsgBox("%A%" & chr(13) & "%B%" & chr(13) & "%c%" & chr(13),1,"Set Configurations") > Config_Display.vbs
pause
Thank you.


See More: CMD Echoing issue

Report •


#1
December 6, 2011 at 20:50:15
Try ESCaping special chars. I don't know if the " " around Set Configurations is necessary, try both with and without. Hope this helps.


ECHO X=MsgBox(%%A%% ^& chr(13) ^& %%B%% ^& chr(13) ^& %%c%% ^& chr(13),1,Set Configurations) > Config_Display.vbs

type config_display.vbs


Please come back & tell us if your problem is resolved.


Report •

#2
December 7, 2011 at 07:46:56

ECHO X=MsgBox("%A%" ^& chr(13) ^& "%B%" ^& chr(13) ^& "%c%" ^& chr(13),1,"Set Configurations") > Config_Display.vbs

Works very well, has to make some ajustments but thank you very much my good man.


Report •
Related Solutions


Ask Question