Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Windows XP and wscript.shell

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Windows XP and wscript.shell
  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 >>
 Windows XP and wscript.shell - 8/23/2003 3:18:09 AM   
  coolkidswriteviruses

 

Posts: 2
Score: 0
Joined: 8/23/2003
From: USA
Status: offline
I've been having the worst time with Visual Basic Script and Windows XP Professional SP1 (+hotfixes)

It appears that Microsoft has definately stripped VBScript down to a minimal scripting language worse than BATCH. You can't do ANYTHING with it. I can't get FileSystemObject to work at all, none of the commands ever complete successfully, yet there are no errors. I'm not really worried about that right now, but what I am worried about is getting the wscript.shell to work.

Example Code:

dim k
set k = createobject("wscript.shell")
k.run "cmd" (or "command")
set k = nothing

or even

dim k
set k = createobject("wscript.shell")
k.run "C:\windows\system32\cmd.exe"
set k = nothing

Neither of these work...

This doesnt work either

dim f
set f = createobject("scripting.filesystemobject")
f.createtextfile("C:\test.txt")
set f = nothing

What's the deal here? Is there some special magical setting that allows XP to run VBScript?

I'm accessing all of these from either .hta files, .vbs files, or .wsf files from the desktop, so there shouldn't be any security issues as far as the way I'm accessing it.

Killing Cancer -- One Stick at a Time
 
 
Post #: 1
 
 Re: Windows XP and wscript.shell - 8/23/2003 4:54:16 AM   
  coolkidswriteviruses

 

Posts: 2
Score: 0
Joined: 8/23/2003
From: USA
Status: offline
Hmmm, maybe I should turn off Script Blocking Service... lol

Killing Cancer -- One Stick at a Time

(in reply to coolkidswriteviruses)
 
 
Post #: 2
 
 Re: Windows XP and wscript.shell - 7/16/2004 7:00:03 AM   
  cohoj

 

Posts: 2
Score: 0
Joined: 7/16/2004
From:
Status: offline
I have been experience similar problems with XP and Wscript. One of them is when I call more than one script to a window. I can't activate it. The window just blinks. My work around is to wshell.sendkeys "%{TABB}" to activate the window. I did download the new Wscript from MDSN but I still have problems..

(in reply to coolkidswriteviruses)
 
 
Post #: 3
 
 
 
  

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 >> Windows XP and wscript.shell 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