Link to home
Start Free TrialLog in
Avatar of MOQINFRA
MOQINFRA

asked on

VB Script

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
SOLUTION
Avatar of Vijaya Reddy Pinnapa Reddy
Vijaya Reddy Pinnapa Reddy
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MOQINFRA
MOQINFRA

ASKER

Both the above ones dint work Unfortunately
Are you able to run mmc "E:\Program Files (x86)\Microsoft Configuration Manager Console\AdminUI\bin\adminconsole.msc" from a command promt?
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.