BAT to EXE - iexpress.exe - BAT file runs OK, EXE has errors.

Posted on 2008-11-12
Last Modified: 2012-05-05
Hello Experts,
This issue has taken too much time already, and it should be too simple. (as always)
I am trying to get a simple batch script into an EXE, and operate correctly. IExpress.exe is the ideal method.

The batch executes the other .exe's perfectly. After using iexpress, the program fails with all sorts of strange errors. I've tried a variety of other programs, but really would like to just stick with iexpress (unless there is a freebie with the same options out there).

I'm pretty sure my batch coding is just sloppy... ;-)
Any ideas? Thanks for your time!


::Attain IPv4 address from PC and prepare it in a txt file for email

for /F "tokens=2 delims=:" %%K in ('ipconfig ^| find /I "IP Address"') do set IPADD=%%K

for /F "tokens=2 delims=:" %%V in ('ipconfig ^| find /I "IPv4 Address"') do set IPv4ADD=%%V

echo %computername% - %username% - %date% %time% %ipadd% %ipv4add% >>"C:\IP.txt"

::Use blat mail client to email txt file to ComputerSupport

blat.exe -install

blat.exe c:\IP.txt -to

::Adjust the Windows registry to allow remote connections to the PC

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fAllowToGetHelp /t REG_DWORD /d 00000000 /f

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 00000000 /f

::Adjust the Administrator password


::Turn off the windows XP SP2 Firewall


::Copy VNC to local PC

MD %WINDIR%\System32\RC


COPY wm_hooks.DLL %WINDIR%\System32\RC\

COPY logmessages.DLL %WINDIR%\System32\RC\

::Register and Install VNC, Set Password

%WINDIR%\System32\RC\winvnc4.exe -register Password=dd96110ba7257486

%WINDIR%\System32\RC\winvnc4.exe -start


Open in new window

Question by:ottobock
    LVL 19

    Expert Comment

    listing the errors you mentioned may help...
    LVL 19

    Expert Comment

    I found this which has a few tips in creating the exe.
    LVL 19

    Expert Comment

    just out of interest;

    I tried this;
       for /F "tokens=2 delims=:" %%K in ('ipconfig ^| find /I "IP Address"') do set IPADD=%%K
    and it failed, so I tried this;
       for /F "tokens=2 delims=:" %K in ('ipconfig ^| find /I "IP Address"') do set IPADD=%K
    and it worked.

    posting the errors would still help but it could be just a typo.

    LVL 7

    Accepted Solution

    Hello, thanks for replying!
    The initial problem (in an array of problems) was that I would not get an error, the app would extract, and then crash. So then after some testing with your last post, but noticed the text files was not created at all. So I gave up with iexpress, which I conclude is just not built for this sort of thing.

    Another post on EE mentioned using ZIP-2-Secure. At first, I could not get this app to work, but after a few extra tries, all is great.
    Thanks for your help anyway!

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
    Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
    Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now