Solved

Cannot get WshShell.run to work on Windows7 64-bit OS

Posted on 2014-10-08
5
798 Views
Last Modified: 2014-10-13
The following code works fine on Windows 7  32-bit computer but does not work on W7 64-bit box. Nothing happens when I click on the winres.exe icon.

sub resume1_onclick()

          Dim WshSHell
          Set WshShell = CreateObject("Wscript.Shell")
          WshSHell.run "Winres.exe",1,false
                     
       end sub
0
Comment
Question by:megnin
5 Comments
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
ID: 40370128
did you install the  .NET Framework SDK  (it is part of the full sdk)
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 40370147
My guess is the system doesn't know where to find the exe. Try specifying a full path and if that works make the script determine where it should find it based on the bitness.

Rob.
0
 
LVL 37

Accepted Solution

by:
Gerwin Jansen earned 500 total points
ID: 40370306
Save this as a .vbs file and double click it:

          Dim WshSHell
          Set WshShell = CreateObject("Wscript.Shell")
          WshSHell.run "Notepad.exe",1,false

Is notepad launched? If so: change Winres.exe to: c:\somepath\Winres.exe

Your Winres.exe is not in the PATH - that's why it is not starting.
0
 
LVL 1

Author Closing Comment

by:megnin
ID: 40377162
Thank you so much, Gerwin.  Sorry for the late reply.  I was out sick.  There was a *.lnk file pointing to an executable in a different path.  Thank!
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 40377246
No problem at all :)
0

Featured Post

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Join & Write a Comment

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 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

13 Experts available now in Live!

Get 1:1 Help Now