Help needed Urgently with MSI

G

Guest

Hello,

I have the following code in evc++ and I'm trying to create a MSI (following the example on msdn, with a few changes). The file gets compiled fine and works like a charm if I run in on its own from the directory where all the ini files reside.

I then put the exe as an "Install" custom action in the MSI Setup Project, with no line arguments. When I run the MSI the exe actually runs from c:\windows\system32 and therefore fails to load the ini files. i want it to run from the application folder. Is there any way I can change the custom action or the code below for it to function properly?


//Start ActiveSync with the given of default .ini file as a parameter
char currentDirectory[MAX_PATH];
::GetCurrentDirectory(MAX_PATH, currentDirectory);
char iniPath[MAX_PATH];
strcpy(iniPath, "\"");
strcat(iniPath, currentDirectory);
strcat(iniPath, "\\setup.ini\"");
strcat(iniPath, " ");
strcat(iniPath, "\"");
strcat(iniPath, currentDirectory);
strcat(iniPath, "\\setup1.ini\"");
_execl(strActuveSyncPath, strActuveSyncPath, iniPath, NULL);

return 0;
}
 
I

Ilya Tumanov [MS]

The best way to solve the problem is to call CEAPPMGR.EXE directly without
using any wrappers.

To do so you'll need to search for CEAPPMGR.EXE path in registry
(HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE).
If found, execute a custom action of type 1138 with source set to property
which contains a CEAPPMGR path and target set to full path to ini file.

If you have to use wrapper for some reason, you have to provide full path
to ini file.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Thread-Topic: Help needed Urgently with MSI
thread-index: AcReRGrLGD8QVusqRqWvYtDFDJA9gw==
X-WBNR-Posting-Host: 61.247.228.94
From: "=?Utf-8?B?VmlzaGFsIFJhc3RvZ2k=?="
Subject: Help needed Urgently with MSI
Date: Tue, 29 Jun 2004 18:49:01 -0700
Lines: 23
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.compactframework:56259
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hello,

I have the following code in evc++ and I'm trying to create a MSI
(following the example on msdn, with a few changes). The file gets compiled
fine and works like a charm if I run in on its own from the directory where
all the ini files reside.
I then put the exe as an "Install" custom action in the MSI Setup
Project, with no line arguments. When I run the MSI the exe actually runs
from c:\windows\system32 and therefore fails to load the ini files. i want
it to run from the application folder. Is there any way I can change the
custom action or the code below for it to function properly?
//Start ActiveSync with the given of default .ini file as a parameter
char currentDirectory[MAX_PATH];
::GetCurrentDirectory(MAX_PATH, currentDirectory);
char iniPath[MAX_PATH];
strcpy(iniPath, "\"");
strcat(iniPath, currentDirectory);
strcat(iniPath, "\\setup.ini\"");
strcat(iniPath, " ");
strcat(iniPath, "\"");
strcat(iniPath, currentDirectory);
strcat(iniPath, "\\setup1.ini\"");
_execl(strActuveSyncPath, strActuveSyncPath, iniPath, NULL);

return 0;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top