企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2242|回复: 13

Not a valid win 32 application

[复制链接]

76

主题

356

帖子

534

积分

高级会员

Rank: 4

积分
534
QQ
发表于 2014-6-18 18:23:57 | 显示全部楼层 |阅读模式
Hello,
I have this in the epilog of a process
NumericGlobalVariable('ProcessReturnCode');
If(ProcessReturnCode=ProcessExitNormal());
ExecuteCommand('D:ErrorEmail2.vbs',1);
Endif;
And I get a "Error: Epilog procedure line (17): %1 is not a valid Win32 application." in the message log.
The vbs file works in the command prompt but not as part of TI.
Anyone knows the solution?
回复

使用道具 举报

87

主题

428

帖子

615

积分

高级会员

Rank: 4

积分
615
QQ
发表于 2014-6-18 19:54:16 | 显示全部楼层
My guess would be that in the ExecuteCommand function you need to pass the parameter to your vb script as a string not a value.

... but also, if the process exits normally without errors why would you want to send an email notification, surely you would want to do this only in the event of a process error log being generated?
回复 支持 反对

使用道具 举报

74

主题

392

帖子

562

积分

高级会员

Rank: 4

积分
562
QQ
发表于 2014-6-18 19:58:22 | 显示全部楼层
No no  no...

This is not the right way to call VBScript from TI.

ExecuteCommand will need to call a exe or a cmd, bat file. It can't execute a VBS directly.

Do this instead to execute VBS:

ExecuteCommand('C:windowssystem32cscript.exe D:ErrorEmail2.vbs',1);
回复 支持 反对

使用道具 举报

69

主题

368

帖子

521

积分

高级会员

Rank: 4

积分
521
QQ
发表于 2014-6-18 20:21:57 | 显示全部楼层
Hello,
To answer lotsaram, I used ProcessExitNormal() just to make sure the email section gets called so I can test if the email gets sent out.

I changed my code as suggested by kangkc and it worked!! thanks all....
回复 支持 反对

使用道具 举报

83

主题

418

帖子

603

积分

高级会员

Rank: 4

积分
603
QQ
发表于 2014-6-18 20:37:37 | 显示全部楼层
  Hi Telula, would you mind sharing the vbs code too? not sure i can use automated email here but would be interesting to see how you are calling it, thanks

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

83

主题

416

帖子

588

积分

高级会员

Rank: 4

积分
588
QQ
发表于 2014-6-18 20:41:59 | 显示全部楼层
You've got to call the vbs using the command shell like kangkc said.
回复 支持 反对

使用道具 举报

83

主题

396

帖子

573

积分

高级会员

Rank: 4

积分
573
QQ
发表于 2014-6-18 20:53:45 | 显示全部楼层
I think Steve refers to how to call the sending of the email - like in



(If Steve doesn't refer to how to make the mailing happen the link might be useful for someone who stumbles on this post via search  )
And kangkc might be the kc_kang credited at above mentioned link, that would explain why he knows how to get vbs-scripts running...

Oh - and because bihints tends to be unreachable exactly the moment you need it most - I attached the send-script. (And because I may not upload txt,vbs or invalid jpg I renamed it to zip, which it is - obvioously - not. rename to txt, vbs or any extension you associate with an editor capable of opening plain text format, which should be virtually anyone not limited to wysiwyg)
To quote the credits: "code from kc_kang (applix forum) and http://www.rondebruin.nl/cdo.htm"

PS.: it is definitely too hot here...

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

64

主题

404

帖子

556

积分

高级会员

Rank: 4

积分
556
QQ
发表于 2014-6-18 21:10:53 | 显示全部楼层
SKIPCHECK;;
['kangkc']=['kc_kang'];

FEEDERS;
['kc_kang'] => ['kangkc']


  

I used a fair bit of ExecuteCommand in my consultancy work involving TM1, and there are many possibilities in process automation. TI is a very dynamic and yet simple ETL tool.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

82

主题

406

帖子

593

积分

高级会员

Rank: 4

积分
593
QQ
发表于 2014-6-18 21:27:11 | 显示全部楼层
kangkc wrote:SKIPCHECK;
['kangkc']=['kc_kang'];

FEEDERS;
['kc_kang'] => ['kangkc'];

In your case I would have created an alias - I really hate having hundreds of elements mirroring each other using rules
(So I could never work at government agency where one might be able to change his or her name (honestly, I have no clue how to call the place - not even in my language. But it doesn't matter) - "I'm sorry, I'm from the TM1-side, so you want to see someone from SAP; they can change your name, I can only offer you an alias")

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

94

主题

397

帖子

609

积分

高级会员

Rank: 4

积分
609
QQ
发表于 2014-6-18 21:56:57 | 显示全部楼层
Lukas Meyer wrote:[quote]kangkc wrote:SKIPCHECK;
['kangkc']=['kc_kang'];

FEEDERS;
['kc_kang'] => ['kangkc'];

In your case I would have created an alias - I really hate having hundreds of elements mirroring each other using rules
(So I could never work at government agency where one might be able to change his or her name (honestly, I have no clue how to call the place - not even in my language. But it doesn't matter)
[/quote]

If I had to guess (about both the language and the name) it would be "Standesamt" or in English, "Registry Office".

(Or, in my own case if I revert to my former Applix Forums persona, "the Project Treadstone office at CIA Langley". Although of course I don't remember any of that...)
Lukas Meyer wrote: - "I'm sorry, I'm from the TM1-side, so you want to see someone from SAP; they can change your name, I can only offer you an alias")

No, it is possible to change a name in TM1... as long as you don't mind going via the old version 6, pre-alias method of exporting their personality into a text file, deleting their name, entering the new one into their ID dimension, recompiling the dimension and re-importing their personality.

Might take a while, though.   

(For the technically pedantic, yes, I know that you're really deleting the old element and creating a new one rather than "renaming" the original, but in version 6 it was as close as you got to it...)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2023-6-7 20:16 , Processed in 0.099572 second(s), 38 queries .

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表