fillalph Posted August 5, 2003 Share Posted August 5, 2003 I would like to add some code to allow me to choose if I want to install some software. For instance, if the computer is at home, I don't need a firewall because I have a router, but at university I don't have a router and want to run zone alarm.I was going to use choice to do this, but it isn't available for winxp.Can someone help me with this thanks.(basically something like echo do you want to install zone alarm? yes or no)]Bonkers[ Link to comment Share on other sites More sharing options...
b0r3d Posted August 5, 2003 Share Posted August 5, 2003 I guess i could write a program for you that would execute a different batch file for each program depending on which ones you selected... unless anyone else has an easier way? Link to comment Share on other sites More sharing options...
fillalph Posted August 5, 2003 Author Share Posted August 5, 2003 So there isn't a way to incorporate that into a batch eh? Would it be possible to add a vbs to do it? (I know aaronxp used a vbs to eject the cd tray).]Bonkers[b0r3d: Only do it if you have time and it won't be too much of a problem for you. Link to comment Share on other sites More sharing options...
b0r3d Posted August 5, 2003 Share Posted August 5, 2003 you can basically put anything in your batch. You just throw the progrms you want to run in the run once section of the winnt.sif file.The way i am thinking is ...Me develop a small little program that you execute at the end your windows install, using your winnt.sif file. This program will have a little check box for all the programs that you have on your cd, and you simply click which ones you want to install. That in turn, will run a separate batch file per application, installing that application.It seems like a long way round, but it'll work. Link to comment Share on other sites More sharing options...
Aaron Posted August 5, 2003 Share Posted August 5, 2003 You might be able to use a selection of commands such as 'goto', 'if' and get it to ask you yes/no options. If Yes, goto this section, if no, skip this section. It can be done I think, but haven't done it myself. Link to comment Share on other sites More sharing options...
b0r3d Posted August 5, 2003 Share Posted August 5, 2003 *remembers back to batch school*Yeah, that could be done. And i could be your man to do it! Link to comment Share on other sites More sharing options...
b0r3d Posted August 5, 2003 Share Posted August 5, 2003 The Choice command would be perfect for this little project, but sadly, its not supported in windows XP. Link to comment Share on other sites More sharing options...
OGreenOLeaf Posted August 5, 2003 Share Posted August 5, 2003 you could make alittle VB program that lists all the programs, and if checked calls a certain batch file for each one Link to comment Share on other sites More sharing options...
fillalph Posted August 5, 2003 Author Share Posted August 5, 2003 You might be able to use a selection of commands such as 'goto', 'if' and get it to ask you yes/no options. If Yes, goto this section, if no, skip this section. It can be done I think, but haven't done it myself.I prefer this over a small vb program, because I can't really code well in VB. "Hello World" is good for me I will see what I can come up with.]Bonkers[ Link to comment Share on other sites More sharing options...
fillalph Posted August 5, 2003 Author Share Posted August 5, 2003 I was looking at the commands, but the thing I can't figure out is how to set the variable. http://siri.akershus-f.kommune.no/dos/dos_lives_on.htm. How do I set that up?]Bonkers[ Link to comment Share on other sites More sharing options...
fillalph Posted August 5, 2003 Author Share Posted August 5, 2003 :BEGINSet /p %install%=Do you wish to install Zone Alarm Pro 4.0O(Y/N) :If %install%==Y Goto YESIf %install%==N GOTO NOEcho Please either say Y or NGOTO Begin:YesECHO Installing Zone Alarm Pro 4.0.123.012ECHO Please Wait...Start /wait %systemdrive%\installs\Z_Alarm\zapsetup.exe /s /norebootGoto END:NOECHO You chose not to install Zone Alarm Pro 4.0ECHO Now continuing with installationGoto END:ENDWill that work, any suggestions? Link to comment Share on other sites More sharing options...
b0r3d Posted August 6, 2003 Share Posted August 6, 2003 To test it, just whack echo commands in the install parts, and run it. Link to comment Share on other sites More sharing options...
b0r3d Posted August 6, 2003 Share Posted August 6, 2003 btw, i'd be happy to make you a small little vb program if you prefer that to dos commands. If your interested, just ICQ me. 21799755 Link to comment Share on other sites More sharing options...
fillalph Posted August 6, 2003 Author Share Posted August 6, 2003 Nah, thanks b0r3d, but I got the batch to work!The only change I needed to do was changeSet /p %install%=Do you wish to install Zone Alarm Pro 4.0O(Y/N):to Set /p install=Do you wish to install Zone Alarm Pro 4.0O(Y/N) : Link to comment Share on other sites More sharing options...
b0r3d Posted August 6, 2003 Share Posted August 6, 2003 npz 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