Solved

script help please

Posted on 2014-12-19
4
108 Views
Last Modified: 2014-12-19
Hi all I am writing a vb script to install ultraedit but I am having trouble with the concatenation.
strUEdit_Path = "C:\Program Files (x86)\IDM Computer Solutions\UltraEdit"
strCommand2 = strUEdit_Path & "\uedit32.exe" & Chr(34) & " /lic,e="123546|yuhmhilk"" & Chr(34)
WScript.Echo strCommand2
	If objFSO.FolderExists(strUEdit_Path) Then
	WshShell.Run strCommand2,0,True 
	End If

Open in new window


The strcommand2 should translate to the line below
C:\Program Files (x86)\IDM Computer Solutions\UltraEdit\uedit32.exe /lic,e="123546|yuhmhilk"
No matter how I add quotes or chr(34) I keep end of statement error. Please help
0
Comment
Question by:xzay1967
  • 2
4 Comments
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 250 total points
ID: 40509800
strUEdit_Path = "C:\Program Files (x86)\IDM Computer Solutions\UltraEdit"
strCommand2 = strUEdit_Path & "\uedit32.exe /lic,e=""123546|yuhmhilk"" "
WScript.Echo strCommand2
If objFSO.FolderExists(strUEdit_Path) Then
  WshShell.Run strCommand2,0,True 
End If

Open in new window

0
 
LVL 51

Accepted Solution

by:
Bill Prew earned 250 total points
ID: 40510091
Since the editor path has spaces in it I think you will need:

strUEdit_Path = "C:\Program Files (x86)\IDM Computer Solutions\UltraEdit"
strCommand2 = """" & strUEdit_Path & "\uedit32.exe"" /lic,e=""123546|yuhmhilk"""
WScript.Echo strCommand2
If objFSO.FolderExists(strUEdit_Path) Then
  WshShell.Run strCommand2,0,True 
End If

Open in new window

~bp
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 40510096
Correct, but that looks awful :-)
0
 

Author Closing Comment

by:xzay1967
ID: 40510097
Both solutions worked thanks. I tried both and wanted to be fair. I hope that was ok, thanks again
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

12 Experts available now in Live!

Get 1:1 Help Now