Digg this topic Add to my del.icio.us Submit to SlashDot 2 Pages V  < 1 2  
Reply to this topicStart new topic
> International FORMAT "Y", (looking from info from people with NON-English 2K/XP)
psc
post Oct 8 2007, 07:50 PM
Post #11


Guru
***

Group: .script developer
Posts: 3,076
Joined: 14-July 06
From: Korschenbroich, Germany
Member No.: 3


Germany


QUOTE(jaclaz @ Oct 8 2007, 09:44 PM) *
And you still have to see mine! (IMG:../forums/style_emoticons/default/wink.gif)

@psc

When and if you have time, can you test this on a German system?:
CODE

VDK.EXE Remove
SET Targetpln=testpsc.pln
SET PartType=01
SET Filesystem=FAT
VDK.EXE VIEW %Targetpln%
ECHO.
FOR /F "tokens=1 delims= " %%A in ('VDK.EXE OPEN 0 %Targetpln% /RW^| FIND /I "%PartType%h:"') DO (
SET DRIVE=%%A
)
IF NOT DEFINED DRIVE GOTO :EOF

FOR /F "tokens=2,3 delims=(/)" %%A in ('ECHO ? ^| Format %Drive% /FS:%Filesystem% /Q /V:NO_NAME ^| FIND ")? ?"') DO (
SET YES_Letter=%%A
SET NO_Letter=%%B
)
ECHO %YES_Letter% is first letter of the word that means "Yes" in your language
ECHO %NO_Letter% is first letter of word that means "No" in your language
VDK.EXE Remove


It only works if the filesystem on the drive (an image in this case) has a RAW filesystem, which is exactly the case I need it for.

I am attaching the smallest possible semi-raw image mountable with VDK, and it's .pln descriptor file.

The snippet, the attached files and a copy of VDK.EXE and VDK.SYS should be in the same directory (unless you have VDK.EXE and VDK.SYS already in path).

Thank you in advance.

:http://www.boot-land.net/forums/index.php?showtopic=3229&pid=22289&st=0&#
Complete Editcheers:

jaclaz

@jaclaz

I usually trust you.
Can I do in this case, too?
No danger to format my system drive unintended?

Peter (IMG:../forums/style_emoticons/default/confused1.gif)
Go to the top of the page
 
+Quote Post
jaclaz
post Oct 9 2007, 08:28 AM
Post #12


Finder
***

Group: Advanced user
Posts: 1,140
Joined: 14-July 06
Member No.: 2


Italy


@psc
Well, no, for two reasons:
1) the drive letter is determined by the batch from output of VDK.EXE, which also makes sure that the mounted image has a partition entry for a 01 (FAT12) partition
2) a ? is fed to the FORMAT command, no actual formatting is performed, the only exception being if in some language the word that means Yes begins with a question mark, maybe Klingon or Ferengi could use it, but it is highly unprobable that an Earth language does so (IMG:../forums/style_emoticons/default/wink.gif)

The only side effect of this snippet could be if you already have an image running under VDK.EXE, as to make sure no conflicts arise the batch uninstalls VDK.EXE as first step, thus the already running image will be closed.

jaclaz
Go to the top of the page
 
+Quote Post
psc
post Oct 9 2007, 09:09 AM
Post #13


Guru
***

Group: .script developer
Posts: 3,076
Joined: 14-July 06
From: Korschenbroich, Germany
Member No.: 3


Germany


QUOTE(jaclaz @ Oct 9 2007, 10:28 AM) *
@psc
Well, no, for two reasons:
1) the drive letter is determined by the batch from output of VDK.EXE, which also makes sure that the mounted image has a partition entry for a 01 (FAT12) partition
2) a ? is fed to the FORMAT command, no actual formatting is performed, the only exception being if in some language the word that means Yes begins with a question mark, maybe Klingon or Ferengi could use it, but it is highly unprobable that an Earth language does so (IMG:../forums/style_emoticons/default/wink.gif)

