Jump to content

run() with $variables and spaces in path


 Share

Recommended Posts

hello,

i solved the problem to execute an exe with spaces in path by using this ' ' single quotes.

but this dont work if i use variables.

example:

$dvdpre = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CloneDVD2", "InstallLocation")

this is

D:\Elaborate Bytes\CloneDVD2

then i want to run:

Run ($dvdpre & "\CloneDVD2-uninst.exe", $dvdpre)

it dont work! hope you can help?

Link to comment
Share on other sites

without the workingdir, it dont work too.

but i solved it anyway, found another registryvalue with

the complete uninstall string for dos. this works fine:

$dvdun = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CloneDVD2", "UninstallString")
  Run ($dvdun)

$dvdun is:

"D:\Elaborate Bytes\CloneDVD2\CloneDVD2-uninst.exe" /D="D:\Elaborate Bytes\CloneDVD2"
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...