Help - Search - Members - Calendar
Full Version: Spaces in path -AutoIt
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   


Google Internet Forums Unattended CD/DVD Guide
BoardBabe
The paths below contains spaces. The $installerpath executable runs fine, but does not loadinf the $inipath, cause there are spaces in path.

CODE
; Installation file paths.
$installerpath = @ScriptDir & "\klmcodec.exe"
$inipath = @ScriptDir & "\klmcp.ini"


CODE
Run($installerpath & " /loadinf=" & $inipath)


Need the abowe transformed to as follows.

C:\some path\klmcodec.exe /loadinf="C:\some path\klmcp.ini"
MHz
CODE
; Installation file paths.
$installerpath = @ScriptDir & "\klmcodec.exe"
$inipath = @ScriptDir & "\klmcp.ini"

Run($installerpath & ' /loadinf="' & $inipath & '"')


You need to wrap the double quotes, for the parameter, if it has spaces. For this use single quotes. I use single quotes by default, so when you come across a line like this, it seems simpler to wrap.
' " ' = wrapped double quotes.

newwink.gif
BoardBabe
Perfect biggrin.gif




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.