June 1, 200620 yr Thanks smashly.It is important to learning that we make mistakes, we actually learn more from making mistakes than from never doing so. We probably get more than half a dozen problems per week relating to double quotes or the lack of, and it is good that a thread like this can be used to help others understand.As a rule, your filepaths and the vast majority of your filenames are under your own control. I would therefore suggest that they never contain spaces. On some occasions however, it is beyond our control, which is why we have to use the escape characters.
June 1, 200620 yr Look at it like this smashly.%PP%\AVG Anti Virus Program\autoavgsetup.exe would execute fine."%PP%\AVG Anti Virus Program\autoavgsetup.exe" would also execute fine from RunOnceEx. Difference between two is quote marks.I meant that is isn't necessary have a second set of quotes, unless the path has spaces AND it uses switches. The path does have spaces but doesn't have switches so you don't need a second set of quotes.I would therefore suggest that they never contain spaces.I second that, it's so much easier without. Edited June 1, 200620 yr by T D
June 1, 200620 yr You are still wrong, and here is some proof! I used the following batch file to represent the runonceex.cmd@ECHO OFFREG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx /V TITLE /D "Doing a Test" /F >NULREG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\000 /VE /D "Test App" /F >NULREG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\000 /V 1 /D "D:\Program Files\Standalone\1by1\1by1.exe" /F >NULPING -n 11 LOCALHOST>NULRUNDLL32 iernonce.dll,RunOnceExProcessGOTO :EOFThis is what happened when it ranNow all I was running was a switchless exe with a space in the file path. Now try it yourself and report back! Edited June 1, 200620 yr by Yzöwl
June 1, 200620 yr Author Yzöwls, it works finally. The problem was the slashes.Some of the other files didn't install right, but alast that is another different post when i figure it out or not.Thank you all for your help!
June 1, 200620 yr Ok, sorry to everyone. I was wrong. I was confused between xcopy and reg adds. There shouldnt be any spaces in the path for reg adds. But when copying files it is ok using quotes. Again I was confused. We do learn from our mistakes. I was only trying to help. Topic closed! lol Edited June 1, 200620 yr by X-Centric
Create an account or sign in to comment