+ vector<string> BatchManager_Local::exec_command(const Parametre & param) const
+ {
+ ostringstream exec_sub_cmd;
+
+#ifdef WIN32
+ char drive[_MAX_DRIVE];
+ _splitpath(string(param[WORKDIR]).c_str(), drive, NULL, NULL, NULL);
+ if (strlen(drive) > 0) exec_sub_cmd << drive << " && ";
+#endif
+
+ exec_sub_cmd << "cd " << param[WORKDIR] << " && " << param[EXECUTABLE];
+
+ if (param.find(ARGUMENTS) != param.end()) {
+ Versatile V = param[ARGUMENTS];
+ for(Versatile::const_iterator it=V.begin(); it!=V.end(); it++) {
+ StringType argt = * static_cast<StringType *>(*it);
+ string arg = argt;
+ exec_sub_cmd << " " << arg;
+ }
+ }
+
+ string user;
+ Parametre::const_iterator it = param.find(USER);
+ if (it != param.end()) {
+ user = string(it->second);
+ }
+
+ return _protocol.getExecCommandArgs(exec_sub_cmd.str(), param[EXECUTIONHOST], user);
+ }
+
+