Sign in to follow this  
Followers 0
spachtler

run() with $variables and spaces in path

6 posts in this topic

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?

Share this post


Link to post
Share on other sites



i can it ... are you sure of that last line ?

?

it isn't this ?

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


-jaenster

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

some like that is the problem ..

Edit : Run will work ..eh.. Always

Edited by jaenster

-jaenster

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

this also works:

FileGetShortName

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  
Followers 0