Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Redirect standard output of a running process Pin
Eddy Vluggen6-Jun-13 23:02
professionalEddy Vluggen6-Jun-13 23:02 
QuestionCheck for updates Pin
John_Tadros26-May-13 1:04
John_Tadros26-May-13 1:04 
AnswerRe: Check for updates Pin
Member 1007416126-May-13 1:29
Member 1007416126-May-13 1:29 
AnswerRe: Check for updates Pin
Richard MacCutchan26-May-13 2:36
mveRichard MacCutchan26-May-13 2:36 
AnswerRe: Check for updates Pin
Mycroft Holmes26-May-13 3:34
professionalMycroft Holmes26-May-13 3:34 
AnswerRe: Check for updates Pin
MaulikDusara26-May-13 18:25
MaulikDusara26-May-13 18:25 
Questionvery off bug Pin
Member 1007416125-May-13 22:46
Member 1007416125-May-13 22:46 
AnswerRe: very off bug Pin
SoMad25-May-13 23:36
professionalSoMad25-May-13 23:36 
It sounds like you implemented this expecting the current folder of the process to always be the folder where the application is located (e.g. "C:\Program Files\MyApps\MyNewApp\NewApp.exe" with the txt file located in "C:\Program Files\MyApps"), however when you launch an application by just specifying the full path, the current folder is not changed - since this happens during startup, the current folder for your process is most likely C:\.

There are several ways to make this work, here are a couple off the top of my head:
1) Change the code to accept the file name (with full path) as a command line parameter and pass that when you are starting it up through the registry.
2) Change the code to properly locate the txt file by having that location set in the registry.
3) Change the code to check the location of the process executable file and use that to locate your parent folder.
4) Don't make any changes in the code. Instead create a Windows shortcut and in the shortcut properties specify the startup folder for your application. On system startup, invoke the shortcut instead of launching your application directly.

I am not advocating that you go with 4), but I included it to give you some options.

Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

QuestionWant to chat through ip address Pin
Ramans44425-May-13 21:24
Ramans44425-May-13 21:24 
GeneralRe: Want to chat through ip address Pin
harold aptroot25-May-13 21:30
harold aptroot25-May-13 21:30 
GeneralRe: Want to chat through ip address Pin
Ramans44425-May-13 21:40
Ramans44425-May-13 21:40 
AnswerRe: Want to chat through ip address Pin
dusty_dex26-May-13 0:57
dusty_dex26-May-13 0:57 
QuestionAssign Mutex to each Thread Pin
RoyDoron25-May-13 5:28
RoyDoron25-May-13 5:28 
AnswerRe: Assign Mutex to each Thread Pin
Dave Kreskowiak25-May-13 14:08
mveDave Kreskowiak25-May-13 14:08 
Questionc# question about gui standard location on every screen Pin
User349025-May-13 4:55
User349025-May-13 4:55 
AnswerRe: c# question about gui standard location on every screen Pin
Abhinav S25-May-13 5:08
Abhinav S25-May-13 5:08 
Questionint to string Pin
Member 1007416125-May-13 1:17
Member 1007416125-May-13 1:17 
AnswerRe: int to string Pin
Richard MacCutchan25-May-13 1:25
mveRichard MacCutchan25-May-13 1:25 
AnswerRe: int to string Pin
Abhinav S25-May-13 1:26
Abhinav S25-May-13 1:26 
GeneralRe: int to string Pin
Member 1007416125-May-13 1:48
Member 1007416125-May-13 1:48 
AnswerRe: int to string Pin
Abhinav S25-May-13 2:19
Abhinav S25-May-13 2:19 
GeneralRe: int to string Pin
Member 1007416125-May-13 3:07
Member 1007416125-May-13 3:07 
AnswerRe: int to string Pin
Abhinav S25-May-13 3:27
Abhinav S25-May-13 3:27 
GeneralRe: int to string Pin
Member 1007416125-May-13 3:51
Member 1007416125-May-13 3:51 
GeneralRe: int to string Pin
Dave Kreskowiak25-May-13 4:06
mveDave Kreskowiak25-May-13 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.