InterviewSolution
| 1. |
Solve : C# and batch files? |
|
Answer» I have a batch file that when a file is dragged and dropped on to it, it creates a txt file that has the location of the file that was dragged on to it. Afterwards, the batch file is suppose to run a c# console application, which is suppose to, well, do its own thing. But, instead the console application opens up as if I were to go to cmd (command prompt) starting at the location of "E:\documents and settings\jim\" where I can proceed to type "dir" and see all files and so on. The c# console application works fine if i just double click on it normally though. Any ideas thanks? I made a batch file like yours and dropped a file on it, it did what you described when the batch worked properly.well, thanks for the suggestion but, none of those have helped and I have 4 antivirus/spyware/worms scanners that I run daily, and 2 firewalls, and a realtime scanner. Any more ideas? If it comes down to it, I might just make the program into a visual C# program.After a while of PLAYING around with the batch file, I decided to pause it at the end rather than exit. I found that it was printing the : Code: [Select]Start "HtmlLinker.exe" with exactly that....quotations and all. So I removed the quotations from it and found that I needed to create a path to it so this is what I came up with, and now my console program runs correctly. Code: [Select]echo %1 echo %1>"c:/Program Files/HtmlLinker/address.txt" Path=c:\Program Files\HtmlLinker;%PATH% DOSKEY /insert START HtmlLinker.exe exit |
|