oh the confusion

i'm getting my setup program to work great in that it can copy the .EXE files to a place on the hard disk. the only thing is, when i put the program onto a floppy disk, the files are extracted not to the hard disk but onto the floppy disk, like its ignoring my CHDIR$ command.

hears how it goes...

my setup program displays a file path to the user, if he/she dont like it, they can change it.

The file path gets saved in a file for later use (it has to be used by a different program later on and the COMMON SHARED AS STRING wont work cos I have too many of them.)

After a few setup screens, the files are ready to be copied so I use the following code

OPEN Allocation FR NPUT AS #1
INPUT #1, UserDirectory$


CHDIR UserDirectory$ e.g. C:Progra`1 (program files)


Then the code copies the file from the current directory to the one set by the user.

This works fine as long as the setup program and the program to be moved are on the hard drive (i.e. C:ProgrammingQBASIC) but I simply click and drag the two files onto a floppy disk and the program still runs fine except that the files and the program are not put in the users allocation, theyre put on the floppy disk.

Anyone know why this is? Id put all my code in the message only its so big and there are 2 files. So if anyone wants to see the code then e-mail me at [email protected] note the files i'm talking about are compiled into .exe



  • [b][red]This message was edited by the walrus at 2003-11-3 16:46:57[/red][/b][hr]
    do this

    OPEN [b]UserDirectory$ + "" +[/b] FOR BINARY AS #1

    i think you can also change the drive using [b]CHDRIVE[/b] and then use [b]CHDIR[/b] if that's how you want to do it, but you don't really even need to use [b]CHDIR[/b], because you can just open the entire path + filename and do it all at once.

    (and I don't know how you've got [italic]UserDirectory$[/italic] stored, but if you've already got the "" at the end then do this instead: OPEN [b]UserDirectory$ + [/b] FOR BINARY AS #1)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion