Solved

script help please

Posted on 2014-12-19
4
113 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 52

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

862 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

25 Experts available now in Live!

Get 1:1 Help Now