FPC.Root (Full Version)

All Forums >> [ISA 2006 Misc.] >> ISA 2006 Programming



Message


LucInfo -> FPC.Root (15.Apr.2008 7:26:50 AM)

Hello,
 
I have problems to start a script from a remote computer (as administrator). I use the script from Jason Fossen to enable/disable a rule.  When I use it on the ISA server itself it works fine. When I share the map and start the script from a remote computer (or I make a shortcut in the shared map to the script) I receive the following error:
ActiveX can’t create object: ‘FPC.Root’
 
In other words: ‘Set root = CreateObject("FPC.Root")’ or 'Set Root = CreateObject ("FPC.Root", "name ISAServer")' doesn’t work.

Searching the Intenet I found a solution from Jason to install the ISA console on the remote computer. But that’s not possible, because then the persons who can use the script (ISA full administrators) can also use the console.
 
Is there an other way to fix the problem?
 
Thanks in advance.




ferrix -> RE: FPC.Root (15.Apr.2008 5:43:20 PM)

Nope.  You are trying to take one permission (modify ISA config) and make it into more granular permissions.  But anyone who can modify one part of the config can modify the rest.

And if you don't have the isa management installed then you can't run the automation objects... it's all part of the same thing.




LucInfo -> RE: FPC.Root (17.Apr.2008 5:13:03 AM)

Thanks for your answer. But is that also the raison that even myself from a remote computer, in a shared map on the ISA server can’t start the script? When I do it on the ISA it’s works perfect. I have tried to start it from a shortcut with the correct map as working directory, but that also didn’t work.




fixitchris -> RE: FPC.Root (1.May2008 8:17:06 PM)

Install Console and delete the Executable.

Or copy FPCLIb.dll and run regsvr32.exe on it. I'm not sure if this will be enough though.




LucInfo -> RE: FPC.Root (6.May2008 3:28:35 AM)

Thanks for your answer. Your first suggestion is as ‘the egg of Colombus’… sometimes it’s more simple then we things.
 
But even that doesn’t works. I install the console on an other computer, I can activate or deactivate a rule, but when I start the script it passes the ‘CreateObject("FPC.Root"), but I recieve an error on line 2:
 
