December 5, 200520 yr Hi ive tried installing RealVNC silently, if i run it from run it installs fine if i try and do it through a batch file i get invalid switch. ive tried with inverted commas and without but to no joy, what am i doing wrong?@ECHO Installing RealVNCstart /wait "t:\laptop installation\vnc\vnc.exe" /silent@ECHO Installing Password"\\headofficedc\it\laptop installation\vnc\vncremotepass.reg"Also does anyone know how to automatically add the reg file to the registry without having it prompt the user?Thankssuperblades
December 7, 200520 yr You have to put /silent inside the quotes, otherwise it will be passed to the start command, hence the "invalid switch" error. Works every time.
December 8, 200520 yr Try not to use installation paths with spaces, and you never need to worry about what goes inside the quotes, and what goes outside the quotes, etc. Just a suggestion, from experience screwing things up .
December 8, 200520 yr Comes down to a basic Start /?This will not work:start /wait "notepad"This will work:start /wait "title" "notepad"Even this will work:"notepad"The 1st pair of double quotes is reserved for the title with using Start.To be honest, why use the Start command on an executable installer as it will wait by default ? If you install an msi, just call msiexec to install it, again no Start command used.If you want to run a file that has an associated executable to run it, then you could use the Start command which will search the registry for the associated executable to run the file.To run a txt file without specifing the executable to run it, then use Start /wait to run it with the default executable for the association of txt files.@echo off & echo "Just a test" >> "%systemdrive%\test.txt" & @echo onstart /wait "" "%systemdrive%\test.txt"Choosing the correct method should return expected results.@ECHO Installing RealVNC"t:\laptop installation\vnc\vnc.exe" /silent@ECHO Installing PasswordRegedit /s "\\headofficedc\it\laptop installation\vnc\vncremotepass.reg" Edited December 8, 200520 yr by MHz
August 5, 200620 yr Hi ive tried installing RealVNC silently, if i run it from run it installs fine if i try and do it through a batch file i get invalid switch. ive tried with inverted commas and without but to no joy, what am i doing wrong?@ECHO Installing RealVNCstart /wait "t:\laptop installation\vnc\vnc.exe" /silent@ECHO Installing Password"\\headofficedc\it\laptop installation\vnc\vncremotepass.reg"Also does anyone know how to automatically add the reg file to the registry without having it prompt the user?Thankssuperbladesi used start c:\vnc.exe /verysilent /sp-it's install perfect but what is the registercode of the remote pasword?grts Edited August 5, 200620 yr by kristoff
August 5, 200620 yr Correct syntax: @ECHO Installing RealVNCstart /wait "" "t:\laptop installation\vnc\vnc.exe" /silent@ECHO Installing Passwordstart /wait "" "regedit" /S "\\headofficedc\it\laptop installation\vnc\vncremotepass.reg"Don't forget, the first " " is for title of opened window ... you can replace "" by "Installation VNC ..."
Create an account or sign in to comment