Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


install WSH

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,27036
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> install WSH
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 install WSH - 10/18/2005 3:14:53 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
Hi,

Can anyone tell me how to install (or reinstall) WSH?

I've searched the forum for "install WSH" and "reinstall WSH" but couldn't see anything relevant.

Any help is greatly appreciated.
 
 
Post #: 1
 
 RE: install WSH - 10/18/2005 3:41:09 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
Check here for your version of wsh:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp

For more info and docs:
http://www.visualbasicscript.com/m_24727/tm.htm

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to CeReReBus)
 
 
Post #: 2
 
 RE: install WSH - 10/18/2005 5:37:34 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
quote:

ORIGINAL: CeReReBus in http://www.visualbasicscript.com/m_27043/tm.htm (locked)

Hi,

This error:
Object required: "Wscript"

Is raised by the last line of this code:
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad"
Wscript.Sleep 1000

\\edit by Snipah: for in-depth info for this script: http://www.visualbasicscript.com/m_26981/tm.htm



I have tried installing "Windows Script 5.6 for Windows XP and Windows 2000"
from http://www.microsoft.com/downloads/details.aspx?FamilyId=0A8A18F6-249C-4A72-BFCF-FC6AF26DC390&displaylang=en

I have also searched the forum using "Object required Wscript" but I can't find the answer.

Any help is greatly appreciated.



1) it is not a promise, but try this: Set WScript = CreateObject("WSH.WScript")
2) are you admin on the PC
3) how is your Security setting for IE and windows? Any virusscanner that may be bugging?
4) what OS are you running?
5) is the above mentioned the complete script?

< Message edited by Snipah -- 10/18/2005 5:53:34 AM >


_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to CeReReBus)
 
 
Post #: 3
 
 RE: install WSH - 10/18/2005 6:05:13 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
 
Snipah,

Unfortunately, your code:
Set WScript = CreateObject("WSH.WScript")

produces this error:
ActiveX component can't create object: "WSH.Wscript"

Hmm, looks like I'm outa luck.  Maybe AutoIT or my own slideshow, but I hate not knowing why this doesn't work.

Thank you.

(in reply to Snipah)
 
 
Post #: 4
 
 RE: install WSH - 10/18/2005 6:10:50 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
have you considered the other options i gave you? It cannot be that any windows will not run Wscript....unbelievable...

Unfortunatly i cannot VNC your machine.......btw AutoIT is superb, many many many possibilities....

Let us know when you're stuck or whatever...it was fun helping you out as much as possible..

C-ya around.....



Snipah

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to CeReReBus)
 
 
Post #: 5
 
 RE: install WSH - 10/18/2005 6:13:50 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
Sorry, didn't see you other comments.

2) Yes, I am the admin -- though I'm not running the code as Admin
3) Security is low -- also the file has "hta" extension which seems to help with security.  Virus scanner disabled
4) OS = XP SP 2
5) Script was bigger, but I've isolated these lines in a seperate file for debugging:
<SCRIPT LANGUAGE="VBScript">
<!--
Dim objShell
Dim WScript
Set WScript = CreateObject("WSH.WScript")
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad"
Wscript.Sleep 1000
objShell.SendKeys "Hello"
-->
</script>

file is saved as "test3.hta"

(in reply to CeReReBus)
 
 
Post #: 6
 
 RE: install WSH - 10/18/2005 6:14:57 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
Thank you.
I really appreciate your efforts.
C ya.

(in reply to CeReReBus)
 
 
Post #: 7
 
 RE: install WSH - 10/18/2005 6:20:44 AM   
  Country73


Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
Try it again but name the test script as "test3.vbs"

'-------------------------------------------------------
Dim objShell
Dim WScript
Set WScript = CreateObject("WSH.WScript")
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad"
Wscript.Sleep 1000
objShell.SendKeys "Hello"
'--------------------------------------------------------

That will take care of the issue you're having. You won't be able to use WScript in an HTA.



(in reply to CeReReBus)
 
 
Post #: 8
 
 RE: install WSH - 10/18/2005 6:26:13 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
\\ edit: Hey Country73, didn't see you here...guess you were first, sorry for my double post....



quote:

AHA, you never mentioned you'd use it in HTA.....i also get the same error...

Paste the following in a VBS file: (test.vbs)

Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad"
Wscript.Sleep 1000
objShell.SendKeys "Hello"


