It is currently Sat Oct 25, 2014 9:58 pm

All times are UTC - 8 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ] 
Author Message
 Post subject: Installing to USB Drive and writing to program directory
PostPosted: Thu Sep 18, 2008 9:53 am 
Offline

Joined: Thu Sep 18, 2008 8:32 am
Posts: 7
I'm trying to install a small program into UBCD, installed on a USB drive, so that it can write back to it's directory. I've put the program in the DOSAPPS directory, and I think that part of it is OK (I'm not sure, I've never gone this far in customizing UBCD). The second problem is that this program needs a VERY lean DOS environment, with no drivers, no Config.sys, and nothing in the Autoexec.bat. I tried making my own lean boot image, and run the program using it, but it's not working. I put a start.bat in the DOSAPPS\myprogram directory. Does the lean.img need anything special in it to run the program? Thanks for any help!


Top
 Profile  
 
 Post subject: Re: Installing to USB Drive and writing to program directory
PostPosted: Thu Sep 18, 2008 1:02 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
CBailey wrote:
I'm trying to install a small program into UBCD, installed on a USB drive, so that it can write back to it's directory. I've put the program in the DOSAPPS directory, and I think that part of it is OK (I'm not sure, I've never gone this far in customizing UBCD).

Sounds good.

CBailey wrote:
The second problem is...

What exactly is your first problem??? q-:
CBailey wrote:
...that this program needs a VERY lean DOS environment, with no drivers, no Config.sys, and nothing in the Autoexec.bat.

The image is designed to run so as to allow the user to customise the set-up; if you don't want to install a module, simply select cancel when it prompts you to install (e.g. cdrom, udma, lfn etc). Alternatively, select "Clean boot" and run the program from the command prompt.

CBailey wrote:
I tried making my own lean boot image, and run the program using it, but it's not working. I put a start.bat in the DOSAPPS\myprogram directory. Does the lean.img need anything special in it to run the program?

What's the program? Furthermore, what's in your startup.bat file?

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 1:23 pm 
Offline

Joined: Thu Sep 18, 2008 8:32 am
Posts: 7
Sorry, the first problem was figuring out how to run the program from a directory instead of an image. At least it was a problem for me :)


As for answering a whole bunch of prompts, I'd probably not make all those annoying prompts in time, and I'd wind up rebooting many times. This would eventually make me go mad, and I'd be committed. If I wanted hard, I'd just put it in a directory somewhere, and drop to a DOS prompt. I'm trying to make it EASY :) I'm very lazy. I want to do some work now, so it will be butter-smooth easy from now on.

The program is the paid version of Copyr DMA. The author recommends write access, and no drivers, himem.sys, etc...

This is my startup.bat:

cls
cd \dosapps\HDDup
HDDUP.EXE


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 1:38 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
No worries.

What we can do is reach a close approximation to your desired modus operandi.

Firstly, look for the file /etc/global.set. From there, you can configure how the associated modules behave. For example, to disable CD-ROM prompt AND to disable auto-installation, insert the following:
Code:
CDROM_INSTALL=0
CDROM_NCFG=1

This should disable any pop-ups during boot.

To further configure a minimal a boot as possible, you can edit /config.sys and set the menu to automatically prompt to your desired boot mode (e.g. Ultra-defensive). The only thing in memory should then be PERUSE (screen scroll-back program), HIMEM (extended memory manager), XMSDSK/SHSURDRV (ramdisk) and the command processor.

This should be minimal enough(?).

Finally, be sure to edit the isolinux menu so it matches the relative path of the program it is you're trying to launch.

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 1:46 pm 
Offline

Joined: Thu Sep 18, 2008 8:32 am
Posts: 7
Sounds good. Unfortunately, I need to get rid of himem, and preferably the other two as well. I've had a great deal of difficulty in compatibility with this program, and I'm trying to do exactly what the author recommends. He specifically mentioned no memory managers. Can these be disabled by default as well?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 1:57 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Hmm...you could get rid of PESUE easily enough. However, the boot disk requires a ramdisk driver, which in turn, relies on there being a memory manager present.

One solution would be to write your own boot disk with a custom config.sys and autoexec.bat. Would the program fit on a 1.44/2.88Mb image? If yes, transfer the everything onto a fresh boot disk, write the relevant config/autoexec files to launch and then transfer the image onto the CD. You can then launch the image using isolinux.

Does this make sense?

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 2:07 pm 
Offline

Joined: Fri Jan 11, 2008 2:52 pm
Posts: 1278
From where did you buy the program, it seems free to me.
CBailey wrote:
The program is the paid version of Copyr DMA. The author recommends write access, and no drivers, himem.sys, etc...

Quote:
COPYR.DMA is a free application for making copies of hard disks with bad sectors.

http://www.freedownloadscenter.com/Utilities/Backup_and_Copy_Utilities/COPYR_DMA.html
http://www.filetransit.com/view.php?id=29519

The original website isn't available.

EDIT: I looked over the sentence:
Quote:
The program is the paid version of Copyr DMA.

Sorry for bothering you.


Last edited by Icecube on Thu Sep 18, 2008 2:30 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 2:22 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Image

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 2:22 pm 
Offline

