VB Script

Posted on 2012-08-25
Last Modified: 2012-08-26
I wanted to open write a wrapper (VBS)

When i define Application as this in the first line

objAppName = """mmc %SystemRoot%\system32\dsa.msc"""

It works fine for me.

However i need to open another msc (mmc console application) which is located in E: and has spaces in the path

objAppName = """mmc E:\Program Files (x86)\Microsoft Configuration Manager Console\AdminUI\bin\adminconsole.msc"""

This doenst Work

Is there anyway i can make it work

I tried adding " at various places but i am not able to make it work as it doesnt recognize the path correctly i believe the space between Program and Files is causing issue
Question by:MOQINFRA
    LVL 9

    Assisted Solution

    100% it is the issue with space and right place of quotes.

    This may works in your case.
    objAppName="""C:\windows\system32\mmc.exe"" E:\Program Files (x86)\Microsoft Configuration Manager Console\AdminUI\bin\adminconsole.msc"

    Open in new window

    LVL 4

    Accepted Solution

    objAppName = "mmc ""E:\Program Files (x86)\Microsoft Configuration Manager Console\AdminUI\bin\adminconsole.msc"""

    Author Comment

    Both the above ones dint work Unfortunately
    LVL 4

    Expert Comment

    Are you able to run mmc "E:\Program Files (x86)\Microsoft Configuration Manager Console\AdminUI\bin\adminconsole.msc" from a command promt?

    Author Comment

    Ok I figured out the best way to do it

    When i used objAppName =  """mmc \""E:\Program Files (x86)\Microsoft Configuration Manager Console\AdminUI\bin\adminconsole.msc\"""""

    My script worked after that.

    thanks for all your help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    #Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
    #Citrix #Citrix Policies #XenDesktop #VDI #POC #Citrix Univeral Printer Driver #Citrix UPD
    How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now