Why is GetDetailsOf() not working anymore?

Hi I have a very frustrating problem..

It seems like after reinstalling and doing a ASR Restore of my Windows 2003 Web server, then the GetDetailsOf() can only return values from the 0-8 parameter!
All parameters above doesnt work, and returns only an empty string!
You know the one that is being called via the Shell.Application object in ASP VBScript code.
(I need the Duration and BitRate of an MP3 file) - It worked before!

Any idea?
loopstudioAsked:
Who is Participating?
 
loopstudioAuthor Commented:
FINALLY!!! ;o)

I got Microsoft to admit it was a negative sideeffet of a Security Update and Service Pack 2!

That means I have also got a solution now! ;o)

RESOLUTION:

You may experience the above described unexpected result after the installation of security update 908531 (security bulletin MS06-015, which is also included in Windows 2003 Server Service Pack2).

The solution is to allow access to the extended file attributes by adding the following registry entry.

Either add the following entry, or copy the below lines, paste them in an empty text file and save it with the .reg extension. Then run the file to add the appropriate values into the registry.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached]"{875CB1A1-0F29-45DE-A1AE-CFB4950D0B78} {0000010B-0000-0000-C000-000000000046} 0x401"=dword:00000001

Your problem was a consequence introduced by the security update MS06-015 analogous to http://support.microsoft.com/kb/918165

So now I will stop this thread, and DEAR ROB!! I thank You very much for all your tries in finding the impossible solution.. but now I finally found it and I have pasted it here, so others can solve this frustrating problem.. ;o)
0
 
RobSampsonCommented:
Hi, perhaps it's due to ASP restrictions since the restore....try running this code from a VBS file on the local system.

Regards,

