all groups > visual studio .net enterprise tools > september 2003 >
You're in the

visual studio .net enterprise tools

group:

ACT loops when FSO evoked


ACT loops when FSO evoked BW
9/25/2003 1:18:19 PM
visual studio .net enterprise tools:
ACT runs endlessly when running following in ACT,dotnet
2002 ide, dotnet 2003 ide, and trying different computers
which are running win xp pro with latest service packs.

Have given the act agent full admin access. Had to run
regsrv32 against scrun.dll so that FSO would work when
this is just run as stand alone vbscript. Is there
something wrong with the code? Does ACT not like to allow
the accessing of local files into the stream?

Any suggestions would be welcomed. :)

Option Explicit

Dim oFso
Dim oTextFile
Dim sPath

'Need to place any text file at this location below
sPath = "C:\temp\test.txt"

Set oFso = CreateObject("Scripting.FileSystemObject")

'The following line is where the endless loop is initiated
Set oTextFile = oFso.OpenTextFile(sPath, 1)

'cleanup
oTextFile.Close
set oTextFile = Nothing
RE: ACT loops when FSO evoked andresnaOnline NO[at]SPAM online.microsoft.com.no.spam
10/2/2003 12:21:49 AM
BW,

I ran the same code you posted, on Visual Studio 2003 from the IDE and did
not get an endless loop. Are you sure you are actually getting an endless
loop?

Also, I did not have to change any permissions for the ACT agent, nor run
anything against scrun.dll... I am not sure why you did that.

Bottom line, the exact same code ran only once. Make sure in the test
properties you set it up for only 1 iteration, just to make sure there is
no endless loop. If the test is set to run more than 1 time or for a
period of time, then you will repeat the same code execution over and over.


Hope this helps.

-Andrés
RE: ACT loops when FSO evoked BW
10/2/2003 3:04:50 PM
Thankyou for proving that File System Object works inside=20
of the ACT UI. It inspired the following solution:

My series of events which others may run into:

When I first ran a test VBScript on its own, I got an=20
error that FSO had not been a registered activex=20
component. To solve this, I opened a cmd window and did=20
the usual registration of a dll by doing,

regsvr32 c:\%system%\scrrun.dll

Was then able to run any VBScript, however FSO could not=20
be evoked from an ACT project (ACT UI or ACT Visual ide).

I then uninstalled ACT from .Net and reinstalled ACT=20
for .Net 2003. Still could not evoke and use the FSO from=20
within ACT, however I could run FSO from stand alone=20
VBScripts. I even gave the ACT user full admin rights.

Today, I unregistered the dll which contains FSO by,

regsvr32 /u scrrun.dll=20

and then reregisterd the same dll by,

regsvr32 scrrun.dll

I then opened up ACT and ran SUCCESSFULLY a script which=20
evoked FSO. Everything works fine and I leave it to=20
Microsoft to determine the mystery why one has to=20
unregister the scrrun.dll and then re-register it, OR does=20
one need to install ACT for .Net 2003 and then re-register=20
scrrun.dll???

- BW (Microsoft contract STE/SDET) MCSE.

[quoted text, click to view]
RE: ACT loops when FSO evoked BW
10/3/2003 4:00:19 PM
Here is the final solution to this freaking puzzle:
Each time I registered scrrun.dll, everything worked until=20
I rebooted the computer where for some reason scrrun.dll=20
had to be re-registerd again.

To get to the bottom of this mystery, I took a snap shot=20
(using VeriTest-Rational Install Analyzer) of the WinXP=20
system where scrrun.dll had been re-registered, rebooted=20
the system and then took another snap shot of the now=20
messed up scrrun.dll, ran a comparison and low and behold=20
after reading through the registry changes determined that=20
Norton Anti-virus takes the GUID for sccrun.dll and re-
points it towards their script blocking dll.

To properly solve this problem, I went into the Norton=20
AntiVirus options and turned off script blocking, rebooted=20
and now all is fine. Sheeeeeeeeesh!!

Bottom line is that ACT does not know that scrrun.dll has=20
been hi-jacked by Norton script blocking dll and just runs=20
the test script forever until it times out.


[quoted text, click to view]
RE: ACT loops when FSO evoked andresnaOnline NO[at]SPAM online.microsoft.com.no.spam
10/6/2003 8:09:02 PM
Unbelievable!

Great catch BW! I did not know Norton AV would re-map your script engine
in this manner! I hope nobody sees this problem again, but if they do I
will make sure to note it for future reference. I am curious why the
problem did not occur from a simple VBScript though, and only occurred from
inside ACT.

Odd.

Anyway, thanks for the update and good luck.

-Andrés
AddThis Social Bookmark Button