Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: BAT2EXE adding Quotes to SET statements?  (Read 3791 times)

0 Members and 1 Guest are viewing this topic.

KenL

    Topic Starter


    Beginner
    BAT2EXE adding Quotes to SET statements?
    « on: June 12, 2009, 07:13:18 AM »
    Good morning everyone, the newest version of Bat_to_EXE_converter does somerthing new.

    I have a bat file that has the following:

    set MODULE=%3
    set SERVERNAME=%4

    If the file is in BAT format, the results are:

    set MODULE=SY
    set SERVERNAME=NULL

    Once I compile the BAT file into an EXE, the results are:

    set MODULE="SY"
    set SERVERNAME="NULL"

    This definately messes up my scripts
    if {%4}=={NULL} set SERVERNAME=%COMPUTERNAME%

    Any ideas on how to stop this?


    Ken


    Windows XP PRO/Server 2003. Date Format DD/MM/YYYY

    gh0std0g74



      Apprentice

      Thanked: 37
      Re: BAT2EXE adding Quotes to SET statements?
      « Reply #1 on: June 12, 2009, 08:51:54 AM »
      i don't personally use BATtoEXE and i have heard problems associated with it. however, i do have experience in programming with other languages like Perl and Python and have used their converters (perl2exe for Perl and pyinstaller/py2exe for Python) to produce EXE files and have worked pretty well. If you are not restricted to batch, i recommend you pick up one of these languages and play with it.

      billrich

      • Guest
      Re: BAT2EXE adding Quotes to SET statements?
      « Reply #2 on: June 12, 2009, 09:32:29 AM »
      Where is the site that created the complier ( converter )  from bat to exe?
      Contact their  Support Department?

      In the meantime try:

      REM  on the command line for the bat file try "%3"  and "%4"

      @echo off
      set MODULE=%3
      set SERVERNAME=%4



      REM  on the command line for the bat file try "%3"  and "%4"

      set MODULE=%3
      set SERVERNAME=%4
      echo Module = %MODULE%
      echo Servername = %SERVERNAME%

      REM Once I compile the BAT file into an EXE, the results are:

      set MODULE="SY"
      set SERVERNAME="NULL"

      REM This definitely messes up my scripts
      if {%4}=={"NULL"} set SERVERNAME=%COMPUTERNAME%
      echo servername  %SERVERNAME%

      C:\>