Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 24th, 2006, 11:04 PM
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 :
===============================================
<package>

   <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

         oShellLink.Save

      </script>

   </job>
==========================================
but it create an Error as :
=======================Error==========
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.



Shahhussain
__________________
Shahhussain
Reply With Quote
  #2 (permalink)  
Old August 25th, 2006, 07:38 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Its not an asp script, its a WSH script and needs to be saved with a .vbs extension. That lanague VBScript does not make a script an ASP page, its the methods, functions, and procedure calls you make within a page that define it as such.

What you are doing above is designed to be executed on a local pc, not executed on a web browser.

"The one language all programmers understand is profanity."
Reply With Quote
  #3 (permalink)  
Old October 3rd, 2006, 03:05 PM
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

thanks to reply to my question.
I want to use this script in my web site,through any user can open
Notepad and can write as user can use his/her own OS notepad.

Shahhussain
Reply With Quote
  #4 (permalink)  
Old October 3rd, 2006, 03:11 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You are gong to need to use a COM component to embed an application in that case; simple fact of the matter is, when you execute the above script via a website, it does not trigger anything on the client machine and it never will (unless the user downloads the script and executes it themselves on their pc)

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with WScript.Shell object ninja_kornjaca Classic ASP Components 6 June 9th, 2008 01:35 AM
wscript pull data only by current date putermikey Classic ASP Professional 1 October 31st, 2006 06:49 AM
Error in WScript.CreateObject pankaj.talk Pro VB.NET 2002/2003 1 June 5th, 2006 03:34 PM
WScript RTC Classic ASP Basics 2 June 8th, 2005 04:03 AM
Wscript Permissions Problem orph351 Classic ASP Components 0 September 4th, 2003 03:25 PM



All times are GMT -4. The time now is 10:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.