Joined: Thu Sep 18, 2008 8:32 am
Posts: 7
I don't think I understand. The program will easily fit in a 1.44 floppy image, but if it's in an image, I'm guessing I won't be able to write to to the image. With previous versions of this program, that's what I did. The author even included an image. With this version, he's telling me to install to a USB drive instead, and has a utility to do so. I think the program can save it's copying progress, and resume at a later time if interrupted. What I'm trying to do is put UBCD on a USB drive (Well, it's done already), and put this version on as well, with the same functionality as if it just ran by itself on a bootable USB drive.

Also, I don't remember the website, but HD Duplicator is Copyr DMA's big brother. Honestly :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 2:37 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
CBailey wrote:
I don't think I understand. The program will easily fit in a 1.44 floppy image, but if it's in an image, I'm guessing I won't be able to write to to the image.

True, but you should be able to save directly to the USB stick amirite? (-;

Put simply, create a boot disk which runs to your desired spec. For example, custom your boot disk should contain the following files...

Quote:
/kernel.sys (freedos kernel)
/command.com (command processor)
/autoexec.bat
/config.sys
/myapp.exe (your target binary)


modify autoexec.bat and config.sys to your liking. You should be able to direct any write operations to the USB stick directly (I forget which drive it would appear under).

You can prompt UBCD to launch the image by editing the isolinux menu to point to the image in question.

/custom/others.cfg
Code:
LABEL Copyr DMA
MENU LABEL Copyr DMA
KERNEL memdisk
APPEND initrd=/custom/copyrdma.img

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 2:57 pm 
Offline

Joined: Thu Sep 18, 2008 8:32 am
Posts: 7
I think the problem lies in the answer to "You should be able to direct any write operations to the USB stick directly". I have no control over what directory temp files are written to. The author designed the latest version to be on a bootable USB drive all by itself, and I assume writes to the current directory.

It's ironic. I've spent most of the morning making plugins for tons of apps for UBCD4Windows, and all my problems were because things got more complicated. Here, I realize I'm trying to do possibly one of the simplest things, yet the solution doesn't seem quite so easy :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 3:09 pm 
Offline

Joined: Fri Jan 11, 2008 2:52 pm
Posts: 1278
You can do the things that as702 says:

Make a floppy image with the following files:
Quote:
/kernel.sys (freedos kernel)
/command.com (command processor)
/autoexec.bat
/config.sys


Copy HDDUP.EXE to the USB stick (e.g.: /dosapps/hddup/hddup.exe).

Now when you boot the image from the USB stick, it will go to the prompt:
Type:
Quote:
X: ==> this is the drive letter of you USB stick (will be another letter)
cd dosapps\hddup
hddup.exe


@as702
Can't you give a autoexec.bat file that searches all available drives for the path /dosapps/hddup/, changes the current directory to it and runs hddup.exe. You can grab the right path from the memdisk command with getargs.com.

Download getargs.com from http://people.cs.uchicago.edu/~gmurali/gui/downloads.html.
This is needed to grab parameters that are added to the MEMDISK command.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 3:13 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
CBailey wrote:
I think the problem lies in the answer to "You should be able to direct any write operations to the USB stick directly". I have no control over what directory temp files are written to. The author designed the latest version to be on a bootable USB drive all by itself, and I assume writes to the current directory.

Maybe you can copy these said files using autoexec.bat after the program has finished??

CBailey wrote:
It's ironic. I've spent most of the morning making plugins for tons of apps for UBCD4Windows

UBCD4Windows=Pain in arse

(-:

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 3:19 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Icecube wrote:
@as702
Can't you give a autoexec.bat file that searches all available drives for the path /dosapps/hddup/, changes the current directory to it and runs hddup.exe. You can grab the right path from the memdisk command with getargs.com.

Yeah, I use a similar method in NwDsk for UBCD4.11 and UBCD5.0b5. It does requires ancillary utils such as xgrep.com and lmod.com, and may be considered overkill for this particular application.

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 3:33 pm 
Offline

Joined: Thu Sep 18, 2008 8:32 am
Posts: 7
Sounds good. Having the app on the drive, and just finding a way to find it sounds like a good solution. I'm not familiar with xgrep or lmod. Can these search drives for a specific file?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 3:45 pm 
Offline

Joined: Thu Sep 18, 2008 8:32 am
Posts: 7
This might make a long batch file, but is it possible to do something like :

If exist c:\hddup\hddup.exe then hddup.exe
if exist d:\hddup\hddup.exe then hddup.exe
if exist e:\hddup\hddup.exe then hddup.exe
....


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 3:47 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
CBailey wrote:
Sounds good. Having the app on the drive, and just finding a way to find it sounds like a good solution. I'm not familiar with xgrep or lmod. Can these search drives for a specific file?


Quite easily. For instance, suppose isolinux passes the following variable to memdisk as follows

Code:
UBCDCMD=HDDUP.EXE


Retreive it using getargs.com. Then, we'd do something like this...

Code:
dir /s /b %DRV%\ | xgrep -shy %UBCDCMD%$ | lmod set _tmp=[] >%tmp%\_tmp.bat
call %tmp%\_tmp.bat
call var set _path=full %_tmp%\..
cd %_path%
%UBCDCMD%

You'd need varset.com and var.bat. The above is a real simple example. %DRV% is your target drive (e.g. T:).

It retrieves the bare directory listing, searches for the binary, returns a match, generates a relative path and executes. You'd need to set a %tmp% directory for writing to (can eliminate disk-write by using nset.com).

Edit:
You can download lmod and varset (with instructions) from here
http://home.mnet-online.de/horst.muc/div.htm
xgrep.com from here
http://short.stop.home.att.net/freesoft/txtutil3.htm

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group