ewilliams Posted May 5, 2012 Share Posted May 5, 2012 (edited) I own a small computer repair shop and am trying to make a .bat file run directly after the installation of windows is finished. I will need it for windows 7 and xp. Here is my .bat fileSet RegQry=HKLM\Hardware\Description\System\CentralProcessor\0REG.exe Query %RegQry% | Find /i "x86" If %ERRORLEVEL% == 0 ( GOTO X86) ELSE ( GOTO X64):X86@echo offREG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN" /V "START PAGE" /D "http://facebook.com/pcmscomputers" /Fstart iexplore http://facebook.com/pcmscomputers"1 MSE Win 7 - 32.exe""Flash 32.exe""2 Drivers.exe"GOTO END:X64@echo offREG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN" /V "START PAGE" /D "http://facebook.com/pcmscomputers" /Fstart iexplore http://facebook.com/pcmscomputers"1 MSE Win 7 - 64.exe""Flash 64.exe""2 Drivers.exe":End Edited May 7, 2012 by Tripredacus Link to comment Share on other sites More sharing options...
jaclaz Posted May 5, 2012 Share Posted May 5, 2012 If I may, simpler :@echo offSET Bits=64Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0REG.exe Query %RegQry% | Find /i "x86" If %ERRORLEVEL% == 0 SET Bits=32REG ADD "HKCU\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN" /V "START PAGE" /D "http://facebook.com/pcmscomputers"'>http://facebook.com/pcmscomputers" /Fstart iexplore http://facebook.com/pcmscomputers"1 MSE Win 7 - %Bits%.exe""Flash %Bits%.exe""2 Drivers.exe"But what was the actual question? jaclaz Link to comment Share on other sites More sharing options...
ewilliams Posted May 5, 2012 Author Share Posted May 5, 2012 I am trying to make that .bat file automatically run directly after finishing the windows installation Link to comment Share on other sites More sharing options...
nice_guy75 Posted May 5, 2012 Share Posted May 5, 2012 I am trying to make that .bat file automatically run directly after finishing the windows installationYou can put that bat file or its shortcut in the startup folder, it will run automatically on first logon. Link to comment Share on other sites More sharing options...
ewilliams Posted May 5, 2012 Author Share Posted May 5, 2012 I know I could do that but I am trying to not have to click on it or anything. If I add it to the start menu I would be better off just clicking to start it then waiting for it to restart. Link to comment Share on other sites More sharing options...
ewilliams Posted May 5, 2012 Author Share Posted May 5, 2012 I am trying to make that .bat file automatically run directly after finishing the windows installationYou can put that bat file or its shortcut in the startup folder, it will run automatically on first logon.I know I can do that. But then I would have to restart the computer. I would be better off just clicking on the .bat file. I am trying to do it like in the Setupcomplete.cmd or something to that nature Link to comment Share on other sites More sharing options...
Yzöwl Posted May 5, 2012 Share Posted May 5, 2012 Although you are likely installing 64-bit onto every unit with a 64-bit CPU, I would suggest that you check the 'bitness' of the Operating System not that of the Hardware.Using a 'batch file', (your request), you can probably do this with WMIC.The following three lines could replace the first five lines previously provided by jaclaz@ECHO OFF&SETLOCALSET "Bits=32"WMIC OS GET OSARCHITECTURE|FIND "64">NUL&&SET "Bits=64"Off Topic, I think that you are very wrong opening someone's Internet Explorer browser without them having had the opportunity to configure or update/patch it first. Link to comment Share on other sites More sharing options...
ewilliams Posted May 5, 2012 Author Share Posted May 5, 2012 Although you are likely installing 64-bit onto every unit with a 64-bit CPU, I would suggest that you check the 'bitness' of the Operating System not that of the Hardware.Using a 'batch file', (your request), you can probably do this with WMIC.The following three lines could replace the first five lines previously provided by jaclaz@ECHO OFF&SETLOCALSET "Bits=32"WMIC OS GET OSARCHITECTURE|FIND "64">NUL&&SET "Bits=64"Off Topic, I think that you are very wrong opening someone's Internet Explorer browser without them having had the opportunity to configure or update/patch it first.I am opening it going to only that page just to make sure everything is functioning correctly But still can anyone help me????????????? Link to comment Share on other sites More sharing options...
Yzöwl Posted May 5, 2012 Share Posted May 5, 2012 I am opening it going to only that page just to make sure everything is functioning correctlyAll you are doing is forcing a specific web page with a specific browser, that really isn't an test of the effectiveness/stability of your installation onto their hardware. Apart from that, I'm not naive, If you were simply checking functionality on a one time only basis why have you set it as their start page too?Additionally, I see no reason to force flashplayer and MSE on every customer either, (if someone requires flash they will be given the opportunity to install it from most sites using it, and MSE is not everyone's choice, only yours, some may prefer a full security suite or free products from companies like BitDefender or AVIRA. BTW, if you wish to receive a response to your question, you'd be more likely to get your wish if you provided a reasonably detailed explanation on which method(s) of installation you are using with each specific Operating System. Link to comment Share on other sites More sharing options...
ewilliams Posted May 5, 2012 Author Share Posted May 5, 2012 I am opening it going to only that page just to make sure everything is functioning correctlyAll you are doing is forcing a specific web page with a specific browser, that really isn't an test of the effectiveness/stability of your installation onto their hardware. Apart from that, I'm not naive, If you were simply checking functionality on a one time only basis why have you set it as their start page too?Additionally, I see no reason to force flashplayer and MSE on every customer either, (if someone requires flash they will be given the opportunity to install it from most sites using it, and MSE is not everyone's choice, only yours, some may prefer a full security suite or free products from companies like BitDefender or AVIRA. BTW, if you wish to receive a response to your question, you'd be more likely to get your wish if you provided a reasonably detailed explanation on which method(s) of installation you are using with each specific Operating System.Most of my customers are around 50 years old and just want antivirus I set the homepage to my company facebook just so they can get updates they are free to change anything they wish. I just do that by default. I use a new windows installation and key for each install. Link to comment Share on other sites More sharing options...
maxXPsoft Posted May 5, 2012 Share Posted May 5, 2012 Yzöwl good griefnothing wrong with that every dang OEM on this earth plants a bunch of garbage pointing to their websites. I've been in all of them.Adding MSE is better than all the other garbage OEM do, 60 day trial'sXP is a little old and uses stuff unlike Win 7. With 7 you can add an xml and even add your webpage to it. You would want to call the bat in OOBEsystem most likely since mse can't install silently you must have it up and running and click through the dialogues. Examples here Read this earlier but was working on something else and would have to think of best way in XP Link to comment Share on other sites More sharing options...
wazer Posted May 6, 2012 Share Posted May 6, 2012 Yzöwl good griefnothing wrong with that every dang OEM on this earth plants a bunch of garbage pointing to their websites. I've been in all of them.Adding MSE is better than all the other garbage OEM do, 60 day trial'sXP is a little old and uses stuff unlike Win 7. With 7 you can add an xml and even add your webpage to it. You would want to call the bat in OOBEsystem most likely since mse can't install silently you must have it up and running and click through the dialogues. Examples here Read this earlier but was working on something else and would have to think of best way in XPHuh?, ofcouse you can install MSE silently. Link to comment Share on other sites More sharing options...
maxXPsoft Posted May 6, 2012 Share Posted May 6, 2012 (edited) yep forgot about the /s /runwgacheck. I generally run through it to set my settings like scan daily and time since reg key has permissions on it Edited May 6, 2012 by maxXPsoft Link to comment Share on other sites More sharing options...
Yzöwl Posted May 6, 2012 Share Posted May 6, 2012 Yzöwl good griefnothing wrong with that every dang OEM on this earth plants a bunch of garbage pointing to their websites. I've been in all of them.Adding MSE is better than all the other garbage OEM do, 60 day trial'sOf course there's something wrong with that; my issue isn't with sending someone to your website, it's with forcing it on first installation using a specific browser. Also if your doing this at your workplace you're likely connecting through a wired network, not the customers network. (so you are effectively testing the functioning in an environment under which it will not be used). If you are installing it at the customers premises then it is unlikely to work since their, usually wireless, network has not yet been configured.The prudent thing to do if your happy to force stuff on your customer like this would be to have this run once when they receive the PC and have set it up to their liking, and use a URL which is not linked to a specific browser.On the issue of software installation I'm afraid I'll never agree with condoning this practice. It is rude to force a particular piece of software onto someone else's machine, you should at least give them an on screen choice, the same way Microsoft had to with browsers.That said, the entire thought process here needs looking at. If I install a 64-bit Operating System onto a PC I'll already know that this will in turn involve installing 64-bit software where available; I certainly wouldn't need a batch file to work that out for me. I see no real benefit in creating a single installation media which installs both 32 and 64-bit and which is only as up to date as the versions of software integrated. Link to comment Share on other sites More sharing options...
ewilliams Posted May 6, 2012 Author Share Posted May 6, 2012 Ok it is not on customer machines it is on computers I am selling but thanks for everything I will try to find help elsewhere 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