Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / June 2004

Tip: Looking for answers? Try searching our database.

Help needed Urgently with MSI

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vishal Rastogi - 30 Jun 2004 02:49 GMT
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;
}
"Ilya Tumanov [MS]" - 30 Jun 2004 22:01 GMT
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=?="
<VishalRastogi@discussions.microsoft.com>
> Subject: Help needed Urgently with MSI
> Date: Tue, 29 Jun 2004 18:49:01 -0700
[quoted text clipped - 13 lines]
> 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];
[quoted text clipped - 11 lines]
>     return 0;
> }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.