Topic: Running VEdit from a Flash Drive (1 of 18), Read 27 times
Conf: Installation, Configuration
From: Walt Pattinson
Date: Saturday, September 10, 2005 03:40 PM

I'm attempting to configure VEdit to run off a Flash Drive but having some difficulties. Because one rarely knows what the drive letter is going to be, is there any way to allow VEdit to use a 'variable' form for a path -- like an environment variable? The %val% form doesn't seem to be implemented.

Is there a list of required files anywhere? Recommended files?

Thanks
Walt

I find it interesting that the spell checker doesn't know the term "VEdit". Gave me a giggle today...

 


Topic: Re: Running VEdit from a Flash Drive (2 of 18), Read 23 times
Conf: Installation, Configuration
From: Ted Green
Date: Saturday, September 10, 2005 03:58 PM

At 03:40 PM 9/10/2005, you wrote:
>I'm attempting to configure VEdit to run off a Flash Drive but having some difficulties. Because one rarely knows what the drive letter is going to be, is there any way to allow VEdit to use a 'variable' form for a path -- like an environment variable? The %val% form doesn't seem to be implemented.

Walt:

Just yesterday I was thinking about how to run VEDIT from a flash drive. While the old DOS version could check an environment variable to determine its location, this was discontinued in the Windows version.

However, there needs to be a better way yet as even the environment variable would be to static. I'll think about it, but perhaps someone else has ideas too.

Have you tried simply removing the drive specs from the vedit.ini file.

Ted.

 


Topic: Re: Running VEdit from a Flash Drive (3 of 18), Read 25 times
Conf: Installation, Configuration
From: Walt Pattinson
Date: Sunday, September 11, 2005 12:47 AM

I thought of trying that, but didn't do it earlier.

So I copied VEdit to a new drive (a secondary hard disk in this case), removed the drive letters from vedit.ini and it does work as long as I invoke vedit while the current drive is active. Otherwise I get the error
"The file regvedit.vdm was not found or is obsolete"

and vedit opens without being initialized via startup.vdm but still editing the file.

Add the path to PATH and same as above.

I'm starting VPW.EXE from the command line in this case. If I point ZTree to VPW as an editor, same -- works if the file is on the same drive, doesn't if a different drive.

Maybe allowing a %VAL% path would be a good way to handle it. It follows the standard Windows system form.

If you decide to go this route, I'd suggest not defining a specific value such as %VEDIT% but let it be user defined for flexibility, allowing definitions such as
MacroDir=%UTIL%\macros

Walt

 


Topic: Re: Running VEdit from a Flash Drive (4 of 18), Read 28 times
Conf: Installation, Configuration
From: Ted Green
Date: Sunday, September 11, 2005 12:57 AM

At 12:47 AM 9/11/2005, you wrote:
>I thought of trying that, but didn't do it earlier.
>
>So I copied VEdit to a new drive (a secondary hard disk in this case), removed the drive letters from vedit.ini and it does work as long as I invoke vedit while the current drive is active. Otherwise I get the error
>"The file regvedit.vdm was not found or is obsolete"
>and vedit opens without being initialized via startup.vdm but still editing the file.
>
>If you decide to go this route, I'd suggest not defining a specific value such as %VEDIT% but let it be user defined for flexibility, allowing definitions such as
>MacroDir=%UTIL%\macros

I still don't see how that would help; you would need to change the environment variable to the drive letter of the flash drive, which might change.

VEDIT certainly knows what drive letter of the vpw.exe. Therefore,
perhaps if no drive is specified in the vedit.ini file, it would imply the same drive as the vpw.exe file. This could even be the default, since it is rare to have the vedit directories on different drives.

Ted.

 


Topic: Re: Running VEdit from a Flash Drive (5 of 18), Read 28 times
Conf: Installation, Configuration
From: Christian Ziemski
Date: Sunday, September 11, 2005 11:48 AM

On Sun, 11 Sep 2005 12:57:00 -0400, Ted Green wrote:

>VEDIT certainly knows what drive letter of the vpw.exe. Therefore,
>perhaps if no drive is specified in the vedit.ini file, it would
>imply the same drive as the vpw.exe file.
>This could even be the default, since it is rare to
>have the vedit directories on different drives.


I tried it myself now:

1.) installed a fresh VEDIT onto a Flash Drive

2.) removed all drive letters from VEDIT.INI:
UserCfgDir=\vedit
;
HomeDir=\vedit
BackupDir=\vedit\backup
MacroDir=\vedit\macros
UserMacroDir=\vedit\user-mac
FileCfgDir=\vedit\file-cfg
ProjectDir=\vedit\projects
VeditTempDir=\vedit\temp

