Brian Madden Logo
Your independent source for application and desktop virtualization.
Marketplace

advertisement

MFCOM and Visual Basic 6 Errors, in the Scripting / Automation forum on BrianMadden.com

rated by 0 users
This post has 2 Replies | 0 Followers

Not Ranked
Points 25
Dave Brett Posted: 06-05-2008 9:00 AM
Hi,

I was wondering if anyone could shed some light on an issue I am having putting the svrOnLine and svfOffLine scripts floating about into a VB6 App.

Basically the code I am using is:

Set mfSvr = CreateObject("MetaFrameCOM.MetaFrameServer")
mfSvr.Initialize 6, "SERVERNAME"

For Each mfApp In mfSvr.Applications
fp.WriteLine mfApp.DistinguishedName
Next

I keep getting the following error when it tries to loop through the apps.

Run-Time Error '-2147467259'
Automation Error
Unspecified Error

It looks like the app does not know of any published apps...

I am pulling my hair out.....

Thanks,
Dave.
Not Ranked
Points 25
Sorted....

There is a problem with using Com+ calls to the Farm when you are not a FULL Citrix Admin. Even though you have the rights to run a vbs script??

I am at the iForum next week so I will try to get a bit more information on this there and post it up here.

Running the app as a admin (full) for the minute but need the ability to give it to non-full admin users.

Dave
  • | Post Points: 20
Not Ranked
Points 10
We are having the same issue. Our script that worked through CPS 4.0 no longer works now that we are on CPS 4.5. I am running it as a full admin through Citrix. The error is unspecified error.
The script is:

svrName = InputBox("This script will remove a server from all published applications" & vbnewline & "Enter the server name which you wish to take offline","Remove server")
if svrName = vbcancel then
wscript.quit
End if
svrName = ucase(SvrName)

Set mfSvr=CreateObject("MetaFrameCOM.MetaFrameServer")
mfSvr.Initialize 6, svrName

For Each mfApp In mfSvr.Applications
mfApp.RemoveServer svrName
mfApp.SaveData
' fp.WriteLine mfApp.DistinguishedName
Next

msgbox "Complete"

Did you find a resolution to the problem?
Dawn
  • | Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright © 1997-2008 The Brian Madden Company, LLC | Disclosures | Privacy | Terms of Use | Contact Info