Quantcast
Channel: Total Commander
Viewing all articles
Browse latest Browse all 18763

Eng :: RE: PowerISO - Parameters Command Line

$
0
0
Author: Skif_off
Posted: Sun Nov 27, 2016 2:14 am (GMT -6)

2Ovg
No, it's not bug, try:
Code:
piso create -o "d:\test.iso" -add "d:\test\folder" "/"
piso create -o "d:\test.iso" -add "d:\test\folder" "/folder"



2CZ.M
Try this script
Code:
' Command:    "path2script\PowerISOCreate.vbs" "path2PowerISO\piso.exe"
' Parameters: "%T" "%L"

If WScript.Arguments.Length <> 3 Then
  WScript.Echo "Check startup parameters!"
  WScript.Quit
End If

Dim sIsoName, sCmdLine, Str, Str2

sIsoName = InputBox("Enter name", "ISO name", "image")
If IsEmpty(sIsoName) Then
  WScript.Quit
End If

sCmdLine = """" & WScript.Arguments.Item(0) & """ create -o """ & WScript.Arguments.Item(1) & sIsoName & ".iso"""

Set WshShell = CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objRegExp = CreateObject("VBScript.RegExp")
objRegExp.Pattern = "\\$"

Set File = FSO.GetFile(WScript.Arguments.Item(2))
Set TextStream = File.OpenAsTextStream(1)
Str = vbNullString
While Not TextStream.AtEndOfStream
  Str2 = TextStream.ReadLine()
  If Right(Str2, 1) = "\" Then
    Str = Str & " -add """ & objRegExp.Replace(Str2, "") & """ ""/" & FSO.GetFileName(Str2) & """"
  Else
    Str = Str & " -add """ & Str2 & """ /"
  End If
Wend
TextStream.Close

WshShell.Run sCmdLine & Str, 1, False

Ok?

P.S. If you want add switches then you can add string before
Code:
WshShell.Run sCmdLine & Str, 1, False

Example: add "-udf on":
Code:
TextStream.Close

Str = Str & "-udf on"
WshShell.Run sCmdLine & Str, 1, False


Viewing all articles
Browse latest Browse all 18763

Trending Articles