help to conver batch to script

Discuss and share scripts and script files...
Post Reply
yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

help to conver batch to script

Post 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

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: help to conver batch to script

Post 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...
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: help to conver batch to script

Post 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?

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: help to conver batch to script

Post 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...

?
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: help to conver batch to script

Post by yusef88 »

thanks Mr highend it works :appl:
another request please i want drive z open in new tab if possible

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: help to conver batch to script

Post 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:\");
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: help to conver batch to script

Post 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.

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: help to conver batch to script

Post 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"

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: help to conver batch to script

Post 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).
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: help to conver batch to script

Post 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

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: help to conver batch to script

Post 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

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: help to conver batch to script

Post 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...
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: help to conver batch to script

Post by yusef88 »

grateful to you :D

Post Reply