Set FPCobject = CreateObject("FPC.Root")
Set PolicyRuleobject = FPCobject.GetContainingArray.ArrayPolicy.PolicyRules.Item("rulename”)
 
 
Error: The system cannot find the file specified
Code: 80070002
Source: FPC.ROOT.1
 
This error was already described on this forum (for example):
 
http://forums.isaserver.org/m_2002042660/mpage_1/key_/tm.htm#2002042660
 
but, there is no answer.
 
Help would be very appreciate, because it’s an essential thing that a rule can be activate or deactivate by a script without using the console by a person who is responsible for a group (content rule), but cann't change the other rules. 




fixitchris -> RE: FPC.Root (6.May2008 8:09:11 AM)

That's because you're trying to retrieve a rule from the FPC.Root object.
You first have to create an ISAarray object and connect to a specific ISA server.  Then you can retrieve the rules.

quote:

Set root = CreateObject("FPC.Root")
Set isaArray = root.Arrays.Connect("servername", "username", "domain", "password")
Set rules = isaArray.ArrayPolicy.PolicyRules


http://forums.isaserver.org/m_2002042660/mpage_1/key_/tm.htm#2002042660

Also, the file not found problem means that the rule with the specified name does not exist. 




fixitchris -> RE: FPC.Root (6.May2008 8:13:10 AM)

Please also feel free to comment on this thread:
http://forums.isaserver.org/Extending_ISA/m_2002066346/tm.htm




LucInfo -> RE: FPC.Root (8.May2008 6:41:01 AM)

Thanks again, … but it still doesn’t works. I receive next error:
 
Error: The system cannot find the file specified
The error occurred on object ‘Arrays’ of class ‘Arrays’ in enterprise scope
Code: 80070002
 
Is that because I use the Standard Edition? Remember, when I start the script on the ISA server itself, the script works, so the content rule name is correct and on the remote computer the console is installed.
 
The script completely:
Set oFPC = CreateObject("FPC.Root")
Set isaArray = ofPC.Arrays.Connect("server", "Administrator", "school", "Test123")
Set rules = isaArray.ArrayPolicy.PolicyRules
Set oPolicyRule = oFPC.GetContainingArray.ArrayPolicy.PolicyRules.Item("1HA")


I have the same error with this script:
Dim root
Set root= CreateObject ("FPC.Root")
Dim isaArray
Dim networks
Dim network
Set isaArray =root.Arrays.connect(server)
Set networks =isaArray.Networkconfiguration.networks
For Each network In NetWorks
WScript.Echo "Network naam:" & network.Name
Next

 
Error: The specified service does not exist as an installed service
The error occurred on object ‘Arrays’ of class ‘Arrays’ in enterprise




fixitchris -> RE: FPC.Root (8.May2008 9:00:31 AM)

Download the ISA Access Check tool from http://sync-io.net/isatools.aspx.   What happens when you run it?

chris




LucInfo -> RE: FPC.Root (10.May2008 8:31:11 AM)

… ok
 
Again on the ISA server everything works fine. On the remote computer I receive:
 
‘Application attempted to perform an operation not allowed by the security policy. To grant this application the required permission, contact ….’
 
I change the code access security with ‘Caspol.exe –s off’. I receive Directory, Users and Groups, but when I selected a user and I check User Access I receive some errors.
 
Next try I added the share map on the remote computer to the access security:
 
caspol.exe -pp off -m -ag 1.2 –url file://server/InternetAanUit/* FullTrust
 
InternetAanUit is the name of the shared map
 
Server is the name of the ISA server
 
…. It works.
 
I start the scripts who are in the same directory and I receive again errors, but when I combine the two scripts:
 
Dim root
Set root= CreateObject ("FPC.Root")
Dim isaArray
Dim networks
Dim network
Set isaArray =root.Arrays.connect("server")
Set networks =isaArray.Networkconfiguration.networks
For Each network In NetWorks
WScript.Echo "Network naam:" & network.Name
Next
 
Set rules = isaArray.ArrayPolicy.PolicyRules
Set oPolicyRule = root.GetContainingArray.ArrayPolicy.PolicyRules.Item("1HA")
 
Everything works, but not the last (important) line. I receive this error:
 
Error: The system cannot find the file specified.
Code: 80070002
Source: FPC.ROOT.1
 
And again, on the ISA server itself the script works and the rule is find.
 
Gladly another suggestion, and thanks again




fixitchris -> RE: FPC.Root (10.May2008 12:37:29 PM)

So the ISA Access Check tool works on ISA server and remotely?

Try...
Set oPolicyRule = root.GetContainingArray.ArrayPolicy.PolicyRules("1HA")

However, the "file not found " error refers to policy "1HA" not being found in the policies.

Can you itereate through all polices...

for each FPCpolicy in Array.policyrules
    msgbox fpcpolicy.name
next




LucInfo -> RE: FPC.Root (12.May2008 6:53:11 AM)

FPCpolicy works only with the Enterprise Edition….
 
But.. but.. but.. I found it!
 
Set oPolicyRule = root.GetContainingArray.ArrayPolicy.PolicyRules("1HA")

(.item doesn’t matter), works only on the ISA server itself and not on a remote machine (with ISA standard)

But this works on the ISA Server and the remote computer:

Set oPolicyRule = isaArray.ArrayPolicy.PolicyRules("1HA")
 
(… don’t ask my why …)
 
So, the script to turn on or off a rule on a remote computer:
 
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
 
Dim isaArray  ' An FPCArray object
Set isaArray = root.Arrays.Connect("server") ‘server is the name of the ISA computer
 
Dim oPolicyRule
Set oPolicyRule = isaArray.ArrayPolicy.PolicyRules("1HA") ‘1HA is the name of the rule
 
MsgBox "This is the using rule: " & oPolicyRule
 
 If oPolicyRule.enabled Then
     oPolicyRule.Enabled = false
     oPolicyRule.Save
     wscript.echo "Internet is off!"
 Else
     oPolicyRule.Enabled = true
     oPolicyRule.Save
     wscript.echo "Internet is on!"
 End if
 
So, next try. I remove the console and tried to install FPCLlb.dll as you mentioned before.
The only FPCLlb.dll file that I found is Interop.FPC.Llb.dll. Is it this one?
 
If I try to register I receive next error:
 
‘Interop.FPCLib.dll was loaded, but the dll Register entry point was not found. The file cannot be registered’ 
 
Any suggestion? ... and thanks again!




fixitchris -> RE: FPC.Root (12.May2008 8:53:28 AM)

Excellent.

try
regsvr32 msfpccom.dll

I would leave all other DLLs in the folder too.  I would assume that msfpcui.dll is the ISA Server Mgmt snapin.

chris





LucInfo -> RE: FPC.Root (16.May2008 3:45:52 AM)

I can register msfpccom.dll, but that’s not enough to recognize the FPC.ROOT.
I will install the console and remove the exe-files.
 
Thanks very much for your help




fixitchris -> RE: FPC.Root (16.May2008 9:43:44 AM)

I noticed that there is not EXE.  you have to unregister one of the DLLS.  I'm thinking the one that ends with *ui.dll





Page: [1]