Solved

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

Posted on 2014-10-08
5
881 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 80

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 38

Accepted Solution

by:
Gerwin Jansen, EE MVE 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 38

Expert Comment

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

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

839 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