Hi all,

I have a simple script (part of HTA file) as follows:
Code:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("\\" & strComputerName & "\c$\Windows\System32\CCM\Logs")
Set colSubfolders = objFolder.Files

For Each objSubfolder in colSubfolders
strLogLoc = "\\" & strComputerName & "\c$\Windows\System32\CCM\Logs" & objSubfolder.Name
strHtm = strHtm & "<tr onmouseover=""this.className='tblhover'"" onmouseout=""this.className='tblnorm'""><td width=""500""> " & objSubfolder.Name & "<td>" & fnmemory(objSubfolder.Size) & "</td><td><a href=""#"" onclick=OpenLog(strLogLoc)>test</a></td><td>" & strLogLoc & "</td></tr>"
Next

Sub OpenLog(strLogLoc)
	msgbox("OpenLog has been reached with value " & strlogloc)
End Sub
The problem is at strLogLoc:
- the OnClick event generates a "Variable undefined" error
- simply outputting the variable shows a full concatened path in the exact way I would want to see it

If I replace...
Code:
onclick=OpenLog(strLogLoc)
with
Code:
onclick=OpenLog(""Woopsie"")
...then the OpenLog sub is entered and performed nicely (including the passed on variable).

I have no idea what I'm doing wrong and I would really like this to work!


Many many thanks in advance!

Regards