[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1026
  • Last Modified:

Create executable from vbs

Hi Experts,
I'm working with vbsedit and trying to create an executable file as discussed on below question's final comments.

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_26846864.html
But I''m getting attached error.
I've attached reference window also to that image , which shows the dll libraries which I refereed.

I've had looked at following link and seems there is no security to access this function.
http://support.microsoft.com/kb/194801
But this code with working correctly from MS Excel Marco editor with adding dll files from reference.

Please let me know if there any luck of getting this work.

BR Dushan.


vbsedit.JPG
0
Dushan De Silva
Asked:
Dushan De Silva
  • 4
  • 4
2 Solutions
 
RobSampsonCommented:
The Reference there shows dfs.DataManager.

Perhaps change
Set datamgr = CreatEobject("DfsCmd.DataManager")

to
Set datamgr = CreatEobject("Dfs.DataManager")

and see what happens.

Regards,

Rob.
0
 
Dushan De SilvaAuthor Commented:
Hi RobSampson,
Thanks a lot again for attending again!
Yes, it is working now.
But I'm getting error when I try to execute next line.

But seems I can't find ProgramID for DfsIos, please find attached image.
I can find DataIosMisc from the IOS.dll, but can't find ProgramID. I've login to IRESS and IOS from GUI. Also when macro is running I tried to trace it. But it's not listing as shows in the attached image.


BR Dushan.
ios-dll.JPG
missing-DfsIos.JPG
0
 
RobSampsonCommented:
That object reference may not be required at all, if CreateOb("iosmisc") is a function of the datamgr object anyway.

Try using just this:

Sub Main()
    Set datamgr = CreateObject("Dfs.DataManager")
    Set misc = datamgr.CreateOb("iosmisc")
   
    With misc
    .Login
    .IOSName(0) = "testName"
    .AuthenticationType(0) = testAuth
    .User(0) = "usr"
    .Pass(0) = "pwd"
End With
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
Dushan De SilvaAuthor Commented:
Thanks! It gives attached error.
DoRequest-error.JPG
0
 
RobSampsonCommented:
OK, VBScript doesn't support optional arguments. I notice in your VB code, you have default values for those arguments, so let's just pass those default values.  Change this line:

    If Not DoRequest(misc) Then WScript.Quit

to this:

    iTimout = 20000
    bReqNext = False
    If Not DoRequest(misc, iTimeOut, bReqNext) Then WScript.Quit


Regards,

Rob.
0
 
Dushan De SilvaAuthor Commented:
Fantastic! Finally worked :)
sorry I forgot that we changed DoRequest function's default values of the parameters.

BR Dushan.
0
 
RobSampsonCommented:
Thanks for the grade.

Regards,

Rob.
0
 
Dushan De SilvaAuthor Commented:
Hi RobSampson,
Thanks a lot for your great help!
I'm trying following example, which will request price information and will wait for responses and will give the outputs.
It's working correctly in Excel Marco editor. Seems we may need to do some more modifications to DoRequest function.

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_26854238.html

I would greatly appreciate that if you could have a look at it.

BR Dushan.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now