Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PGP encryption and FTP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01210392
Message ID:
01218928
Views:
27
Hey Christof (or anyone):

>In my FPDOS application I use GnuPG (http://www.gnupg.org/) for that. It can be called from the command line using RUN, ShellExecute or CreateProcess. The command line to encrypt files looks like this:
>
>
>lcCmd = AddBSEx(paConfig[2]) + [GPG.EXE --default-recipient "] + ;
>    paConfig[6 ] + [" --batch -o "] + m.tcEncFile + [" -e "] + m.tcFile + ["]
>
I'm attempting to use this, calling with ShellExecute(), but am having problems when the path to the directory contains spaces and I don't hard code the directory path. In particular, this code works...
RETURN ShellExecute( 0, ;
					"Open", ;
					"gpg.exe", ;
   					[--default-recipient ADP ] +  [-o d:\Output.txt ] + [-e d:\20070417_092825_TX-7359_PAYROLL_TCPAYROLL_001-000.txt], ;
   					"C:\Program Files\GNU\GnuPG\", ;
   					1 )
while this code does not...
		RETURN ShellExecute( 0, ;
						"Open", ;
						"gpg.exe", ;
	   					[--default-recipient ] + lcGPGRecipient +  [ -o "] + tcOutput + [" -e "] + tcFileToEncrypt + ["], ;
	   					lcPathToGPG, ;
	   					1 )
I've assured that lcPathToGPG is the correct path and contains quotes. Although this would appear to be a ShellExecute issue, I've also tried the RUN command, but it also seems to have problems with pathnames that include spaces.

Anyone see right off what the deal is here?
Del
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform