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

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!
@ECHO OFF
@cls
 
::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 192.168.1.100 New_PC@Company.com
blat.exe c:\IP.txt -to computerhelp@company.com
 
::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
 
NET USER ADMINISTRATOR password
 
::Turn off the windows XP SP2 Firewall
 
NETSH FIREWALL SET OPMODE DISABLE
 
::Copy VNC to local PC
 
MD %WINDIR%\System32\RC
COPY WINVNC4.EXE %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
EXIT

Open in new window

LVL 7
ottobockAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

joolsCommented:
listing the errors you mentioned may help...
0
joolsCommented:
I found this which has a few tips in creating the exe.
   http://renegadetech.blogspot.com/2006/07/how-to-convert-bat-file-or-vbs-file.html
0
joolsCommented:
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.

0
ottobockAuthor Commented:
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.

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_23634444.html
Thanks for your help anyway!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.