Peter Chan
asked on
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
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
please post your VBScript code
run the vbs script as an administrator is my best guess as it is a permissions error
ASKER
Thanks all.
I am using Administrator account.
Aiki,
Do you see the .vbs file above?
I am using Administrator account.
Aiki,
Do you see the .vbs file above?
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.
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.
ASKER
Sorry, I was handling with Text only in the project.
Any advice to do any change?
Any advice to do any change?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks. I did adjust VB script
https://dl.dropboxusercontent.com/u/40211031/CallDotNetDll.vbs
but I still get the error attached
t822.png
https://dl.dropboxusercontent.com/u/40211031/CallDotNetDll.vbs
but I still get the error attached
t822.png
In VBScript, all the variables are variant. Do not include the As datatype clause to your Dim statements.
ASKER
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
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
ASKER
Many thanks.
Any other help?
Any other help?
I don't have an environment that I can test the VB.Net project and your VBScript.
ASKER
Thanks. Can I have your email address, as I think I can share with you the relevant machine, by Teamviewer?
ASKER
If you're available. Thanks again.
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
ASKER
Thanks. Can you please help to my problem?
ASKER
Any help?
ASKER
Dear all,
Any other help?
Any other help?
ASKER
Here is the relevant project for the DLL
https://dl.dropboxusercontent.com/u/40211031/CSDemo.zip
https://dl.dropboxusercontent.com/u/40211031/CSDemo.zip
ASKER
Any help to this?