?
Solved

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

Posted on 2014-10-08
5
Medium Priority
?
998 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 82

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 2000 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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

800 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