StarDusterII
asked on
MSScriptControl in .asp on 64bit server won't work
I have an .asp application that uses CreateObject("MSScriptCont rol.Script Control") so it can use the eval method to unescape an encoded string with special characters (ie. %A7). We work with a lot of foreign languages. This had worked fine, but when we moved it to a 64 bit server we get the "can't create object" error.
Doing a little searching it appears that there is only a 32 bit version of msscript.ocx. So, my questions are, (1) how can I make this run on a 64 bit server, (2) is there an equivalent function that can replace msscript, or (3) is there an alternative to decoding strings that works as well.
Function Unescape(s)
Dim scr
Set scr = CreateObject("MSScriptControl.ScriptControl")
scr.Language = "VBScript"
scr.Reset
Unescape = scr.Eval("unescape(""" & s & """)")
End Function
Doing a little searching it appears that there is only a 32 bit version of msscript.ocx. So, my questions are, (1) how can I make this run on a 64 bit server, (2) is there an equivalent function that can replace msscript, or (3) is there an alternative to decoding strings that works as well.
ASKER
You lost me there a bit... this is not a .vbs, it's an .asp (Active Server Page) served by IIS.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well, the original post started off with "I have an .asp application..." but I guess I could have made that a little clearer.
Anyway, your solution worked fine.
Anyway, your solution worked fine.
Thanks a lot for the points.
Glad it worked for you.
Glad it worked for you.
Click Start, click Run, type %windir%\SysWoW64\cmd.exe,
Then type
cscript yourVBScript.vbs
More from this link http://support.microsoft.com/kb/896456