Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Problem with system() command
Topic Summary: Not working as I'd expect
Created On: 30-Jan-2009 16:12
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 30-Jan-2009 16:12
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I'm attempting to encrypt a file with DXL.

system("end_user_protdxl.exe \"" sourceFile "\" > \"" destinationFile "\"");

This should work. I see a command line window flashing so I know its running the command. But the encrypted file isn't being created. Any have any ideas?

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 16:16
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

I know I am stating the obvious David, but does the source file start with the magic characters //<

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 16:21
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

File also has to be in ansi format -- unfortunately dxl editor saves in UTF-8 format.
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 16:47
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Tony. Yes it does. But from past experience, the encryption tool will still encrypt the file even without the //< in the beginning of the file. It just won't be readable by DXL when you try to run it.

And the file was not developed in the dxl editor. I am just writing a tool that will let me encrypt more than one file at a time so I don't have to type out tons of encrypt commands on the command line.

Problem here is just the system command for some reason not executing the command as the command line does. I copy and paste the string the system command is executing into the command line and it works.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 30-Jan-2009 at 16:50 by David Pechacek
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 16:50
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Don't know which version of encrypt you are running but it may have to be launched from command window. (i.e., Most if not all dxl encrypters are not windows applications.)

Edited: 30-Jan-2009 at 16:52 by ron lewis
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 17:07
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Doesn't the system() command in DXL act the same as running something from the command line?

I have the encryption tool for DOORS 8.3. You can see the command I'm trying to run in my OP.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 17:11
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Your system command is trying to run the encryption tool as a window application which should fail if the encryption tool is a command line tool.
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 17:26
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Me: 1 DXL: 0

system("c:\\windows\\system32\\cmd.exe /c end_user_protdxl.exe \"" sourceFile "\" > \"" destinationFile "\"");

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 30-Jan-2009 23:14
User is offline View Users Profile Print this message


Kane Grzebielski

Posts: 19
Joined: 29-May-2008

strange...all I get is a blank output file
Report this to a Moderator Report this to a Moderator
 31-Jan-2009 00:16
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

David, I never doubted that we would get you to the point the light bulb flashed. And I see that you gave yourself credit for winning the match. What I want to know is, how many rounds did the fight last?

Edited: 31-Jan-2009 at 10:48 by ron lewis
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.