3.) called the new VPW.EXE from different locations

That gave several different effects/errors about missing files/paths,
like Walt described earlier.

The reason seems to be:

VEDIT really know where its executable is:
The variable VEDIT_EXE holds the complete path of it.

But VEDIT leaves the Config_Strings untouched as:
HOME "\vedit"
MACRO "\vedit\macros"
BACKUP "\vedit\backup"
VEDIT_TEMP "\vedit\temp"
FILE_CFG "\vedit\file-cfg"
USER_CFG "\vedit"
USER_MACRO "\vedit\user-mac"
VEDIT_INI "\vedit\vedit.ini"
PROJECTS "\vedit\projects"

and so doesn't find some files: It seems to use the drive letter of
the currently loaded(!) file in combination with the pathes above?!

So I wrote a macro that completes those config strings with the drive
letter of the vpw.exe.

Probably it's not written very elegant, but it works if executed just
after VEDIT started (for example called in STARTUP.VDM).

http://www.ziemski.net/vedit/macros/set_vpw_dir.vdm

Christian

 


Topic: Re: Running VEdit from a Flash Drive (6 of 18), Read 28 times
Conf: Installation, Configuration
From: Christian Ziemski
Date: Sunday, September 11, 2005 12:06 PM

On Sun, 11 Sep 2005 11:48:00 -0400, I wrote:

>So I wrote a macro that completes those config strings with the drive
>letter of the vpw.exe.
>
>Probably it's not written very elegant, but it works if executed just
>after VEDIT started (for example called in STARTUP.VDM).
>
>http://www.ziemski.net/vedit/macros/set_vpw_dir.vdm


Ooops, it doesn't always work.

VEDIT seems to check/execute REGVEDIT.VDM at startup before any other
macro and so my above trick doesn't prevent *that* call from failing.

One workaround may be to call VEDIT via a little .CMD batch.
I'm testing ...

Christian

 


Topic: Re: Running VEdit from a Flash Drive (7 of 18), Read 30 times
Conf: Installation, Configuration
From: Christian Ziemski
Date: Sunday, September 11, 2005 12:35 PM

Follow up:

>Ooops, it doesn't always work.
>
>VEDIT seems to check/execute REGVEDIT.VDM at startup before any
>other macro and so my above trick doesn't prevent *that* call
>from failing.
>
>One workaround may be to call VEDIT via a little .CMD batch.
>I'm testing ...

Here the CMD file:


