Jump to content
Sign in to follow this  
tjestr

Combining Variables

Recommended Posts

tjestr

Hello,

how do i combine Variables?

I want to execute a file "setup.msi" using "msiexec /i" which has spaces in its filepath.

Now i don't know how to solve this

Example:

$path= "c:\Test Folder 1\setup.msi"

$msiexec = "msiexec.exe /i"

Run($msiexec $path) <--- This doesn't work.

Share this post


Link to post
Share on other sites
BrettF

Hello,

how do i combine Variables?

I want to execute a file "setup.msi" using "msiexec /i" which has spaces in its filepath.

Now i don't know how to solve this

Example:

$path= "c:\Test Folder 1\setup.msi"

$msiexec = "msiexec.exe /i"

Run($msiexec $path) <--- This doesn't work.

Maybe...

Run($msiexec & $path)

That should work. :)

Share this post


Link to post
Share on other sites
BrettF
weaponx

Run(StringFormat('"%s" "%s"', $msiexec, $path))

Edited by weaponx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×