Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiled prog won't run on another PC 2

Status
Not open for further replies.

SmokinWrek

IS-IT--Management
Jun 20, 2002
36
US
I've got a fairly simple program that runs just fine in the IDE. It also runs fine as a compiled prog on my dev machine(WinME, but not by choice). However when I take it to the target machine(Win2K), it doesn't work properly.

The program is supposed to read in a block of CRLF terminated records, write them out, then write out a few more records based on data in that block, then repeat the process until it reaches EOF.

For testing purposes, I have a msgbox popping up to display the record length once the program determines the record length of the input file. The msgbox works when I run it on the target machine, so I know the prog is starting OK, but it never creates the output file!? After I click OK on the msgbox, the prog acts like it has finished processing and is ready for the next file.

The only control I'm using is the Common Dialog.

Can anyone clue me in as to what I'm doing or not doing to cause this?
 
Did you produce a program installation disk using the package and deployment manager, which ensures all supporting bits are there with the program, or did you just produce an .exe program? If people know a bit more you should get help.
 
I just made an EXE. I don't think I have the P&D manager installed.
 
Don't think you can do much more without it. However if you search the site you should see reference to Inno, etc ie other installers which are free products. I will have a look around, but someone else will probably put you on the track. I use a product called stand alone Xpress. I will find out the site for you. Its not free, but its very good, not very expensive, but wraps up you .exe together with all libraries etc that your program would need on its destination machine. Be back again
 
If you go into the keyword search on this site. Enter the words Memory Stick. Look for the threads under "Application on a memory stick", and you will see reference to stand alone. It was another forum user called Jag that sent me in their direction, and haven't looked back. Good luck
 
The Package and Deployment Wizard is under Add-ins. You're probably just not set up to load it by default so go into Add-in Manager and load it.

Either that or install your VB on a 2K machine and build the exe there.
 
OK...turns out I did have the P&D wizard installed, so I packaged it up, installed the package on my Win2K target machine, but the app acts the same way.
 
Thats good. Thanks rdroske, never thought to ask if P&D was available. You made him happy
 
If possible try running it on a machine with other than XP, 2K or NT (like Me or 9X).

I fit works then you may have a problem in the way you are accessing the input or output files. BTW: how are you accessing the files?

"Life is full of learning, and then there is wisdom"
 
As I said, it's just a simple program. I'm opening the input file for Input, and the output file for output. I'm using Line Input to read and Print to write out. When I read a line in, I put it into a string array [dim MyString() as String]. When I write, I write directly from the array [Print #2, MyString(3)]

Also, I tried this prog on another WinME machine, and it didn't work there either, even if I install the package make with the P&D Wizard.
 
Because the app is starting on the WIn2k box, your error handling is probably kicking in at some point. Have your error handler pop up a message box just to see that it's there. You might also add message boxes or some other mechanism to debug the program without having the IDE installed. It'll at least help narrow down where the problem lies.


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Directory you are writing to exists or is being created on target machine?
 
mirthiel:

I don't have an error handler per se, but I do a lot of data validation before it ever starts processing.


rdroske:

The directory I'm writing to already exists, and the file should be created when in Open it for Output.
 
Assuming you are logged in with enough rights that is, 2K can be picky about things like that.

An error handler would definitely help you here. Not hard to add an On error in the routine that writes this file and pop up a message box if it gets hit.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top