Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Wscript for Windows XP

The following script works fine on my Windows 7 computer.

I works fine on one of my XP computers but NOT on another.
script follows

public objShell
objShell = create_object("WScript.Shell")
if objShell = 0
     message "Object did not open"
end if
objShell.Run("C:\Windows\explorer.exe ::{2227A280-3AEA-1069-A2DE-08002B30309D}")

Any help greatly appreciated.
  • 2
1 Solution
Weird. I use a similar .vbs script to pop up the printers box on PCs....it has no problems.

set shell = createobject("wscript.shell")
myprinters = "::{2227A280-3AEA-1069-A2DE-08002B30309D}"
shell.run myprinters

You could replace "shell.run myprinters" with:
shell.run "explorer.exe /e,/root," & myprinters
DaleWeberAuthor Commented:
I wonder if the problem lies in a Windows Update.  The computer in my office that runs the script is old, hasn't been turned on since September, so it has missed updates.

David Johnson, CD, MVPOwnerCommented:
Windows XP does not support the boot from vhd (dual boot).  Windows XP uses a different booting process than windows 7
DaleWeberAuthor Commented:
None of the comments address the issue.  The code fails at create_object("wscript.shell").  This indicates to me that files associated with "wscript.shell" are missing or corrupt.  I prefer not to scrub the machine and start over.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now