Click here to Skip to main content
16,013,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: replaceing characters in a string Pin
Manfred Staiger24-Jul-03 1:46
Manfred Staiger24-Jul-03 1:46 
GeneralRe: replaceing characters in a string Pin
Simon.W24-Jul-03 2:02
Simon.W24-Jul-03 2:02 
GeneralRe: replaceing characters in a string Pin
Ryan Binns24-Jul-03 2:02
Ryan Binns24-Jul-03 2:02 
Generalos compatibility Pin
_gog_24-Jul-03 0:51
_gog_24-Jul-03 0:51 
GeneralRe: os compatibility Pin
Nathan Blomquist24-Jul-03 1:45
Nathan Blomquist24-Jul-03 1:45 
GeneralRe: os compatibility Pin
Fistboy24-Jul-03 2:32
Fistboy24-Jul-03 2:32 
GeneralInnoSetup Pin
JensB24-Jul-03 0:25
JensB24-Jul-03 0:25 
GeneralRe: InnoSetup Pin
Toni7824-Jul-03 0:40
Toni7824-Jul-03 0:40 
I had exactly the same problem as you do. When the program runs from the start menu for some odd reason it thinks that the current running directory is the desktop (or the path the desktop ini file). To fix this problem you need to do the following:
LPTSTR szCmdLine;
szCmdLine = ::GetCommandLine();
CString strPath( szCmdLine );
// Remove the exe name from the path. _splitpath can
// be used instead.
int iCharPos = strPath.ReverseFind( '\\' );
strPath.SetAt( iCharPos, '\0' );
// This loop removes '"' from the beginning of
// the path string.  Windows encloses the path in quotation
// marks (don't ask me why).
for( int j = 0; j < strPath.GetLength() - 1; j++ )
{
	strPath.SetAt( j, strPath[j+1]);
}
if(!::SetCurrentDirectory( (LPCTSTR)strPath ) )


This problem is not innosetup related.

// Afterall, I realized that even my comment lines have bugs

When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
GeneralRe: InnoSetup Pin
PJ Arends24-Jul-03 1:09
professionalPJ Arends24-Jul-03 1:09 
GeneralRe: InnoSetup Pin
JensB24-Jul-03 1:32
JensB24-Jul-03 1:32 
GeneralRe: InnoSetup Pin
Toni7824-Jul-03 1:57
Toni7824-Jul-03 1:57 
GeneralRe: InnoSetup Pin
JensB24-Jul-03 2:08
JensB24-Jul-03 2:08 
GeneralRe: InnoSetup Pin
JensB24-Jul-03 2:21
JensB24-Jul-03 2:21 
GeneralRe: InnoSetup Pin
Toni7824-Jul-03 2:36
Toni7824-Jul-03 2:36 
GeneralRe: InnoSetup Pin
John M. Drescher24-Jul-03 5:53
John M. Drescher24-Jul-03 5:53 
GeneralRe: InnoSetup Pin
Toni7824-Jul-03 12:44
Toni7824-Jul-03 12:44 
Generallib + message map problem Pin
User-37793624-Jul-03 0:19
User-37793624-Jul-03 0:19 
GeneralRe: lib + message map problem Pin
Frank K24-Jul-03 2:31
Frank K24-Jul-03 2:31 
GeneralDetect Internet Connection Pin
Abhi@Work24-Jul-03 0:15
Abhi@Work24-Jul-03 0:15 
GeneralRe: Detect Internet Connection Pin
Toni7824-Jul-03 0:51
Toni7824-Jul-03 0:51 
GeneralRe: Detect Internet Connection Pin
Abhi@Work24-Jul-03 15:30
Abhi@Work24-Jul-03 15:30 
GeneralRe: Detect Internet Connection Pin
Toni7825-Jul-03 12:07
Toni7825-Jul-03 12:07 
QuestionHow make CDatabase instance gobal Pin
ValliS24-Jul-03 0:06
ValliS24-Jul-03 0:06 
AnswerRe: How make CDatabase instance gobal Pin
Jonathan de Halleux24-Jul-03 0:28
Jonathan de Halleux24-Jul-03 0:28 
AnswerRe: How make CDatabase instance gobal Pin
Michael P Butler24-Jul-03 0:36
Michael P Butler24-Jul-03 0:36 

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.