Jump to content

batch file not ending cmd window


Recommended Posts

After truecrypt mounts and clcl.exe starts the cmd window stays open even with exit at end, any ideas?

"C:\Documents and Settings\e38662\My Documents\TrueCrypt\TrueCrypt.exe" /v "F:\FDriveFiles" /l m /q

start /Dm:\Applications\CLCL /B /WAIT M:\Applications\CLCL\CLCL.exe

exit

Thanks

jjblack

Link to comment
Share on other sites


After truecrypt mounts and clcl.exe starts the cmd window stays open even with exit at end, any ideas?

"C:\Documents and Settings\e38662\My Documents\TrueCrypt\TrueCrypt.exe" /v "F:\FDriveFiles" /l m /q

start /Dm:\Applications\CLCL /B /WAIT M:\Applications\CLCL\CLCL.exe

exit

Thanks

jjblack

What is clcl.exe? :unsure:

If you start an app - and expecially with the /WAIT parameter - it will stay open until the called program ends execution.

BTW, NEVER use start without the "title" (or a pair of double quotes):

http://ss64.com/nt/start.html

it tend to give any kind of strange behaviour.

If you don't want the command console open you can use another program to start it minimized or hidden.

jaclaz

Link to comment
Share on other sites

clcl.exe is a clipboard saver.

Care to provide a link?

Is it this one?

http://www.nakka.com/soft/clcl/index_eng.html

do I need the /wait command in there?

Myabe yes, maybe not. :unsure:

If you start a GUI app (that waits for input) from a batch, the "parent" console will remain open, that's normal.

As said you can minimize or hide the console, but maybe there could be other ways to start the app.

Can you try stating what your actual GOAL is?

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Yes that is the site.

I want to put this batch file in my startup folder so that It will load Truecrypt, I will put my password in Truecrypt then it will load the container as "M drive". Then I want it to open clcl.exe which is located on the "M drive".

Thanks

Link to comment
Share on other sites

Which translates to:

I would like, each time I start my Windows, to have:

  • the command "C:\Documents and Settings\e38662\My Documents\TrueCrypt\TrueCrypt.exe" /v "F:\FDriveFiles" /l m /q

executed

  • and the GUI app CLCL

started (and the app is in the drive just mounted with truecrypt)

It is possible to use the Autoplay function of the Truecrypt volume:

http://www.ehow.com/how_7241339_autoplay-truecrypt-mounted-volume.html

But if I were you, I would use NIRCMD:

http://www.nirsoft.net/utils/nircmd.html

With a simple NIRCMD .ncl script, that executes the needed actions, like:

execmd "C:\Documents and Settings\e38662\My Documents\TrueCrypt\TrueCrypt.exe" /v "F:\FDriveFiles" /l m /q
exec2 show "M:\Applications\CLCL" "M:\Applications\CLCL\CLCL.exe"

Say that you call it myscript.ncl

you just create a shortcut to:

C:\whatever\nircmd.exe script myscript.ncl

and add it in the startup folder.

You may want to add a "wait" command to give some time to truecrypt to have the drive accessible.

jaclaz

Link to comment
Share on other sites

I got this batch file to work:

"C:\Documents and Settings\e38662\My Documents\TrueCrypt\TrueCrypt.exe" /v "F:\FDriveFiles" /l m /q

start "Clipboard" "M:\Applications\CLCL\CLCL.exe"

However if I add "background" to run Truecrypt in system tray then CLCL.exe will not load:

"C:\Documents and Settings\e38662\My Documents\TrueCrypt\TrueCrypt.exe" /v "F:\FDriveFiles" /l m /q background

start "Clipboard" "M:\Applications\CLCL\CLCL.exe"

Do I need brackets or quotes around /q background?

Thanks for your help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...