Rob.
If LCase(Right(Wscript.FullName, 11)) = "wscript.exe" Then
    strPath = Wscript.ScriptFullName
    strCommand = "%comspec% /k cscript  """ & strPath & """"
    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run(strCommand), 1, True
    Wscript.Quit
End If
 
strFile = "C:\Temp\MyFile.mp3"
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 
Set colSystemInfo = objWMIService.ExecQuery _
    ("Select Caption from Win32_OperatingSystem",,48)
For Each objItem In colSystemInfo
	strOS_Caption = objItem.Caption
Next
 
If InStr(strOS_Caption, "Vista") > 0 Then
	' Vista has 267 attributes
	ATTRIBUTE_COUNT = 266
Else
	' XP has 41 attributes
	ATTRIBUTE_COUNT = 40
End If
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(objFSO.GetFile(strFile).ParentFolder.Path)
If (Not objFolder Is Nothing) Then
	For Each strFileName In objFolder.Items
		If LCase(strFileName) = LCase(objFSO.GetFile(strFile).Name) Then
			For intItem = 0 To ATTRIBUTE_COUNT
				strResults = strResults & vbCrLf & "(" & intItem & ") " & objFolder.GetDetailsOf(objFolder.Items, intItem) & ": " & objFolder.GetDetailsOf(strFileName, intItem)
			Next
		End If
	Next
End If
Set objFolder = Nothing
Set objShell = Nothing
WScript.Echo strResults

Open in new window

0
 
loopstudioAuthor Commented:
How do I do that?

PS: Im using classic ASP.

Should I save it as a .VBS file on my computer and try run it?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
loopstudioAuthor Commented:
Hi Rob,

That code works.. so what should I do now?

How do I make it work again via my classic ASP code?
0
 
RobSampsonCommented:
When you run code similar to the above is ASP, do you get any errors?  Are you trying to get properties on the server-side, from server-side files?  Or client side VBScript on client-side files?

Regards,

Rob.
0
 
loopstudioAuthor Commented:
I run my code server-side as it is .ASP vb code and the destination-folder is also on the server. Im checking an MP3 file after it have been uploadd to a folder on the server.

The properties 0,1,2,3,4,5,6,7 & 8 works fine, but all numbers above 8 just returns an empty string - no errors!
I need the 21 and 22 which have been working all fine before the server reinstall and ASR Restore of the server.
0
 
loopstudioAuthor Commented:
I use this:

objFolder.GetDetailsOf(strFileName, 21)
0
 
RobSampsonCommented:
Hi there.

Here's a server side ASP page that should get the file properties.....but I think the user account that is running the web page needs to have read access to where the MP3 file is located.

Regards,

Rob.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Page</title>
 
<%
strFile = Server.MapPath("\Rolling Stones - Paint It Black.mp3")
 
ATTRIBUTE_COUNT = 40
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(objFSO.GetFile(strFile).ParentFolder.Path)
If (Not objFolder Is Nothing) Then
	For Each strFileName In objFolder.Items
		If LCase(objFSO.GetFileName(strFileName.Path)) = LCase(objFSO.GetFileName(strFile)) Then
			For intItem = 0 To ATTRIBUTE_COUNT
				strResults = strResults & "<BR>" & "(" & intItem & ") " & objFolder.GetDetailsOf(objFolder.Items, intItem) & ": " & objFolder.GetDetailsOf(strFileName, intItem)
			Next
		End If
	Next
Else
	Response.Write "Could not find " & objFSO.GetFile(strFile).ParentFolder.Path
End If
Set objFolder = Nothing
Set objShell = Nothing
Response.Write strResults
%>
</head>
 
<body>
</body>
</html>

Open in new window

0
 
loopstudioAuthor Commented:
Hi Rob,

Your example is EXACTLY what I were doing, as You can see in my original entry in this forum.

The problem is that the GetDetailsOf() suddently doesnt work and cannot rettrieve information above the 8. parameter!
I HAVE all permissions on the IUSR and USERS, have also tried with modify.

Now I have also tried the Wolosoft's MP3Info but here I get error '80004005'.

Im REALLY frustrated now..
I can see on Google that another person have had the same problem with just parameters 0..8 working after reinstall - so maybe I just have to call Microsoft and scream a little...

But can it really be true, its not even possible to BUY a DLL that does the trick!??
0
 
RobSampsonCommented:
Hmmm, I have found this article:
http://support.microsoft.com/kb/918165/

that states there may be problems with Shell functions after installing an update.

There is talk of aquiring a "newer" patch, but that's dated 2006 as far as I can tell.  Have you run through the Windows Update online to see if any new patches are available?

There is also talk of making sure you have a registry key of the following:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached\{A4DF5659-0801-4A60-9607-1C48695EFDA9} {000214E6-0000-0000-C000-000000000046} 0x401
with a value of 1

I have this on my system.

There's a few other registry keys you might like to check too.

I'm sorry you're frustrated. I can't replicate your issue so it makes it difficult.

Hopefully that article can shed some light for you.

Regards,

Rob.
0
 
loopstudioAuthor Commented:
Hi Rob,

Thank You for continuesly writing some ideas! :o)

I have checked, I have the registry entry like you.
I have also checked the article You sent, but it seems more like having something to do with HP and Nvidia problems.

Now I tried more than 10 DLL components to get ID3 tags like Duration and BitRate, and have also tried a component named MediaInfo, but it also returns an empty string for the Duration and BitRate parameters.
0
 
RobSampsonCommented:
Wow. What about WinAmp or Media Player? Do they still show the duration and bitrate as normal?

Rob.
0
 
loopstudioAuthor Commented:
The 10 DLL files have been giving me different problems.. So its not like all of them is giving empty sting values.. *s*
But some of them wouldnt register with REGSVR32.exe and so on.

But the problem with empty Duration & BitRate (all values above 8) is ONLY happening with activex access via ASP's: Server.CreateObject("Shell.Application").
You know it worked fine (the exactly same code) when I call it from a standalone .VBS scriptfile directly on the server!

Its very strange that NOBODY? in the world have the same problem (yes actually one other person) - but NOBODY have the reason & solution!
0
 
loopstudioAuthor Commented:
Here is the values I get with ObjFolder.GetDetailsOf(ObjFile, parameter) :

On Win2003server & XP (different on Vista):
0 = Name - WORKING
1 = Size - WORKING
2 = Type - WORKING
10 = Title (21) - NOT working - returns empty string!
14 = Comments (24) - NOT working - returns empty string!
16 = Artist (13) - NOT working - returns empty string!
17 = Album Title (14) - NOT working - returns empty string!
18 = Year (15) - NOT working - returns empty string!
19 = Track Number (27) - NOT working - returns empty string!
20 = Genre (16) - NOT working - returns empty string!
21 = Duration (36) - NOT working - returns empty string!
22 = Bit Rate (28) - NOT working - returns empty string!
0
 
RobSampsonCommented:
OK, can I confirm that you have tried the following?

1)
Try using
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objShell = Server.CreateObject("Shell.Application")

instead of just
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")

2)
Set Use Integrated Windows Authentication on the page with the code, via IIS Manager, Properties --> Security

3)
Then accessed the page using a Windows account with full rights to the path where the MP3 file is.

I think one of the main issues is that you may need to make sure that IUSR_YourMachine (or the authenticated user) has appropriate access to the folder in question.

Regards,

Rob.
0
 
loopstudioAuthor Commented:
If I run this:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test Page</title>
 
<%
strFile = "D:\site\mysite\upload\Sash! - Encore Une Fois.mp3"
 
ATTRIBUTE_COUNT = 40
 
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objShell = Server.CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(objFSO.GetFile(strFile).ParentFolder.Path)
If (Not objFolder Is Nothing) Then
      For Each strFileName In objFolder.Items
            If LCase(objFSO.GetFileName(strFileName.Path)) = LCase(objFSO.GetFileName(strFile)) Then
                  For intItem = 0 To ATTRIBUTE_COUNT
                        strResults = strResults & "<BR>" & "(" & intItem & ") " & objFolder.GetDetailsOf(objFolder.Items, intItem) & ": " & objFolder.GetDetailsOf(strFileName, intItem)
                  Next
            End If
      Next
Else
      Response.Write "Could not find " & objFSO.GetFile(strFile).ParentFolder.Path
End If
Set objFolder = Nothing
Set objShell = Nothing
Response.Write strResults
%>
</head>
 
<body>
</body>
</html>

Then I get this:

(0) Name: Sash! - Encore Une Fois
(1) Size: 3.601 KB
(2) Type: MP3 Format Sound
(3) Date Modified: 13-02-2009 02:19
(4) Date Created: 13-02-2009 01:45
(5) Date Accessed: 16-02-2009 16:19
(6) Attributes: A
(7) Status: Online
(8) Owner: MYSERVER\IUSR_MYSERVER
(9) Author:
(10) Title:
(11) Subject:
(12) Category:
(13) Pages:
(14) Comments:
(15) Copyright:
(16) Artist:
(17) Album Title:
(18) Year:
(19) Track Number:
(20) Genre:
(21) Duration:
(22) Bit Rate:
(23) Protected:
(24) Camera Model:
(25) Date Picture Taken:
(26) Dimensions:
(27) :
(28) :
(29) Episode Name:
(30) Program Description:
(31) :
(32) Audio sample size:
(33) Audio sample rate:
(34) Channels:
(35) Company:
(36) Description:
(37) File Version:
(38) Product Name:
(39) Product Version:
(40) : Open in New Window Select All
0
 
loopstudioAuthor Commented:
Doing a Server.CreateObject instead of just CreateObject didnt seem to have any difference at all.
0
 
loopstudioAuthor Commented:
I have both Windows Integrated access + anonymous IUSR.
0
 
loopstudioAuthor Commented:
How do I edit in my last comment?
0
 
loopstudioAuthor Commented:
My "IUSR_xxx" user account have modify + read & execute + list folder contents + read + write to that folder.

So yes, I believe I can answer YES to all your 3 questions..

Whats next? :o)

PS: I have put the points up to maximum 500 point!
I dont know is it just a fictive point system? Or do I have to pay real money? (Im a newbie *s*)
0
 
RobSampsonCommented:
Have you tried
regsvr32 -i C:\windows\system32\shell32.dll
or
regsvr32 -i c:\windows\system32\wshom.ocx

Regards,

Rob.
0
 
loopstudioAuthor Commented:
The regsvr32 -i shell32.dll went fine
The regsvr32 -i wshom.ocx didnt - it said:

RegSvr32
wshom.ocx was loaded, but the DllInstall entry point was not found
This file can not be registered.
0
 
loopstudioAuthor Commented:
Unfortunately it didnt seem like the first line helped.

But I dont know - its like the command is being runned in silent mode when using the -i parameter!
1) Is that ok? And what does the "-i" ?

2) And also, do You know how to make the second line run without problems?

I think this comment of yours is a very interesting path we are trying now - I think it COULD be something like this issue.. My best guess IS that something must be wrong in the registry somehow after the reinstall.
On thing I remembered from after the reinstall is that its like there are 2 administrators now!
The oiginal, and then a new that the system created upon reinstall.
3) Do You think this can affect also?
0
 
RobSampsonCommented:
What sort of symptoms do you see that indicate there might be two administrative accounts?  Is there a local account, and a domain account?

You can try both lines without the /i. The /i calls the DllInstall method, which sometimes doesn't work.

regsvr32 -i shell32.dll
regsvr32 -i wshom.ocx

When I get to work, I'll check the version of both of those files on my 2003 web server, and we'll check those against yours.

Regards,

Rob.
0
 
loopstudioAuthor Commented:
In my "Documents and Settings" folder I have these duplicated folders:

ADMINI~1~MY-
Administrator
Administrator.MY-SERVER
All Users
All Users.WINDOWS
Default User
Default User.WINDOWS
LocalService
LocalService.NT AUTHORITY
NetworkService
NetworkService.NT AUTHORITY

Do You think it have something to do with that Shell.Application works from DOS, but not from ASP?

Sounds good You will try check Your versions - I will do the same :)
And also try to registrate without the -i parameter.
Thanx
0
 
loopstudioAuthor Commented:
Both got registered succesfully without the -i parameter
0
 
loopstudioAuthor Commented:
versions:

SHELL32.DLL : 6.00.3790.4184 (srv03_sp2_gdr.071106-1258)

WSHOM.OCX : 5.6.0.8832

Both english versions.
0
 
RobSampsonCommented:
Hmmm, this article seems to refer to a re-install (over the top) of windows, where the .WINDOWS profiles have been created.
http://www.experts-exchange.com/Operating_Systems/WinXP/Q_21861940.html

Given that, it could be possible that you've got two installations of the Windows folder itself, and therefore two entirely different sets of DLLs....

The versions on my 2003 Server with SP2 are exactly the same as yours...

Maybe the only resolution here is a fresh install....

Regards,

Rob.
0
 
loopstudioAuthor Commented:
Ya, it have also been my "conclusion" for a while...

Therefore I have ordered a new computer! I get it tomorrow and try install from fresh..

I hope it will work.. Just sad if I/we never find the cause of the problem.. that means it can happen again!
Also 1 other person have created issues in forums all over the internet with the exact same problem - but it doens seem like anybody came up with a solution...
0
 
RobSampsonCommented:
Yeah, it is unfortunate to not find the cause.....but it's hard for others to diagnose when we don't have access to the system in question...

Can you tell if there are two installations of the Windows folder?

The Shell is such an integrated part of Windows, it would be hard to tell why it's not working....

Rob.
0
 
loopstudioAuthor Commented:
There is only 1 WINDOWS folder :)
0
 
loopstudioAuthor Commented:
My best guess is that something fucked up because of the reinstall.. as stated also in the links in the link You gave me..
Its just crazy (fucked up) sorry my language.. that people have to buy a new computer & install a fresh copy because
1) a normal Server Windows doesnt work and needs
2) ASR Restore and ASR Restore (which is Windows own recovery method) is not working and
3) then using Windows own reinstall feature and then it gets more fucked up..
Grr@Microsoft..

Sometimes thinking if its more easy to run ASP applications on APACHE server?
0
 
RobSampsonCommented:
Have you tried re-installing IIS?  Take a backup of your inetpub folder and then remove the IIS component and re-install it, if you want to try that?

Regards,

Rob.
0
 
RobSampsonCommented:
Hmmm, I just found out something interesting.

I have the following three boxes:
Windows 2003 Server with SP1
Windows 2003 Server with SP2
Windows XP Professional with SP2

I have set up IIS on each of them, enabled ASP, and the results of *both* 2003 Server boxes do *not* show the values beyond index 8, *but* the Windows XP (as a web server) *does* show those properties.

So there's some sort of security issue through ASP on 2003 Server that is stopping this from working.  I'll fiddle with my server and see what I can find out....

Regards,

Rob.
0
 
RobSampsonCommented:
I can't test this because I'm using a production server, but from more research, it seems that verclsid.exe is quite a problem....

What happens if you rename verclsid.exe to verclsid_old.exe or something, reboot, and see what happens?

Regards,

Rob.

0
 
loopstudioAuthor Commented:
VERY interesting Rob, that YOU have the same problem! UH......

But it HAVE been working for long time before on my 2003 version.. hmm..

I will try what You suggest.. What does this file?
0
 
RobSampsonCommented:
I'm not exactly sure what it does....it appears to scan files and decide whether to allow access....it was added after a particular security update from MS.

It seems a LOT of people have renamed verclsid.exe to overcome such problems.

Regards,

Rob.
0
 
loopstudioAuthor Commented:
Now, I have installed the BRAND NEW computer, totally fresh and with fresh Win 2003 web edition server.

It STILL doenst work!

BUT.. yes.. I HAVE installed all security updates..
So now I will try Your suggestion with the strange file..
0
 
loopstudioAuthor Commented:
Unfortunately it didnt help to rename the file & restart..

I think now I HAVE to call Microsoft.. and create a support incident... but I hope I dont have to PAY for this as I can only see it as Microsofts own error.
0
 
loopstudioAuthor Commented:
You said You had 3 servers, one working..
Can You see any other differences, besides the actual os?

I think of:
- locale setting
- directory security
- MIME types
- driveletter of harddrive?
- where is the website located? inside / outside www-root? Same disk as OS?
- IIS execute permissions
- IIS application pool
- IIS application name
- IIS version
- Windows security updates
- users that have permission to access the folder of the mp3 file
0
 
RobSampsonCommented:
The working one is just a Windows XP Pro workstation with IIS on it....

I'll check on these settings as much as I can later....although I did just think of one major difference with XP and Server OS's....

Enhanced Internet Security....I'm not at work, so can't check just yet, but on the 2003 Server, if you "uninstall" the Enhanced Internet Security from Add / Remove Windows Components, perhaps that will help....

Regards,

Rob.
0
 
loopstudioAuthor Commented:
ok, I will try that..

Hmm.. You remember You asked me to rename the VERCLSID.EXE to _old ?
Somehow there came a new copy of the original file all by itself, so now I have both:

VERCLSID.EXE
VERCLSID_OLD.EXE

in my system32 folder.

Do You know how that can be?
I just went in there to rename the _old back again to original name.
0
 
loopstudioAuthor Commented:
Sick of troubles... I just went to Microsoft & created an support incident here the other day..
They told they would reply within 8 hours, but now 2 days has gone and now its weekend!
Hmm..
0
 
loopstudioAuthor Commented:
It didnt help to remove the Enhanced Security from Internet Explorer.

Still only returns parameters from 0 to 8.
0
 
loopstudioAuthor Commented:
Ya, Hi Rob, as You can see I finally found the solution.. but because of all your effeorts in helping me, I have been giving You some of the points! ;o) Thank u!
0
 
RobSampsonCommented:
Wow man! Nice work.  I can confirm that does work. I have tested it on my 2003 Server and it works great!

It is completely undocumented on MS website, and I can't find mention of the same fix anywhere else.  So we were somewhat close with the adding of the cached keys for the NVidia drivers and stuff, it just wasn't the right one!  A search through the registry shows that the class:
{875CB1A1-0F29-45DE-A1AE-CFB4950D0B78} {0000010B-0000-0000-C000-000000000046}

is the "Audio Media Properties Handler", so that class is specific to your issue....we never would've found that without MS I don't think.....

I'm glad we hung in there, this was an interesting (albeit very annoying) problem.

Regards,

Rob.
0
 
loopstudioAuthor Commented:
Ya! REALLY frustrating!!

And yes.. NOWEHERE people have found the solution before now.. And YES Microsoft have also NOT documented it! I was told that from my Microsof contact!

The MOST annoying thing from MY point of view is that in my country its NOT possible to get free support from Microsoft and also its not possible just to report a "bug"!

Actually it would cost me several thousands 2.200,- DKK + 25% tax.. and "ONLY" if Microsoft admits that its their fault, then I dont have to pay...!!

So that why I waited with contacting Microsoft after having been trying and testing EVERYTHING else Myself.. including this forum + many other forums..

Somehow I just KNEW it had to have something with a security update to do.. But I HAD tried to remove more than the last 10 securityupdates without any luck.

Have a nice day! ;o)
0
 
RobSampsonCommented:
LOL!  Persistence pays off....well done.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.