Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8128487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:54:05+00:00 2026-06-06T07:54:05+00:00

Hi I am trying to create a script that opens a variety of internet

  • 0

Hi I am trying to create a script that opens a variety of internet pages and programs through a vbscript, but I am having difficulty opening pdf files that are located on a network drive, ive tried a bunch of commands but cannot get the files to open at all so any help would be appreciated 🙂

Set IE = CreateObject("InternetExplorer.Application") 
set WshShell = WScript.CreateObject("WScript.Shell")  
IE.Navigate "https://websiteaddress.com
IE.Visible = True 
Wscript.Sleep 3000 
WshShell.SendKeys "text"
WshShell.SendKeys "{ENTER}"
Wscript.Sleep 3000
WshShell.SendKeys "text"
WshShell.Sendkeys "{TAB}"
WshShell.Sendkeys "{TAB}"
WshShell.Sendkeys "text"
WshShell.SendKeys "{ENTER}"
Wscript.Sleep 3000
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
Wscript.Sleep 3000
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
Wscript.Sleep 3000
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
Wscript.Sleep 3000
WshShell.SendKeys "%{TAB}"
WshShell.SendKeys "%{F4}"
Wscript.Sleep 3000
WshShell.SendKeys "%{TAB}"
IE.Navigate "https://websiteaddress.com"
IE.Visible = True 
Wscript.Sleep 3000
WshShell.SendKeys "text"
WshShell.SendKeys "{ENTER}"
Wscript.Sleep 3000
WshShell.Run "H:\Shortcuts /k dir *.*"
WshShell.Run "Notepad.exe"
Wscript.Sleep 3000
WshShell.Run "calc.exe"

I am very new to vbscripting but I have tried the following two lines and neither work;

WshShell.Run "G:\pathtofile\thepdf.pdf"

WshShell.Run "NET USE G: \\server\share\thepdf.pdf"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:54:13+00:00Added an answer on June 6, 2026 at 7:54 am

    It surprises me you are new to vbscript and yet choose that language to do such things, vbscript is not very suited for this kind of work and the days of vbscript are counted, ruby would be a better choice if you want to use a program language and if you just want to automate things you would beter use http://www.autohotkey.com/

    Anyway, like this it should work in vbscript. The “” represents a single ” within a string.

    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run """g:\path with spaces\thepdf.pdf"""
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to create a script that opens a file and replace every 'hola'
I am trying to create a python script that opens a single page at
Im trying to create a script that will post a notification stored in a
I am trying to create a script that finds the closest store/location to a
I'm trying to create a script that takes a .txt file with multiple lines
I'm trying to create a Python script that would : Look into the folder
I'm trying to create a shell script that shall convert certain Files according to
I've been trying to create a script for myself that will allow me to
I have a python script that is trying to create a directory tree dynamically
I'm trying to write a script that will create a user in MediaWiki, so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.