JScript Encoder

Hey people.

I want to use the JScript Encoder to encode my scripts. Also, I want to know how to fullscreen the windows media player with JScript.NOTE: I have already tried the microsoft website and it didn't work in the command line or in the RUN dialog box! Regards.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wim ten BrinkSelf-employed developerCommented:
Encode scripts? That will never work since browsers and script engines won't decode those files.
varuncvaradaAuthor Commented:
They do. An example would be MSN Video. It uses encoded scripts and it has the tag setup like this: <script type="text/JScript.Encode">

It has really weird characters that protect it so that when it is modified, the weird characters are not on the keyboard to type, so the script will be totally changed. I want to use the same method but when I did the Microsoft way, it didn't work in the Run dialog box or Command Prompt. I want to how MSN Video was capable of doing that.
Wim ten BrinkSelf-employed developerCommented:
I think MSN Video just uses it's internal encoding routines. The encoding is built-in MSN Video but not in a lot of other tools that use scripting to execute tasks.
Basically, if you want to store a script and keep it invisible for others, you could encrypt or encode it yourself, but then it's only usable in applications that know how to decode it again.

I Googled a bit and found this link, though:

And the script encoder is at:

But this only works in a minority of products. People who use FireFox or other browsers, for example, can't do anything with it. And several virusscanners might actually block these scripts because they could possibly be unsafe. It might also require that your scripts are created in some specific XML-like way or just part of an ASP page. I tried the commandline tool with the file iisstart.asp that is installed by IIS and indeed, only the scripting parts were encoded. The tool works best from a command prompt, btw. But an encoded script file that hasn't been created in an XML/ASP style will not be recognized by the scripting engine as an encoded script file, thus it won't run.
varuncvaradaAuthor Commented:
This helped me with the decoder, but when I tried the encoder, it said:

Scripting Encoder Object <"Scripting.Encoder"> not found


how do i fix this problem?Regards
Wim ten BrinkSelf-employed developerCommented:
Weird. Then again, maybe there's something missing on your system. I've tried Google again for that error message you gave and found one page mentioning the error: http://aspturf.com/message_listing.asp?ID=10139
It's not helpful, though... Apparantly he used the wrong filename or something silly...

It could be that the encoder needs to be run once without any parameter so it registers itself as a COM object within your system...

I assume you're familiar with this:

Usage:   screnc [/?] [/s] [/f] [/xl] [/l ScriptLanguage] [/e DefaultExtension] <source> <destination>

Encode embedded script.
/? -    Help
/s -    Silent: display no messages
/f -    Force: allow file(s) overwrite (source == destination)
/xl -   Exclude Language: does not add the language directive in asp files
/l ScriptLanguage - Script Default Language: specify the default script language to be used when encoding
/e DefaultExtension - Default Extension: override actual file extension. Control the encoder to be loaded.
<source> The file to encode. It can have wildcard characters.
<destination> The destination file. When <source> contains wildcard characters, <destination> is the directory where to place the encoded files; files will keep the same name. When <source> and <destination> are the same /f must be used.

        screnc test.html encode.html
                encode test.html into encode.html
        screnc /f test.html
                encode and override test.html
        screnc /e html test.txt test1.txt
                treat text.txt as an html file, encode it into text1.txt
        screnc test.asp c:\myDir\test.asp
                encode test.asp into c:\myDir\test.asp
        screnc *.asp c:\myDir
                encode all the asp files in the current directory and place them in c:\myDir
        screnc -s -f *.sct
                encode all the scriptlet files in the current directory and override them. No message is displayed
        screnc -e asp *.* c:\myDir
                encode *all* the files in the current directory as asp files. Place these files in c:\myDir
        screnc -e asp -xl *.inc c:\myDir
                encode all the files with .inc extension as asp files. Does not add the @LANGUAGE directive at the top of the file
        screnc -l vbscript test.html encode.html
                encode test.html into encode.html. When a script tag with no language attribute is found, VBScript is assumed to be the default language. If -l is not specified, JScript is assumed for html and VBScript is the default for asp

But try running the application once without any parameters, then run it again. I'm not sure it works but okay, it's a guess since Scripting.Encoded refers to a COM object that doesn't appear to be registered...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

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.