i am almost certain this'll work, right???  HTA sometimes bugs with the Wscript.Shell, then i use the <object...> TAG


< Message edited by Snipah -- 10/18/2005 6:27:35 AM >


_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to CeReReBus)
 
 
Post #: 9
 
 RE: install WSH - 10/18/2005 6:36:37 AM   
  Country73


Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
Just a little quicker on the draw.

I ran into the same issue when I started messing around with HTA's.
Can't remember where I found it, or should I say information on it, but I wound up using a Timer to take care of the wscript.sleep.
It should be something like - window.setTimeout

Here's a little more information on it: window.setTimeout() 

< Message edited by Country73 -- 10/18/2005 7:05:01 AM >

(in reply to Snipah)
 
 
Post #: 10
 
 RE: install WSH - 10/18/2005 7:39:39 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
 
Yes, that's it.  You guys are good!

Sorry about not mentioning hta.  I tried "htm" and "hta" -- no difference, so I thought it irrelevant.  I didn't know about "vbs".  I am very new to VBS.

I'll go explore how to change the file to vbs format (I have html in there).

Can I ask if it's possible to move the mouse in an hta or htm file?  And how?

Regardless, thank you for solving this -- I searched and searched the web, and I would have kept going for quite some time.


(in reply to Country73)
 
 
Post #: 11
 
 RE: install WSH - 10/18/2005 7:50:56 AM   
  Country73


Posts: 733
Score: 10
Joined: 8/25/2004
From: USA
Status: offline
Glad we could help out!


I don't have a "lot" of experience with HTA's, just started messing around with them myself, but I'm not sure about the whole "mouse movement" you're looking for.
When getting into HTA's you'll need to look at a lot more HTML and VBScript coding.
Right now I just use my HTA's for scripts that I've had to create to handle several different tasks that requires the user's input. It just makes it a lot cleaner and easier to follow, especially when dealing with individuals that are not used to VBScript.
(Basically creating a form for them to fill out instead of going through a lot of "pop-up" InputBox's for them to fill in.)

(in reply to CeReReBus)
 
 
Post #: 12
 
 RE: install WSH - 10/18/2005 8:02:23 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
 
Well, thanks again.  If I had to emote, I'd probably:   


Now I'll go explore how to isolate the vbs from the html file.

(in reply to Country73)
 
 
Post #: 13
 
 RE: install WSH - 10/18/2005 8:36:49 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
Snipah,

You said:
HTA sometimes bugs with the Wscript.Shell, then i use the <object...> TAG

Could you possibly show me an example of such?

(in reply to CeReReBus)
 
 
Post #: 14
 
 RE: install WSH - 10/18/2005 10:45:09 AM   
  dogboyaa

 

Posts: 26
Score: 0
Joined: 12/20/2004
From:
Status: offline
I have noticed this issue too I simply dont include the Wscript part in CreateObject. Also I dont beleive I have never got wscript.sleep to work either.

(in reply to CeReReBus)
 
 
Post #: 15
 
 RE: install WSH - 10/18/2005 8:19:32 PM  1 votes
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
Place this in the HEAD section before TITLE:

<OBJECT ID="objShell" CLASSID="clsid:{72C24DD5-D70A-438B-8A42-98424B88AFB8}" ProgID="WScript.Shell.1"></OBJECT>

experiment with the .1 it may be different on your system, you could also check the registry for that CLSID and see what's it called...

Snipah

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to CeReReBus)
 
 
Post #: 16
 
 RE: install WSH - 10/19/2005 2:17:05 AM   
  CeReReBus

 

Posts: 21
Score: 0
Joined: 10/16/2005
Status: offline
Snipah,

That's it!  You did it!

I'm sure I would never have figured that out.

Thank you.

(in reply to Snipah)
 
 
Post #: 17
 
 RE: install WSH - 10/20/2005 4:19:41 AM   
  TNO


Posts: 1302
Score: 12
Joined: 12/18/2004
From: thenewobjective.com
Status: online
quote:

<OBJECT ID="objShell" CLASSID="clsid:{72C24DD5-D70A-438B-8A42-98424B88AFB8}" ProgID="WScript.Shell.1"></OBJECT>


You know....I've been looking for that CLASSID for about a month now.

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to CeReReBus)
 
 
Post #: 18
 
 RE: install WSH - 10/20/2005 4:42:29 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
All you had to do is ask.... LOL



_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to TNO)
 
 
Post #: 19
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> install WSH Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts