larciel Posted February 3, 2005 Share Posted February 3, 2005 @ECHO OFFECHO Please wait as applications are installed. This may take several minutes.ECHOECHO.ECHO Installing Sun Java VM 5.0.1ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\jre501.exeECHO.ECHO Installing VB Runtime 6.0ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\vb6.exe /silentECHO.ECHO Installing .Net 1.1 SP1ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\netsp1.exeECHO.ECHO Installing Office XP ProfessionalECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\OfficeXP\setup.exe TRANSFORMS=oxp.MST /qb-ECHO.ECHO Installing Avant Browser 9.35ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\avant.exe /SECHO.ECHO Installing Adobe Reader 7.0ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\acro7.exeECHO.ECHO Installing Quicktime Alternative 1.3.9ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\quicktimealt138.exe /VERYSILENT /SP-ECHO.ECHO Installing Real Alternative 1.2.9ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\realalt129.exe /VERYSILENT /SP-ECHO.ECHO Applying Registry Tweak ver 1.0...REGEDIT /S %systemdrive%\backup\winapp\Regedit.regECHO.ECHO Applying Nero Registry Tweak REGEDIT /S %systemdrive%\backup\winapp\nero.regREM ftype will also show all registered typesassoc .blt=txtfileassoc .cue=txtfileassoc .diz=txtfileassoc .eml=txtfileassoc .iss=txtfileassoc .log=txtfileassoc .md5=txtfileassoc .nbi=txtfileassoc .nfo=txtfileassoc .nt=txtfileassoc .pif=txtfileassoc .sam=txtfileassoc .sif=txtfileassoc .sfv=txtfileassoc *=txtfileEcho.Echo Resetting PC, Please wait....sshutdown -r -t 30 -f -m "Windows XP will now restart in 30 Seconds..."here's part of my .cmd file to install program on first logon.i' was wondering if there's code to give user permission to abort installation of a program?exactly, i want to have option to skip installation of officexp and move on to next one.. way to trigger it would be display "press any key to skip installation" and show it for 5 seconds or so, and if input is given, skip, if not install officexp.i lack programing skills to find this out, i did search for it, but nothing exactly like this exists.. so i ask for help to all you gurus thank you in advance. i'd like to offer gmail acct or something for gratitude, but i don't have any atm Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 3, 2005 Share Posted February 3, 2005 (edited) Here is a vbs that uses the WsPopupIt Has A Built In Timer Yes Button = Set To Run A Radio Station Green Is Your Code To InstallWont Run With These '' Set oWS = WScript.CreateObject("WScript.Shell")' oWS.Run SD & "\backup\winapp\prog\jre501.exe"' wscript.sleep 100Will Run ' Are Removed And It Will Run Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run SD & "\backup\winapp\prog\jre501.exe" wscript.sleep 100Purple Is Text And Is Safe To Change Or DeleteRed Only Edit If You Know What You Are DoingBlue Are Varibles These Are For The Script, Edit Them If Needed Use CautionOrange Is Safe To Remove From ScriptSet WshShell = CreateObject("WScript.Shell")Z = Chr(95)Y = Chr(213)X = Chr(191)W = Chr(214)V = VbcrlfU = Chr(123)T = Chr(125)S = Chr(71)R = Chr(83)Q = Chr(77)Wscript.Sleep 150On Error Resume NextDim Shell, AP, UP, SD, WD, SP , SDISet Shell = WScript.CreateObject("WScript.Shell")AP = Shell.ExpandEnvironmentStrings("%AllUsersProfile%\")UP = Shell.ExpandEnvironmentStrings("%UserProfile%\")SD = Shell.ExpandEnvironmentStrings("%SystemDrive%\")WD = Shell.ExpandEnvironmentStrings("%windir%\")SP = Shell.ExpandEnvironmentStrings("%SystemDrive%\Program Files\")SDI = Shell.ExpandEnvironmentStrings("%SystemDrive%\Install\")B = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Hello And Lets Begin"B1 = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Good Bye ??"C = "Would You Like To Install " & V & "Sun Java VM 5.0.1" & V C1 = "1\YES" & V & space(5) & "Sun Java VM 5.0.1"& V C2 = "2\NO" & V & space(5) & "Will Not Install Sun Java VM 5.0.1" & V C4 = "Time Out" & V & space(5) & "If Nothing Pressed"& V & space(5) &"Then The Defualt Action Is To Install!"& V SN = "Preparing For Next" intButton = WshShell.Popup ( "Click a button to proceed." & V & B & V & C & V & C1 & V & C2 & V & C4 ,12 , "Test" ,4 + 48) select case intButton''''''''''TIME OUT ACTION case -1 TimeOut= WshShell.Popup ( "No Selection Was Made" & V & "Preparing Defualt Action" , 3, "Time Out Action" , 0 +64 ) WshShell.Popup "CLUBNETRADIO.Com",3 , "CLUB NET RADIO",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run "http://www.clubnetradio.com/listen.php?type=2&bitrate=high wmplayer.exe"' Set oWS = WScript.CreateObject("WScript.Shell")' WshShell.Popup "Preparing Sun Java VM 5.0.1",3 , "Sun Java VM 5.0.1",0+48 ' oWS.Run SD & "\backup\winapp\prog\jre501.exe"' wscript.sleep 100 WshShell.Popup B1 , 4 , ""& SN , 0 + 64 ''''''''''TIME OUT ACTION''''''''''YES ACTION case 6 YesRes = WshShell.Popup ( "Yes Was Selected" & V & "Preparing Install Of " , 4, "Install APP" , 0 +64 ) WshShell.Popup "CLUBNETRADIO.Com",3 , "CLUB NET RADIO",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run "http://www.clubnetradio.com/listen.php?type=2&bitrate=high wmplayer.exe"' Set oWS = WScript.CreateObject("WScript.Shell")' WshShell.Popup "Preparing Sun Java VM 5.0.1",3 , "Sun Java VM 5.0.1",0+48 ' oWS.Run SD & "\backup\winapp\prog\jre501.exe"' wscript.sleep 100 WshShell.Popup B1 , 4 , ""& SN , 0 + 64 ''''''''''YES ACTION ''''''''''NO ACTION case 7 SN = "No Was Pressed" & V & "Stopping The Install" & V & "Preparing For Next" NoRes = WshShell.Popup ( "No Was Selected" & V & B1 , 4, "" & SN , 0 +64 )''''''''''NO ACTION end select Wscript.quitNew Entry ECHO.ECHO Installing Sun Java VM 5.0.1ECHO Please wait...start /w %systemdrive%\backup\winapp\prog\SunJavaVM.vbsOld EntryECHO.ECHO Installing Sun Java VM 5.0.1ECHO Please wait...start /wait %systemdrive%\backup\winapp\prog\jre501.exe Edited December 29, 2005 by gunsmokingman Link to comment Share on other sites More sharing options...
larciel Posted February 3, 2005 Author Share Posted February 3, 2005 wow, so i should just edit your java.vbs and put command for officexp right?will try it out. thank you Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 4, 2005 Share Posted February 4, 2005 Yes This Can Be Edited To Run All Your Cmds Good Luck On Your Ua Link to comment Share on other sites More sharing options...
larciel Posted February 9, 2005 Author Share Posted February 9, 2005 was trying it out, but how do i remove the popup that opens up IE and WMP ?thanks Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 9, 2005 Share Posted February 9, 2005 Try Thisstart/w %sysyemdrive%\WMP10\MP10Setup.exe /q:A /c:"setup_wm.exe /Q /R:N /DisallowSystemRestore"set WshShell = CreateObject("WScript.Shell")Z = Chr(95)Y = Chr(213)X = Chr(191)W = Chr(214)V = VbcrlfU = Chr(123)T = Chr(125)S = Chr(71)R = Chr(83)Q = Chr(77)Wscript.Sleep 150On Error Resume NextDim Shell, AP, UP, SD, WD, SP , SDISet Shell = WScript.CreateObject("WScript.Shell")SD = Shell.ExpandEnvironmentStrings("%SystemDrive%\")B = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Hello And Lets Begin"B1 = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Good Bye ??"C = "Would You Like To Install " & V & "WMP 10" & V C1 = "1\YES" & V & space(5) & "WMP 10"& V C2 = "2\NO" & V & space(5) & "Will Not Install WMP 10" & V C4 = "Time Out" & V & space(5) & "If Nothing Pressed"& V & space(5) &"Then The Defualt Action Is To Install!"& V SN = "Preparing For Next"intButton = WshShell.Popup ( "Click a button to proceed." & V & B & V & C & V & C1 & V & C2 & V & C4 ,12 , "Test" ,4 + 48) select case intButton''''''''''TIME OUT ACTION case -1TimeOut= WshShell.Popup ( "No Selection Was Made" & V & "Preparing Defualt Action" , 3, "Time Out Action" , 0 +64 ) WshShell.Popup "CLUBNETRADIO.Com",3 , "CLUB NET RADIO",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run "http://www.clubnetradio.com/listen.php?type=2&bitrate=high wmplayer.exe"' Set oWS = WScript.CreateObject("WScript.Shell")' WshShell.Popup "WMP 10",3 , "Sun Java VM 5.0.1",0+48 ' oWS.Run SD & "%sysyemdrive%\WMP10\MP10Setup.exe /q:A /c:"setup_wm.exe /Q /R:N /DisallowSystemRestore"' wscript.sleep 100 WshShell.Popup B1 , 4 , ""& SN , 0 + 64 ''''''''''TIME OUT ACTION''''''''''YES ACTION case 6YesRes = WshShell.Popup ( "Yes Was Selected" & V & "Preparing Install Of " , 4, "Install APP" , 0 +64 ) WshShell.Popup "CLUBNETRADIO.Com",3 , "CLUB NET RADIO",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run "http://www.clubnetradio.com/listen.php?type=2&bitrate=high wmplayer.exe"' Set oWS = WScript.CreateObject("WScript.Shell")' WshShell.Popup "WMP 10",3 , "Sun Java VM 5.0.1",0+48 ' oWS.Run SD & "%sysyemdrive%\WMP10\MP10Setup.exe /q:A /c:"setup_wm.exe /Q /R:N /DisallowSystemRestore"' wscript.sleep 100 WshShell.Popup B1 , 4 , ""& SN , 0 + 64 ''''''''''YES ACTION ''''''''''NO ACTION case 7 SN = "No Was Pressed" & V & "Stopping The Install" & V & "Preparing For Next" NoRes = WshShell.Popup ( "No Was Selected" & V & B1 , 4, "" & SN , 0 +64 )''''''''''NO ACTION end select Wscript.quit Link to comment Share on other sites More sharing options...
larciel Posted February 14, 2005 Author Share Posted February 14, 2005 ok i removed the popup of radio w/ ' but now oxp_sp3.exe file won't run .. will i need to remove 'SD' infront of oxp_sp3.exe ?Set WshShell = CreateObject("WScript.Shell")Z = Chr(95)Y = Chr(213)X = Chr(191)W = Chr(214)V = VbcrlfU = Chr(123)T = Chr(125)S = Chr(71)R = Chr(83)Q = Chr(77)Wscript.Sleep 150On Error Resume NextDim Shell, AP, UP, SD, WD, SP , SDISet Shell = WScript.CreateObject("WScript.Shell")AP = Shell.ExpandEnvironmentStrings("%AllUsersProfile%\")UP = Shell.ExpandEnvironmentStrings("%UserProfile%\")SD = Shell.ExpandEnvironmentStrings("%SystemDrive%\")WD = Shell.ExpandEnvironmentStrings("%windir%\")SP = Shell.ExpandEnvironmentStrings("%SystemDrive%\Program Files\")SDI = Shell.ExpandEnvironmentStrings("%SystemDrive%\Install\")B = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Hello And Lets Begin"B1 = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Good Bye ??"C = "Would You Like To Install " & V & "Office XP Professional" & V C1 = "1\YES" & V & space(5) & "Office XP Professional"& V C2 = "2\NO" & V & space(5) & "Will Not Install Office XP Professional" & V C4 = "Time Out" & V & space(5) & "If Nothing is Pressed"& V & space(5) &"Then The Defualt Action Is To Install!"& V SN = "Preparing For Next" intButton = WshShell.Popup ("Click a button to proceed." & V & B & V & C & V & C1 & V & C2 & V & C4, 12 ,"Test",4 + 48) select case intButton''''''''''TIME OUT ACTION case -1 TimeOut= WshShell.Popup ("No Selection Was Made" & V & "Preparing Defualt Action", 3, "Time Out Action", 0 +64 )' WshShell.Popup "CLUBNETRADIO.Com",3 , "CLUB NET RADIO",0+48' Set oWS = WScript.CreateObject("WScript.Shell")' oWS.Run "http://www.clubnetradio.com/listen.php?type=2&bitrate=high wmplayer.exe" WshShell.Popup "Preparing Office XP Professional",3 , "Office XP Professional",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run SD & "%CDROM%\winapp\oxp_sp3.exe" wscript.sleep 100 WshShell.Popup B1 , 4 ,""& SN , 0 + 64 ''''''''''TIME OUT ACTION''''''''''YES ACTION case 6 YesRes = WshShell.Popup ("Yes Was Selected" & V & "Preparing Install Of ", 4, "Install APP", 0 +64 )' WshShell.Popup "CLUBNETRADIO.Com",3 , "CLUB NET RADIO",0+48' Set oWS = WScript.CreateObject("WScript.Shell")' oWS.Run "http://www.clubnetradio.com/listen.php?type=2&bitrate=high wmplayer.exe" WshShell.Popup "Preparing Office XP Professional",3 , "Office XP Professional",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run SD & "%CDROM%\winapp\oxp_sp3.exe" wscript.sleep 100 WshShell.Popup B1 , 4 ,""& SN , 0 + 64 ''''''''''YES ACTION ''''''''''NO ACTION case 7 SN = "No Was Pressed" & V & "Stopping The Install" & V & "Preparing For Next" NoRes = WshShell.Popup ("" & SN & V & B1, 4, "No Was Selected" , 0 +64 )''''''''''NO ACTION end select Wscript.quittia Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 14, 2005 Share Posted February 14, 2005 (edited) Here The Edited Vbs I Tested ThisDim tsDim strDriveLetterDim intDriveLetterDim fs 'As Scripting.FileSystemObjectConst CDROM = 4On Error Resume NextSet fs = CreateObject("Scripting.FileSystemObject")strDriveLetter = ""For intDriveLetter = Asc("A") To Asc("Z")Err.ClearIf fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM ThenIf Err.Number = 0 ThenstrDriveLetter = Chr(intDriveLetter)Exit ForEnd IfEnd IfNextSet WshShell = CreateObject("WScript.Shell")Z = Chr(95)Y = Chr(213)X = Chr(191)W = Chr(214)V = VbcrlfU = Chr(123)T = Chr(125)S = Chr(71)R = Chr(83)Q = Chr(77)Wscript.Sleep 150'On Error Resume NextDim Shell, AP, UP, SD, WD, SP , SDISet Shell = WScript.CreateObject("WScript.Shell")CDROM = Shell.ExpandEnvironmentStrings("strDriveLetter:\")AP = Shell.ExpandEnvironmentStrings("%AllUsersProfile%\")UP = Shell.ExpandEnvironmentStrings("%UserProfile%\")SD = Shell.ExpandEnvironmentStrings("%SystemDrive%\")WD = Shell.ExpandEnvironmentStrings("%windir%\")SP = Shell.ExpandEnvironmentStrings("%SystemDrive%\Program Files\")SDI = Shell.ExpandEnvironmentStrings("%SystemDrive%\Install\")B = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Hello And Lets Begin"B1 = Y & X & W & V & U & Z & Z & Z & T & V & S & R & Q & Space(1) & "Says Good Bye ??"C = "Would You Like To Install " & V & "Office XP Professional" & V C1 = "1\YES" & V & space(5) & "Office XP Professional"& V C2 = "2\NO" & V & space(5) & "Will Not Install Office XP Professional" & V C4 = "Time Out" & V & space(5) & "If Nothing is Pressed"& V & space(5) &"Then The Defualt Action Is To Install!"& V SN = "Preparing For Next"intButton = WshShell.Popup ("Click a button to proceed." & V & B & V & C & V & C1 & V & C2 & V & C4, 12 ,"Test",4 + 48) select case intButton''''''''''TIME OUT ACTION case -1TimeOut= WshShell.Popup ("No Selection Was Made" & V & "Preparing Defualt Action", 3, "Time Out Action", 0 +64 ) ''''''''''WHAT I TESTED AND IT WORKED WshShell.Popup "Preparing Office XP Professional",3 , "Office XP Professional",0+48 Set oWS = WScript.CreateObject("WScript.Shell") CD=strDriveLetter oWS.Run Run CD & ":\winapp\oxp_sp3.exe" ''''''''''WHAT I TESTED AND IT WORKED 'oWS.Run CD & ":\SetupApps\MiscApps\TweakUiPowertoySetup.EXE" wscript.sleep 100 WshShell.Popup B1 , 4 ,""& SN , 0 + 64 ''''''''''TIME OUT ACTION''''''''''YES ACTION case 6YesRes = WshShell.Popup ("Yes Was Selected" & V & "Preparing Install Of ", 4, "Install APP", 0 +64 ) CD=strDriveLetter WshShell.Popup "Preparing Office XP Professional",3 , "Office XP Professional",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run Run CD & ":\winapp\oxp_sp3.exe" ''''''''''WHAT I TESTED AND IT WORKED 'oWS.Run CD & ":\SetupApps\MiscApps\TweakUiPowertoySetup.EXE" wscript.sleep 100 WshShell.Popup B1 , 4 ,""& SN , 0 + 64 ''''''''''YES ACTION ''''''''''NO ACTION case 7 SN = "No Was Pressed" & V & "Stopping The Install" & V & "Preparing For Next" NoRes = WshShell.Popup ("" & SN & V & B1, 4, "No Was Selected" , 0 +64 )''''''''''NO ACTION end select Wscript.quit Edited January 5, 2006 by gunsmokingman Link to comment Share on other sites More sharing options...
larciel Posted February 15, 2005 Author Share Posted February 15, 2005 there was two 'RUN' at the oxp_sp3.exe line .. but i corrected itone question. it seems that extraction of oxp_sp3.exe takes process, but before it's able to run .cmd line inside the .exe file , RunonceEX.cmd processes next line.. which is to install sun JAVA.is there any way to set more time to take in this .vbs file? or any other way for the windows to wait until officexp install is complete?tia Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 15, 2005 Share Posted February 15, 2005 Are you starting the vbs from a cmd file or the RunOnce PartTry This 1echo offcls && mode 55,4 && color 3fstart /w some.vbsstart /w Another.exestart /w Whatever.vbsstart /w Examplw.cmdThe above would start and than finish Try This 2RED Is The Time It Will Stop In The Script 1000=1 secondIt set for 1 minute and 1 secondWshShell.Popup "Preparing Office XP Professional",3 , "Office XP Professional",0+48 Set oWS = WScript.CreateObject("WScript.Shell") oWS.Run CD & ":\winapp\oxp_sp3.exe"wscript.sleep 61000 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