basic help to run an application from WSH
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
hello,
Apologies for such a basic question, but I've looked everywhere and
nothing is helping.
I'm just learning vbscript for wsh and here is my first script, saved
in file "<file>.vbs":
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "<file path of file.vbs>"
Where <...> is a full file path such as "c:\documents and
settings\[...]" etc.
When I run this by selecting the file I always get a
Script: <script file path>
Line: 2
Char: 1
Error: THe system cannot find the file specified.
Code: 80070002
Source: (null)
However if I just move the file to c:\, so the path is "c:\<file>" the
file opens.
Also if I cut and paste the exact file path from the script into the
Run box on the start menu, the file opens.
Any help with this?
Many thanks.
.
Relevant Pages
- Re: Has anyone played with this script? http://www.microsoft.com/technet/scriptcenter/resources/scri
... And what about file path? ... Now if we take this large list, and run a script similar to the example ... And how about spyware that's a .dll or COM object? ... > policies in Windows which would prevent malicious code from taking on ... (microsoft.public.scripting.vbscript) - Re: Script to set folder attributes?
... I'm probably overlooking something very stupid here - maybe I'm missing a certain library or assignment or something??!? ... I'm also using a "C:\Documents and Settings\MyUserName\ etc" file path - I think in VB I'm supposed to do something to handle the spaces in the name - am I supposed to do something in a script too? ... (microsoft.public.scripting.vbscript) - Re: Has anyone played with this script? http://www.microsoft.com/technet/scriptcenter/resources/scri
... While I haven't taken it to the extreme that the referenced script does, ... I have 165 lines in my dangerously incomplete known spyware exe list ... Although a file path check would not preclude a spyware ... fat clients I deployed were locked down with no admin rights and I had ... (microsoft.public.scripting.vbscript) - Re: basic help to run an application from WSH
... I found that enclosing the file path in -three- sets of quotation ... marks, such as ... I'm just learning vbscript for wsh and here is my first script, ... Run box on the start menu, the file opens. ... (microsoft.public.scripting.vbscript) - Re: AppleScripting Attachments in Entourage
... If you have already set the script variables in FileMaker Pro, ... Note that the file path for AppleScripts is different than the file ... because AppleScript file paths contain ... (microsoft.public.mac.office.entourage) |
|