Check if this may help.. 

Put this in your batch before mage.exe -cc

%0\ 
cd %0\.. 
cd /d %0\.. 

The first two lines are for 9x which doesn't support the /d flag, only
the third line is required for NTx. This nifty solution was originally
found at alt.msdos.batch.nt.

Credit: Comment at :
http://blogs.msdn.com/oldnewthing/archive/2005/01/28/362565.aspx


-----Original Message-----
From: Vuchuru, Surekha (SBT US EXT)
[mailto:surekha.vuchuru....@siemens.com] 
Sent: Wednesday, April 22, 2009 4:06 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Execute a batch file that takes Installation
Directoryas current directory instead of C:\Windows\System32

Hello Everyone,
 
I have a batch file that gets executed during installation process...
Content of that batch file is something like this
 
mage.exe -cc
 
This command is supposed to execute mage.exe (that exe is also present
in the same directory where that batch file is present). But, that
command gives an error while running the batch file as part of
installation. 
 
The current directory is supposed to be where that batch file and
mage.exe is copied in the Installation Directory structure. Instead, the
batch file shows that the current directory is C:\Windows\system32 and
searches for mage.exe in the same folder as oppposed to the Installation
Directory and as result generates an error. Without passing the path as
an argument to that batch file explicilty, Is there a way to execute
that batch file from where it has been actually installed (Installation
Directory).
 
Thanks and Regards,
Surekha Vuchuru
 
------------------------------------------------------------------------
------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

--------------------------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or 
proprietary, and if you are not an intended recipient, please notify the 
sender, do not use or share it and delete it. Unless specifically indicated, 
this message is not an offer to sell or a solicitation of any investment 
products or other financial product or service, an official confirmation of any 
transaction, or an official statement of Merrill Lynch. Subject to applicable 
law, Merrill Lynch may monitor, review and retain e-communications (EC) 
traveling through its networks/systems. The laws of the country of each 
sender/recipient may impact the handling of EC, and EC may be archived, 
supervised and produced in countries other than the country in which you are 
located. This message cannot be guaranteed to be secure or error-free. 
References to "Merrill Lynch" are references to any company in the Merrill 
Lynch & Co., Inc. group of companies, which are wholly-owned by Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are 
Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a 
Condition to Any Banking Service or Activity * Are Not Insured by Any Federal 
Government Agency. Attachments that are part of this E-communication may have 
additional important disclosures and disclaimers, which you should read. This 
message is subject to terms available at the following link: 
http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you 
consent to the foregoing.
--------------------------------------------------------------------------
 

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to