Jump to content
Sign in to follow this  

Problem with Run() and filename with space...

Recommended Posts



I'm writing a script to automate the volume creation of an encrypted container with TrueCrypt. I'm almost done, but I have a bug/feature that prevents me from launching the required application.

I'm trying to launch "C:\Program Files\Truecrypt\TrueCrypt Format.exe", but instead, "C:\Program Files\Truecrypt\TrueCrypt.exe" is launched... If I move TrueCrypt.exe to another folder, then "TrueCrypt Format.exe" is launched, as expected...

Is there something I'm doing wrong?

My script:

$tcVolumeCreatorFullPath = "C:\Program Files\Truecrypt\TrueCrypt Format.exe"


; 00 - Launch TrueCrypt Format application


If Run($tcVolumeCreatorFullPath) = 0 Then

Exit $exitCodeLaunchTC


Share this post

Link to post
Share on other sites

@im4matik...Check the helpfile for ShellExecute...

ShellExecute ( "filename" [, "parameters" [, "workingdir" [, "verb" [, showflag]]]] )


Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.