Solved

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

Posted on 2014-10-08
5
852 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 79

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, 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 37

Expert Comment

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

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum 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.

810 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