Mount iso files using winarchive

Discuss and share scripts and script files...
kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post 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.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Mount iso files using winarchive

Post by highend »

You already have a script with similar features posted by Stefan. Look up the necessary commands and adapt it...
One of my scripts helped you out? Please donate via Paypal

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post by kotlmg »

sir,
i am not able to adapt it. if you have time, please give the modified code.

thanks

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Mount iso files using winarchive

Post by highend »

if you have time
Too many other things to do, sorry...
One of my scripts helped you out? Please donate via Paypal

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post by kotlmg »

thanks

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post 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.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Mount iso files using winarchive

Post 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""");
One of my scripts helped you out? Please donate via Paypal

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post 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.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Mount iso files using winarchive

Post by highend »

Code: Select all

runret("""$wamcd"" mount ""<curitem>"" ""$drive""");
One of my scripts helped you out? Please donate via Paypal

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post by kotlmg »

thanks a lot sir. now the code is working.

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post 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?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Mount iso files using winarchive

Post 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...
One of my scripts helped you out? Please donate via Paypal

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post by kotlmg »

this coding (by using gettoken or by regexmatches and extract the ) will be beyond my capacity.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Mount iso files using winarchive

Post by highend »

Then you (maybe) have to live with the current solution
One of my scripts helped you out? Please donate via Paypal

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: Mount iso files using winarchive

Post by kotlmg »

i also felt happy with the present code itself.

Post Reply