@echo off
::
:: Get the Drive letter of this batch file itself
:: (assuming it's on the same drive as VEDIT).
FOR /F "tokens=1 delims=: " %%i in ("%0") do set d=%%i
::
:: Call VEDIT with this drive as starting drive.
:: That makes VEDIT run (in combination with set_vpw_dir.vdm)
:: But: The commandline parameters (filenames) are *not*
:: passed correctly to VEDIT if they are relative (without drive).
::
start /D%d%: %d%:\vedit\vpw.exe %*



Put it into the VEDIT home dir on the flash drive and call it instead
of the vpw.exe.

As written in the comments it's still not perfect since filenames as
command line parameters has to be full qualified inclusive drive
letter.

It *is* only a workaround.
I think VEDIT itself has to be modified a bit to make it work easier.


But now I'm running out of time. It's weekend - almost over...

Christian

 


Topic: Re: Running VEdit from a Flash Drive (8 of 18), Read 32 times
Conf: Installation, Configuration
From: Ian Binnie
Date: Sunday, September 11, 2005 08:55 PM

I have been watching this discussion with interest.
I had contemplated a Flash version of Vedit (as well as ZTreeWin - my other indispensable programs).

If Vedit is modified to make this possible, an other factor to consider is Vedit.ini.

This is currently rewritten (every time Vedit exists?).

This is undesirable, as the history is of no interest if the Flash is moved, and an option prevent this would be useful.
(It could always be marked as RO.)

I believe that frequent rewriting of Flash drives is undesirable - not sure if this is true.

 


Topic: Re: Running VEdit from a Flash Drive (9 of 18), Read 33 times
Conf: Installation, Configuration
From: Ted Green
Date: Sunday, September 11, 2005 09:50 PM

At 08:55 PM 9/11/2005, you wrote:
>If Vedit is modified to make this possible, an other factor to consider is Vedit.ini.
>
>This is currently rewritten (every time Vedit exists?).
>
>This is undesirable, as the history is of no interest if the Flash is moved, and an option prevent this would be useful.
>(It could always be marked as RO.)

That is a good point. We could probably add an item to the vedit.ini
to indicate it is Read-only.

Ted.

 


Topic: Re: Running VEdit from a Flash Drive (10 of 18), Read 32 times
Conf: Installation, Configuration
From: Walt Pattinson
Date: Monday, September 12, 2005 01:01 AM

On 9/11/2005 8:55:33 PM, Ian Binnie wrote:
>I have been watching this
>discussion with interest.
>I had contemplated a Flash
>version of Vedit (as well as
>ZTreeWin - my other
>indispensable programs).

Ian,
ZTree should offer no trouble. Many are using it on flash drives now. AAMOF, in the configuration for external programs, the %var% form works as expected. Tried it last night.

Walt

 


Topic: RE: Running VEdit from a Flash Drive (11 of 18), Read 35 times
Conf: Installation, Configuration
From: Lowell Dennis
Date: Monday, September 12, 2005 10:05 AM

Guys,

If you don't mind using the windows "Autorun" feature, it would be a
simple matter of writing a batch file that changes the environment
variable when the FLASH drive is installed. Or am I missing something?


- Lowell

-----Original Message-----
From: vtech-install-config Listmanager
[mailto:vtech-install-config.listmanager@...]
Sent: Sunday, September 11, 2005 11:36 AM
Subject: Re: Running VEdit from a Flash Drive

From: "Christian Ziemski"

Follow up:

>Ooops, it doesn't always work.
>
>VEDIT seems to check/execute REGVEDIT.VDM at startup before any other
>macro and so my above trick doesn't prevent *that* call from failing.
>
>One workaround may be to call VEDIT via a little .CMD batch.
>I'm testing ...

Here the CMD file:


@echo off
::
:: Get the Drive letter of this batch file itself
:: (assuming it's on the same drive as VEDIT).
FOR /F "tokens=1 delims=: " %%i in ("%0") do set d=%%i
::
:: Call VEDIT with this drive as starting drive.
:: That makes VEDIT run (in combination with set_vpw_dir.vdm)
:: But: The commandline parameters (filenames) are *not*
:: passed correctly to VEDIT if they are relative (without drive).
::
start /D%d%: %d%:\vedit\vpw.exe %*



Put it into the VEDIT home dir on the flash drive and call it instead
of the vpw.exe.

As written in the comments it's still not perfect since filenames as
command line parameters has to be full qualified inclusive drive
letter.

It *is* only a workaround.
I think VEDIT itself has to be modified a bit to make it work easier.


But now I'm running out of time. It's weekend - almost over...

Christian




To reply: mailto:vtech-install-config.19272@...
To start a new topic: mailto:vtech-install-config@...
To login: http://...
To (un)subscribe: mailto:
vtech-install-config.list-request@...

 


Topic: RE: Running VEdit from a Flash Drive (12 of 18), Read 35 times
Conf: Installation, Configuration
From: Ted Green
Date: Monday, September 12, 2005 10:57 AM

At 10:07 AM 9/12/2005, you wrote:
>If you don't mind using the windows "Autorun" feature, it would be a
>simple matter of writing a batch file that changes the environment
>variable when the FLASH drive is installed. Or am I missing something?

Lowell:

You are correct; I just don't know how to determine what "my" drive letter is. Could you write the batch file for us please? :-))

Ted.

 


Topic: RE: Running VEdit from a Flash Drive (13 of 18), Read 34 times
Conf: Installation, Configuration
From: Christian Ziemski
Date: Monday, September 12, 2005 11:05 AM

On 9/12/2005 10:57:20 AM, Ted Green wrote:
>
>Lowell:
>
>You are correct; I just don't know how to determine what
>"my" drive letter is. Could you write the batch file for
>us please? :-))

Doesn't do my earlier one do that job?

@echo off
::
:: Get the Drive letter of this batch file itself
:: (assuming it's on the same drive as VEDIT).
FOR /F "tokens=1 delims=: " %%i in ("%0") do set d=%%i

%D% contains the drive letter then.

Christian

 


Topic: RE: Running VEdit from a Flash Drive (14 of 18), Read 34 times
Conf: Installation, Configuration
From: Lowell Dennis
Date: Monday, September 12, 2005 11:25 AM

I sent my e-mail before reading Christians post ... As he says, his
script should "do the job"!

Here is perhaps a simpler one. It does not use any parameters and gets
its information from the current directory, '.'.

for /D %i in (.) do set d=%~di

- Lowell

-----Original Message-----
From: vtech-install-config Listmanager
[mailto:vtech-install-config.listmanager@...]
Sent: Monday, September 12, 2005 10:06 AM
Subject: RE: Running VEdit from a Flash Drive

From: "Christian Ziemski"

On 9/12/2005 10:57:20 AM, Ted Green wrote:
>
>Lowell:
>
>You are correct; I just don't know how to determine what "my" drive
>letter is. Could you write the batch file for us please? :-))

