Page 1 of 1

help to conver batch to script

Posted: 28 Mar 2013 20:02
by yusef88

Code: Select all

"C:\Program Files\TrueCrypt\TrueCrypt.exe" /a /q /b /l z /p pass d:\file &"%programfiles%\XYplorer\XYplorer.exe" Z:\
works fine as .bat file but doesn't work as script

Re: help to conver batch to script

Posted: 28 Mar 2013 20:31
by highend
Just guessing:

Code: Select all

run """C:\Program Files\TrueCrypt\TrueCrypt.exe"" /a /q /b /l z /p pass d:\file ""%programfiles%\XYplorer\XYplorer.exe"" Z:\";
Didn't try it...

Re: help to conver batch to script

Posted: 28 Mar 2013 21:18
by yusef88
unfortunately it did not work, but the first part of code works in XY

Code: Select all

"C:\Program Files\TrueCrypt\TrueCrypt.exe" /a /q /b /l z /p pass d:\file
what i need after mounting open drive Z in XY

Code: Select all

"%programfiles%\XYplorer\XYplorer.exe" Z:\
the question is how to make these two commands work together?

Re: help to conver batch to script

Posted: 28 Mar 2013 21:35
by highend

Code: Select all

  run """C:\Program Files\TrueCrypt\TrueCrypt.exe"" /a /q /b /l z /p pass d:\file", , 1;
  goto "Z:\";
Does TrueCrypt automatically end after invoking this command?
If not, remove the ", , 1" part from it.

Additionally a small loop would be beneficial to wait until drive Z: exist...

?

Re: help to conver batch to script

Posted: 28 Mar 2013 21:46
by yusef88
thanks Mr highend it works :appl:
another request please i want drive z open in new tab if possible

Re: help to conver batch to script

Posted: 28 Mar 2013 21:54
by highend

Code: Select all

  run """C:\Program Files\TrueCrypt\TrueCrypt.exe"" /a /q /b /l z /p pass d:\file", , 1;
  tab("new", "Z:\");

Re: help to conver batch to script

Posted: 28 Mar 2013 22:03
by yusef88
highend wrote:

Code: Select all

  run """C:\Program Files\TrueCrypt\TrueCrypt.exe"" /a /q /b /l z /p pass d:\file", , 1;
  tab("new", "Z:\");
done well, thanks a lot.

Re: help to conver batch to script

Posted: 30 Mar 2013 01:28
by yusef88
i came for the second time and I am ashamed of you, promise this is the last request
what about this batch?

Code: Select all

"%PROGRAMFILES%\WinRAR\rar.exe" u -r -m3 -ep1 -hp "%USERPROFILE%\Desktop\firefox-backup %DATE:~7,2%-%DATE:~4,2%-%DATE:~10,4% .rar" "%APPDATA%\Mozilla\Firefox"

Re: help to conver batch to script

Posted: 30 Mar 2013 06:51
by highend

Code: Select all

$dstFile = "%USERPROFILE%\Desktop\firefox-backup " . formatdate(, "dd-mm-yyyy") . " .rar";
	run """%PROGRAMFILES%\WinRAR\rar.exe"" u -r -m3 -ep1 -hp ""$dstFile"" ""%APPDATA%\Mozilla\Firefox""";
If you don't want the spaces in the destination file name, remove them in the first and the last quote (on the first line).

Re: help to conver batch to script

Posted: 30 Mar 2013 08:31
by yusef88
highend wrote:

Code: Select all

$dstFile = "%USERPROFILE%\Desktop\firefox-backup " . formatdate(, "dd-mm-yyyy") . " .rar";
	run """%PROGRAMFILES%\WinRAR\rar.exe"" u -r -m3 -ep1 -hp ""$dstFile"" ""%APPDATA%\Mozilla\Firefox""";
If you don't want the spaces in the destination file name, remove them in the first and the last quote (on the first line).
excellent,Thank you very much

Re: help to conver batch to script

Posted: 02 Sep 2014 20:25
by yusef88
hi

Code: Select all

"cmd" /k reg export "HKEY_CURRENT_USER\Software\DownloadManager" "%USERPROFILE%\Desktop\idm downloads.reg"
how make it works? and instead of "%USERPROFILE%\Desktop" i want it current path

Re: help to conver batch to script

Posted: 03 Sep 2014 07:48
by highend

Code: Select all

run """%COMSPEC%"" /c reg export ""HKEY_CURRENT_USER\Software\DownloadManager"" ""<curpath>\idm downloads.reg""", , 1, 0;
I've replaced /k with /c...

Re: help to conver batch to script

Posted: 03 Sep 2014 10:45
by yusef88
grateful to you :D