Running a commandline utility
Posted: Mon Oct 08, 2012 3:49 am
I am trying to run a commandline utility for a very specific task.
I added the .exe as a support file and tried to run it with "run program as" by using this path "$SUPPORTDIR$\WmiSecurity.exe" and passing the correct parameters in. Nothing happens.
Guess there's something wrong but I do not know what it could be, so I started to investigate the issue.
1) I tried to log the installation, I only got a 1.6 mb file FULL of useless internal info, there's not even a mention of the program being executed! There's no mention of the support file being copied to the support folder, too.
2) I added some logging by using "write to text file" with $LOGGED$. The log file became an unreadable mess. No luck here, I found a topic that tells me I should use a different file to log my own info. Done it, the parameters look correct in my log.
3) So, thinking that I could see the error in action, I changed the package to run a batch file (adding a "pause" command), created using "write to text file" actions. The file isn't created at all. Maybe the help is wrong and the action only appends to an existing file? No, I also tried to distribute an empty batch file, but no luck again. Maybe it's a short path issue? Nope, I also tried with the "convert path" action.
I am probably doing something horribly wrong, I really hope so, but the main problem here is that the debug is a real pain, I have no clue from the IDE and neither from the log file.
Before you ask, I am attaching a sample project. And also, before you tell me so, I DO NOT want to upgrade to NX to solve this.
I will probably seem rude here, but I am literally filling my setup with hacks and I am a bit tired of this.
Regards
I added the .exe as a support file and tried to run it with "run program as" by using this path "$SUPPORTDIR$\WmiSecurity.exe" and passing the correct parameters in. Nothing happens.
Guess there's something wrong but I do not know what it could be, so I started to investigate the issue.
1) I tried to log the installation, I only got a 1.6 mb file FULL of useless internal info, there's not even a mention of the program being executed! There's no mention of the support file being copied to the support folder, too.
2) I added some logging by using "write to text file" with $LOGGED$. The log file became an unreadable mess. No luck here, I found a topic that tells me I should use a different file to log my own info. Done it, the parameters look correct in my log.
3) So, thinking that I could see the error in action, I changed the package to run a batch file (adding a "pause" command), created using "write to text file" actions. The file isn't created at all. Maybe the help is wrong and the action only appends to an existing file? No, I also tried to distribute an empty batch file, but no luck again. Maybe it's a short path issue? Nope, I also tried with the "convert path" action.
I am probably doing something horribly wrong, I really hope so, but the main problem here is that the debug is a real pain, I have no clue from the IDE and neither from the log file.
Before you ask, I am attaching a sample project. And also, before you tell me so, I DO NOT want to upgrade to NX to solve this.
I will probably seem rude here, but I am literally filling my setup with hacks and I am a bit tired of this.
Regards