Archive: Call of a command of the console, without bat-file


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.

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.


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?

One option is use the nsExec plugin instead of ExecWait. (It's included with the base NSIS install.)


Thanks all! You have very much helped me :)