Re: Launch "printers and faxes"

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Ian Matthews wrote:
> Hi TDM;
>
> When I execute this from the command line, it works just fine but from
> within a .VBS file I am getting:
>
> without quotes I get error "Expected end of statement"
> with quotes (which I think is wrong), I get error "Expected statement"
>
> How can I run this from within a VBScript?

set shell = createobject("wscript.shell")
shell.run "rundll32.exe SHELL32.DLL, SHHelpShortcuts_RunDLL PrintersFolder"


(watch out for wrapping in posting -
the above shell.run "blahblah" is all on one line.)

--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.



.



Relevant Pages

  • Re: Launch "printers and faxes"
    ... within a .VBS file I am getting: ... with quotes, I get error "Expected statement" ... How can I run this from within a VBScript? ...
    (microsoft.public.scripting.vbscript)
  • Re: Using quotes in a command line (Shell.run)
    ... I can call a command line from a VBS file. ... > I'm using the FIND command. ... I can't use the "quotes" inside statement. ...
    (microsoft.public.scripting.vbscript)
  • Using quotes in a command line (Shell.run)
    ... I can call a command line from a VBS file. ... I'm using the FIND command (to search a "string" in a text file). ... I can't use the "quotes" inside statement. ...
    (microsoft.public.scripting.vbscript)
  • Re: Using quotes in a command line (Shell.run)
    ... I can call a command line from a VBS file. ... > I'm using the FIND command (to search a "string" in a text file). ... I can't use the "quotes" inside statement. ...
    (microsoft.public.scripting.vbscript)
  • Re: [SLE] bash Script Using Filenames with Embedded Spaces
    ... If it is a literal space for the ls command, ... wonder what effect the quotes will have placed in different places ... Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings College ...
    (SuSE)