Doesn't do my earlier one do that job?

@echo off
::
:: Get the Drive letter of this batch file itself
:: (assuming it's on the same drive as VEDIT).
FOR /F "tokens=1 delims=: " %%i in ("%0") do set d=%%i

%D% contains the drive letter then.

Christian



To reply: mailto:vtech-install-config.19280@...
To start a new topic: mailto:vtech-install-config@...
To login: http://...
To (un)subscribe: mailto:
vtech-install-config.list-request@...

 


Topic: Re: Running VEdit from a Flash Drive (15 of 18), Read 34 times
Conf: Installation, Configuration
From: Christian Ziemski
Date: Monday, September 12, 2005 04:15 PM

On Mon, 12 Sep 2005 11:25:00 -0400, Lowell Dennis wrote:

>Here is perhaps a simpler one. It does not use any parameters
>and gets its information from the current directory, '.'.
>
>for /D %i in (.) do set d=%~di

Nice one!
Now I know who to ask regarding batch tricks!

Christian

 


Topic: Re: Running VEdit from a Flash Drive (16 of 18), Read 36 times
Conf: Installation, Configuration
From: Ted Green
Date: Monday, September 12, 2005 04:26 PM

At 04:16 PM 9/12/2005, you wrote:
>>Here is perhaps a simpler one. It does not use any parameters
>>and gets its information from the current directory, '.'.
>>
>>for /D %i in (.) do set d=%~di
>
>Nice one!
>Now I know who to ask regarding batch tricks!

(To the melody of "Its beginning to look a lot like Christmas")

Its beginning to look a lot like Unix. :-)

Its almost scary that anyone can understand this, much less write it. :-))

These comment notwithstanding, Thank You!

Ted.

 


Topic: Re: Running VEdit from a Flash Drive (17 of 18), Read 37 times
Conf: Installation, Configuration
From: Christian Ziemski
Date: Monday, September 12, 2005 05:07 PM

On Mon, 12 Sep 2005 16:26:00 -0400, Ted Green wrote:

>>>for /D %i in (.) do set d=%~di
>
>(To the melody of "Its beginning to look a lot like Christmas")
>
>Its beginning to look a lot like Unix. :-)

>Its almost scary that anyone can understand this,
>much less write it. :-))

Agreed!

The CMD shell of Windows may have learned much over the last years
(from UNIX too), but the syntax is unbelievable horrible.
That is especially true for the feature-blasted FOR command!


Christian

 


Topic: RE: Running VEdit from a Flash Drive (18 of 18), Read 40 times
Conf: Installation, Configuration
From: Lowell Dennis
Date: Tuesday, September 13, 2005 09:34 AM

Ted, Christian,

You are exactly right. It is cryptic (ala UNIX). The FOR command in
the CMD shell is very convoluted. I actually learned this particular
construct from a friend of mine a couple years back and kept it in my
"tips and tricks" toolbox just in case I would ever need it. I actually
do understand how it works (what does that say about me), but I am not
sure I would have ever been able to come up with it on my own. My
original version looked much more like Christian's.

- Lowell

-----Original Message-----
From: vtech-install-config Listmanager
[mailto:vtech-install-config.listmanager@...]
Sent: Monday, September 12, 2005 4:08 PM
Subject: Re: Running VEdit from a Flash Drive

From: "Christian Ziemski"

On Mon, 12 Sep 2005 16:26:00 -0400, Ted Green wrote:

>>>for /D %i in (.) do set d=%~di
>
>(To the melody of "Its beginning to look a lot like Christmas")
>
>Its beginning to look a lot like Unix. :-)

>Its almost scary that anyone can understand this, much less write it.
>:-))

Agreed!

The CMD shell of Windows may have learned much over the last years (from
UNIX too), but the syntax is unbelievable horrible.
That is especially true for the feature-blasted FOR command!


Christian



To reply: mailto:vtech-install-config.19284@...
To start a new topic: mailto:vtech-install-config@...
To login: http://...
To (un)subscribe: mailto:
vtech-install-config.list-request@...