我使用WiX创建了一个多语言安装程序.我正在使用命令从命令行运行安装程序"msiexec /i myinstaller.msi TRANSFORMS=":1041",它运行正常.现在我使用bootstrapper创建了一个语言选择对话框.如何将所选语言传递到我的WiX安装程序以按所选语言启动?我从以下链接得到了这个想法:
我的包有 <MsiPackage SourceFile="myinstaller.msi" DisplayInternalUI="yes" >
由于我的自定义用户界面使用Burn from WiX工具集,我有这个屏幕:

msiexec /i myinstaller.msi TRANSFORMS=":1041"如果我选择日语或者msiexec /i myinstaller.msi TRANSFORMS=":1031"选择德语并按OK,我想以某种方式执行命令.
请告诉我该怎么做才能解决这个问题.有没有其他方法可以做到这一点?如果是的话,请告诉我.一些代码示例将是一个更好的帮助.
//head.h//
extern int sum(int,int);
Run Code Online (Sandbox Code Playgroud)
//head.cpp//
#include "head.h"
#include "stdafx.h"
int sum(int x, int y)
{
return (x+y);
}
Run Code Online (Sandbox Code Playgroud)
//mainfn.cpp//
#include "head.h"
#include "stdafx.h"
#include string
#include iostream
#include stdio.h
using std::string;
using std::cout;
using namespace System;
int main()
{
int x=10,y=2;
printf("value: %d",sum(x,y));
Console::ReadLine();
return 0;
}
Run Code Online (Sandbox Code Playgroud)
在Visual Studio 2005中构建时,这个vc ++项目给出了以下错误:
error C3861: 'sum': identifier not found.
Run Code Online (Sandbox Code Playgroud)
有人可以帮我解决这个问题吗?
如何使用c/c ++编程在文件开头添加数据?我试过以下代码:
fstream file;
stmt.open(L"d:\\xyz.txt",ios::in|ios::out|ios::app);
Run Code Online (Sandbox Code Playgroud)
但是这会附加在文件的末尾.
我使用自定义的WiXUI_InstallDir UI进行软件安装.在浏览对话框中,我们甚至可以选择C:\作为安装目录.有没有可能的方式,当用户选择C:\时,它会自动添加一个foldername吗?例如,如果软件是XYZ软件,那么在浏览到C:\并按OK后,它应该在pathedit中显示c:\ XYZ.
如何使用基于 MFC 对话框的应用程序打印文档?我做了一个打印按钮。单击此按钮后,我想打印一些文档或一些文本。