• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1053
  • Last Modified:

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

0
ottobock
Asked:
ottobock
  • 3
1 Solution
 
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now