The only side effect of this snippet could be if you already have an image running under VDK.EXE, as to make sure no conflicts arise the batch uninstalls VDK.EXE as first step, thus the already running image will be closed.

jaclaz

Here the result:
CODE

C:\scratch\Vdk>VDK.EXE Remove
Virtual Disk Driver for Windows version 3.1
http://chitchat.at.infoseek.co.jp/vmware/

The Virtual Disk Driver is not installed.


C:\scratch\Vdk>SET Targetpln=testpsc.pln

C:\scratch\Vdk>SET PartType=01

C:\scratch\Vdk>SET Filesystem=FAT

C:\scratch\Vdk>VDK.EXE VIEW testpsc.pln
Virtual Disk Driver for Windows version 3.1
http://chitchat.at.infoseek.co.jp/vmware/

Image Name : testpsc

Disk Capacity : 2016 sectors (0 MB)

Geometry : © 2 * (H) 16 * (S) 63

Number Of Files : 1



Type Size Path

------- ------- ----
FLAT 2016 C:\scratch\Vdk\testpsc.img

Partitions :

# Start Sector Length in sectors Type

-- ------------ --------------------- ----

0 0 2016 ( 0 MB)
1 63 1953 ( 0 MB) 01h:FAT12

C:\scratch\Vdk>ECHO.


C:\scratch\Vdk>FOR /F "tokens=1 delims= " %A in ('VDK.EXE OPEN 0 testpsc.pln /RW| FIND /I "01h:"') DO (SET DRIVE=%A )

C:\scratch\Vdk>(SET DRIVE=F: )

C:\scratch\Vdk>IF NOT DEFINED DRIVE GOTO :EOF

C:\scratch\Vdk>FOR /F "tokens=2,3 delims=(/)" %A in ('ECHO ? | Format F: /FS:FAT /Q /V:NO_NAME | FIND ")? ?"') DO (
SET YES_Letter=%A
SET NO_Letter=%B
)

C:\scratch\Vdk>(
SET YES_Letter=J
SET NO_Letter=N
)

C:\scratch\Vdk>ECHO J is first letter of the word that means "Yes" in your language
J is first letter of the word that means "Yes" in your language

C:\scratch\Vdk>ECHO N is first letter of word that means "No" in your language
N is first letter of word that means "No" in your language

C:\scratch\Vdk>VDK.EXE Remove
Virtual Disk Driver for Windows version 3.1
http://chitchat.at.infoseek.co.jp/vmware/

Closing the image on the virtual disk 0...The image is closed.

Closing the image on the virtual disk 1...The drive is empty.

Closing the image on the virtual disk 2...The drive is empty.

Closing the image on the virtual disk 3...The drive is empty.

Stopped the Virtual Disk Driver.

Uninstalled the Virtual Disk Driver.



Peter
Go to the top of the page
 
+Quote Post
jaclaz
post Oct 9 2007, 09:21 AM
Post #14


Finder
***

Group: Advanced user
Posts: 1,140
Joined: 14-July 06
Member No.: 2


Italy



QUOTE
C:\scratch\Vdk>ECHO J is first letter of the word that means "Yes" in your language

J is first letter of the word that means "Yes" in your language


C:\scratch\Vdk>ECHO N is first letter of word that means "No" in your language

N is first letter of word that means "No" in your language


Well, it works! (IMG:../forums/style_emoticons/default/yahoo.gif)

Thank you very much for this confirmation and for the suggestion to be "language independent" and to "feed" a ? to commands! (IMG:../forums/style_emoticons/default/worship.gif)

(IMG:../forums/style_emoticons/default/cheers.gif)

jaclaz
Go to the top of the page
 
+Quote Post
« Next Oldest · Boot Methods and various OS support · Next Newest »
 

2 Pages V  < 1 2
Fast ReplyReply to this topicStart new topic

 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

- Lo-Fi Version Time is now: 18th October 2007 - 01:02 PM

MKPortal ©2003-2006 mkportal.it