Problem with the script

Hi,
I do use this script
https://dl.dropboxusercontent.com/u/40211031/CallDotNetDll.vbs

within Win 7/win 2008 server, to call this VB project
https://dl.dropboxusercontent.com/u/40211031/CSDemo.zip

while I also have followed these

Register COM DLL file in Windows 7
Start --> Run --> comexp.msc
Navigate to Console Root - Componet Services - Computers - My Computer - COM+ Applications.
Right click on 'COM+ Applications' and create New Application.
Follow the wizard carefully. Hit Next. Create an Empty Application. Name it (mycomapp1 for instance). Make sure Server application radio box is selected. Pick the user account based on the requirement. Hit Next. Next. Finish.
Now you have created a COM+ application named mycomapp1.
Now, you need to add individual COM components to it.
Expand mycomapp1 from the list. Right click on Components. Pick New Component.
Hit Next in the wizard. This next wizard screen is up to you. I would pick 'Install New components' if I haven’t run a regsvr32 or regasm on it. Pick the told or the dll (containing the tlb) file. And go ahead.. That’s how you do it.

to register both .dll and .tlb (which are built from the VB project) within the machine. but when running the VB script, I get the error attached

any advice?
t821.png
LVL 11
HuaMin ChenProblem resolverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aikimarkCommented:
please post your VBScript code
0
David Johnson, CD, MVPOwnerCommented:
run the vbs script as an administrator is my best guess as it is a permissions error
0
HuaMin ChenProblem resolverAuthor Commented:
Thanks all.
I am using Administrator account.

Aiki,
Do you see the .vbs file above?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

aikimarkCommented:
I was looking for an EE attached file or source.  I now see the file you have uploaded to Dropbox.  Please ignore my earlier comment.

From the variable names, I would guess that the ActiveX object expects double precision floating point parameter values.  Your VBS code is supplying string values.
0
HuaMin ChenProblem resolverAuthor Commented:
Sorry, I was handling with Text only in the project.
Any advice to do any change?
0
aikimarkCommented:
First thing to try is to surround the parameters with parentheses
dblResult = objFunc.Func1((dblValue1), (dblValue2), (dblValue3))

Open in new window


If that doesn't work, cast the variables as strings
dblResult = objFunc.Func1(CStr(dblValue1), CStr(dblValue2), CStr(dblValue3))

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverAuthor Commented:
Many thanks. I did adjust VB script
https://dl.dropboxusercontent.com/u/40211031/CallDotNetDll.vbs

but I still get the error attached
t822.png
0
aikimarkCommented:
In VBScript, all the variables are variant.  Do not include the As datatype clause to your Dim statements.
0
HuaMin ChenProblem resolverAuthor Commented:
Many thanks. I did adjust VB script again
https://dl.dropboxusercontent.com/u/40211031/CallDotNetDll.vbs

but I still get the error attached, when finishing to call the dll file, from VB script.
t823.png
0
HuaMin ChenProblem resolverAuthor Commented:
Many thanks.
Any other help?
0
aikimarkCommented:
I don't have an environment that I can test the VB.Net project and your VBScript.
0
HuaMin ChenProblem resolverAuthor Commented:
Thanks. Can I have your email address, as I think I can share with you the relevant machine, by Teamviewer?
0
HuaMin ChenProblem resolverAuthor Commented:
If you're available. Thanks again.
0
David Johnson, CD, MVPOwnerCommented:
Thanks. Can I have your email address, as I think I can share with you the relevant machine, by Teamviewer? we can't enter email addresses in a question as it is supposed to be solved with the solution available for everyone via the website. That being said check the experts profile for a hire me button
0
HuaMin ChenProblem resolverAuthor Commented:
Thanks. Can you please help to my problem?
0
HuaMin ChenProblem resolverAuthor Commented:
Any help?
0
HuaMin ChenProblem resolverAuthor Commented:
Dear all,
Any other help?
0
HuaMin ChenProblem resolverAuthor Commented:
Here is the relevant project for the DLL
https://dl.dropboxusercontent.com/u/40211031/CSDemo.zip
0
HuaMin ChenProblem resolverAuthor Commented:
Any help to this?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.