Solved

Wscript for Windows XP

Posted on 2014-01-22
4
233 Views
Last Modified: 2014-06-23
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.
0
Comment
Question by:DaleWeber
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
ZabagaR earned 500 total points
Comment Utility
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
0
 

Author Comment

by:DaleWeber
Comment Utility
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.

Dale
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
Windows XP does not support the boot from vhd (dual boot).  Windows XP uses a different booting process than windows 7
0
 

Author Closing Comment

by:DaleWeber
Comment Utility
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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Let’s list some of the technologies that enable smooth teleworking. 
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now