and84
17th September 2008 06:10 UTC
Call of a command of the console, without bat-file
Hi all!
Question: How it is possible to create a macro, for call of the console with certain parametres?
My script works so:
I Write in bat - file
FileOpen$3 "$EXEDIR\\pack.bat" w
>#The command of the console 7z for file packing... Through variables (path and a filename)
>FileWrite $3 "7z a -tzip $EXEDIR\\$R8\\$R9zip $EXEDIR\\$R8\\$R3 -mx9"
>FileClose $3
>
then I start it...
ExecWait "$EXEDIR\\pack.bat"
The command through the console is as a result fulfilled... As it is possible to make it without bat - file
Thanks.
kichik
17th September 2008 06:30 UTC
You can directly execute 7z. There's no need for a batch file in the way. Instead of ExecWait'ing $EXEDIR\pack.bat, ExecWait 7z directly.
and84
17th September 2008 20:26 UTC
Thanks...
All has turned out...
Still a question: whether It is possible to hide a pop-up window of the console?
I do so:
Banner::show /NOUNLOAD /set 76 "Paking file..." ""
Banner::getWindow /NOUNLOAD
Pop$1
GetDlgItem$2 $1 1030
SendMessage$2 ${WM_SETTEXT} 0 "STR:Please wait..."
DetailPrint "Packing - $R3..."
StrCmp $R8 '' 0 long
ExecWait '7z a -tzip $EXEDIR\\Files.zip\$R3.zip $EXEDIR\$R3 -mx9'
Banner::destroy
>
It would be desirable that the console did not appear or would be curtailed and simply the banner hung... It is possible?
Comperio
17th September 2008 20:33 UTC
One option is use the nsExec plugin instead of ExecWait. (It's included with the base NSIS install.)
and84
17th September 2008 23:36 UTC
Thanks all! You have very much helped me :)