Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Visual Basic script error

Visual Basic script error

Scheduled Pinned Locked Moved Visual Basic
linuxtoolshelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    subramanyeswari
    wrote on last edited by
    #1

    Hi I have the following line in my vbscript

    set dllreg = "wscript.shell"
    dllreg.run "regsvr32 /u C:\Program Files (x86)\histori.dll"

    it is coming out saying "Loadlibrary C:program" failed how to give c:\program files (x86) for that. Also i want it to run silently. How to do that? Please do let me know

    A 0 2 Replies Last reply
    0
    • S subramanyeswari

      Hi I have the following line in my vbscript

      set dllreg = "wscript.shell"
      dllreg.run "regsvr32 /u C:\Program Files (x86)\histori.dll"

      it is coming out saying "Loadlibrary C:program" failed how to give c:\program files (x86) for that. Also i want it to run silently. How to do that? Please do let me know

      A Offline
      A Offline
      Andy Missico
      wrote on last edited by
      #2

      regsvr32 /? regsvr32 /s /u "C:\Program Files (x86)\histori.dll" Therefore, you are missing the quote delimiters from the path. dllreg.run "regsvr32 /u ""C:\Program Files (x86)\histori.dll"""

      1 Reply Last reply
      0
      • S subramanyeswari

        Hi I have the following line in my vbscript

        set dllreg = "wscript.shell"
        dllreg.run "regsvr32 /u C:\Program Files (x86)\histori.dll"

        it is coming out saying "Loadlibrary C:program" failed how to give c:\program files (x86) for that. Also i want it to run silently. How to do that? Please do let me know

        0 Offline
        0 Offline
        0x3c0
        wrote on last edited by
        #3

        You need to enclose the path in quotes. VBScript needs these to be escaped properly as double quotes. So the final line would be

        dllreg.run "regsvr32 /u ""C:\Program Files (x86)\histori.dll"""

        Either way, I'm surprised that setting dllreg to a string worked. Normally CreateObject is used

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups