superblades Posted December 5, 2005 Share Posted December 5, 2005 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 Link to comment Share on other sites More sharing options...
cipher982 Posted December 7, 2005 Share Posted December 7, 2005 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. Link to comment Share on other sites More sharing options...
cluberti Posted December 8, 2005 Share Posted December 8, 2005 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 . Link to comment Share on other sites More sharing options...
MHz Posted December 8, 2005 Share Posted December 8, 2005 (edited) 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, 2005 by MHz Link to comment Share on other sites More sharing options...
kristoff Posted August 5, 2006 Share Posted August 5, 2006 (edited) 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, 2006 by kristoff Link to comment Share on other sites More sharing options...
Sonic Posted August 5, 2006 Share Posted August 5, 2006 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 ..." Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now