Page 2 of 2

Re: Mount iso files using winarchive

Posted: 09 May 2016 06:27
by kotlmg
hello sir, i am using the winarchiver program to mount and create iso files.
it has got the command line paramenters recently added.
C:\Program Files\WinArchiver\WinArchiver.exe
presently it got installed in the following folder
can you please give the xyplorer script for the following commands

mount
unmount drive
unmount all drives
set number of drives
extract
create
list all the virtual drives
Create archive from files or folders
Convert image file to other format


and also if one drive is already being used, it should not show that drive in the list of drives to be used for mounting purpose.

WinArchiver Command Line Parameters

Usage: wacmd <command> [parameters] [-switches]

<Commands>

listvd: List all virtual drives created by WinArchiver

setvdnum <n>: Set number of virtual drives. n is between 0 and 8.

Example: Set number of virtual drives to 1.

Command: wacmd setvdnum 1

mount <file name> <drive>: Mount archive to virtual drive.

Example: Mount d:\test.zip to drive F: .

Command: wacmd mount d:\test.zip F:

unmount <drive|all>: Unmount a virtual drive.

Example: unmount drive F: .

Command: wacmd unmount F:

Example: unmount all drives.

Command: wacmd unmount all

list <archive name> <directory>: List files and directorys in archive.

Example: List all files and directorys in root direcory of d:\test.zip recursively.

Command: wacmd list d:\test.zip / -r

extract <archive name> <dir/file name>: Extract file/directory from archive.

Example: Extract all files and directorys in root direcory of d:\test.zip to d:\temp recursively.

Command: wacmd extract d:\test.zip / -od d:\temp

convert <image file>: Convert image file to other format.

Example: Convert d:\test.iso to d:\test.xdi

Command: wacmd convert d:\test.iso -o d:\test.xdi

create: Create archive from files or folders.

Example: Create d:\test.zip from d:\test and d:\test.txt.

Command: wacmd create -o d:\test.zip -add d:\test / -add d:\test.txt /


thanks a lot in advance.

Re: Mount iso files using winarchive

Posted: 09 May 2016 07:53
by highend
You already have a script with similar features posted by Stefan. Look up the necessary commands and adapt it...

Re: Mount iso files using winarchive

Posted: 09 May 2016 15:48
by kotlmg
sir,
i am not able to adapt it. if you have time, please give the modified code.

thanks

Re: Mount iso files using winarchive

Posted: 09 May 2016 15:53
by highend
if you have time
Too many other things to do, sorry...

Re: Mount iso files using winarchive

Posted: 09 May 2016 16:39
by kotlmg
thanks

Re: Mount iso files using winarchive

Posted: 13 May 2016 03:54
by kotlmg
is there any person on this forum other than highend and stefan knowing the xyplorer script?

please give me code for the following line. rest of the code i will make on my own.

mount <file name> <drive>: Mount archive to virtual drive.

Re: Mount iso files using winarchive

Posted: 13 May 2016 10:21
by highend

Code: Select all

    $wamcd = "C:\Program Files\WinArchiver\wacmd.exe";
    $drive = inputselect("Mount on which drive?<crlf><curitem>", "L:\|M:\|N:\|O:\");
    runret("""$wamcd"" mount ""<curitem>"" ""$drive""");

Re: Mount iso files using winarchive

Posted: 13 May 2016 12:18
by kotlmg
"Mount..."
end( strpos("iso|bin|nrg|daa|cdi|zip|rar", "<curext>") == -1 ), "No ISO,BIN,NRG,DAA,CDI,ZIP AND RAR file selected, script ends.";
$wamcd = "C:\Program Files\WinArchiver\wacmd.exe";

$drive = inputselect("Mount on which drive?<crlf><curitem>", "G:\|H:\|I:\|K:\");
//$drive = inputselect("Mount on which drive?<crlf><curitem>", "G:|H:|I:|K:");
//runret("""$wamcd"" mount $drive");
runret("""$wamcd"" mount ""$drive""");

tab("new", $drive);


sir the above code is only opening the drive, but files are not being mounted.

Re: Mount iso files using winarchive

Posted: 13 May 2016 12:40
by highend

Code: Select all

runret("""$wamcd"" mount ""<curitem>"" ""$drive""");

Re: Mount iso files using winarchive

Posted: 13 May 2016 12:57
by kotlmg
thanks a lot sir. now the code is working.

Re: Mount iso files using winarchive

Posted: 13 May 2016 16:37
by kotlmg
the final working code with your kind guidance is as follows.

Code: Select all

"Mount..."
        end( strpos("iso|bin|nrg|daa|cdi|zip|rar", "<curext>") == -1 ), "No ISO,BIN,NRG,DAA,CDI,ZIP AND RAR file selected, script ends.";
        $wamcd = "C:\Program Files (x86)\WinArchiver\wacmd.exe";
                 
        //$drive = inputselect("Mount on which drive?<crlf><curitem>", "G:\|H:\|I:\|F:\");
  $drive = inputselect("Mount on which drive?<crlf><curitem>", "G:|H:|I:|F:");
  runret("""$wamcd"" mount ""<curitem>"" ""$drive""");
  //runret("""$wamcd"" mount ""$drive""");
             
        tab("new", $drive);


    //============================================


"Unmount..."
        $wamcd = "C:\Program Files (x86)\WinArchiver\wacmd.exe";
        $drive = inputselect("UnMount which drive?", "G:|H:|I:|F:");
  runret("""$wamcd"" unmount $drive");
  

    //============================================


"Un mount all !!!"
       $wamcd = "C:\Program Files (x86)\WinArchiver\wacmd.exe";
       runret("""$wamcd"" unmount ""all""");
       //============================================


"set no of drives to 1"
       $wamcd = "C:\Program Files (x86)\WinArchiver\wacmd.exe";
       runret("""$wamcd"" setvdnum 1");
       
       //============================================


"set no of drives to N"
       $wamcd = "C:\Program Files (x86)\WinArchiver\wacmd.exe";
       $drive1 = inputselect("Select No of drives", "2|3|4|5|6|7|8");
  //runret("""$wamcd"" setvdnum ""$drive1""");
       runret("""$wamcd"" setvdnum ""$drive1""");
       
only thing i could not automate is the drive letters are G, H, I and F in some particular pc. and in other it is K,L,M,N and their drive letters are go on changing upon insertion of more USB devices.sir, is there any way to automate the drive (max 8 no) selection?

Re: Mount iso files using winarchive

Posted: 13 May 2016 17:09
by highend
Sure. Parse the output of "wamcd.exe listvd", either by using gettoken or by regexmatches and extract the already used and non-used drives...

Re: Mount iso files using winarchive

Posted: 14 May 2016 04:31
by kotlmg
this coding (by using gettoken or by regexmatches and extract the ) will be beyond my capacity.

Re: Mount iso files using winarchive

Posted: 14 May 2016 04:53
by highend
Then you (maybe) have to live with the current solution

Re: Mount iso files using winarchive

Posted: 14 May 2016 07:06
by kotlmg
i also felt happy with the present code itself.