View Single Post
  #1 (permalink)  
Old August 24th, 2006, 11:04 PM
shahhussain shahhussain is offline
Authorized User
Join Date: Dec 2005
Location: Mingora, NWFP, Pakistan.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shahhussain Send a message via Yahoo to shahhussain
Default Please help me in WScript.Shell scripting

Hello friends I am using the following code :

   <job id="vbs">

      <script language="VBScript">

         set WshShell = WScript.CreateObject("WScript.Shell")

         strDesktop = WshShell.SpecialFolders("Desktop")

         set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut Script.lnk")

         oShellLink.TargetPath = WScript.ScriptFullName

         oShellLink.WindowStyle = 1

         oShellLink.Hotkey = "CTRL+SHIFT+F"

         oShellLink.IconLocation = "notepad.exe, 0"

         oShellLink.Description = "Shortcut Script"

         oShellLink.WorkingDirectory = strDesktop



but it create an Error as :
LIne No 7
Char No 10
Error: Object Required "WScript"
Code 0
I have copy and paste this code form microsoft website and save this code with .asp extention.
Please any body hlep me that what object I need to install to run this script and from where can i find that object or software.
Thanks you all in advance.