Jump to content

Recommended Posts

Posted

After completeing my first (and a few others) unattended installations, I wanted to create a Application Selector screen that would let me choose what apps to install. All of the ones that I have seen on teh forum as well as the one I created allowed you to do it after the OS was installed. How would I create a screen to prompt me for what apps to install before the OS is installed. Essentially so that you could touch the machine once, make your selections and walk away. Is WinPe an option and if so, how would I approach this or any other type of solution?

Charles


Posted

I would perfer for the user to determine what apps are installed by "checking" or "unchecking" a front end. I suppose that it could all be hard coded, but how would I get the front end to launch or how would I go about scripting it. I have seen it done before, but I dont have access to the source.

Posted

here's what you could do....

use BartPE. That will load up Windows from the CDROM.

Execute the frontend, but have it just write the neccesary file (a predetermined file name that will be already specified in your setup files) and then execute setup like normal.

Bare in mind I have not done this, but logistically it should work. You may have to preformat however, but that can be done in a batch script or something.

Posted (edited)

Here Is A Template From Something I Am Working On It A Hta With 8 buttons.

The First 4 Buttons Use The, VbYesNoCancel Message Box. Those Have 2 User

choices plus A Cancel Feature. The Next 4 Uses , The VbYesNo Message Box,

Those Have A Action And A Cancel.This is a Template So If You Edit This Right,

You Could Control What Software You Install, With This.

UaKillTimeInterface.PNG

<!---STUFF BETWEN THESE IN THE SCRIPT WILL NOT APPEAR IN THE SCRIPT-->

To Edit Change The Stuff In Blue

Stuff In Red Do Not Edit Unless You Know What You Are Doing

STUFF IN CAP LOCK AND ORANGE ARE SMALL NOTES AS TO WHAT IT DOES THEY ONLY APPEAR HERE AND ARE NOT IN THE SCRIPT

Stuff In Green What The HTA Scripts Actions Are.

<!---------------------------BACKGROUND AND CONTROL OF THE SIZE OF THE WINDOW---------------------> 

<script language="VBScript">window.resizeTo  625,350  <-  

</script>

<!---list of color #f7efdd #DAD4CB #E9DDC3-->

<body bgcolor=  " #12abFFF"  background="" lang=EN-CA

style='tab-interval:32.0pt'>

<!--[if gte vml 1]><v:background id="_x0000_s1025" o:bwmode="white"

fillcolor="BEIGE"  o:targetscreensize="600,75" > THIS CONTROLS THE WAY THE GRADIENT SIZE IN RELATION TO THE WINDOWS SIZE

<v:fill color2="#12abFFF" colors="0 #12abFFF;bFFF #FFFF00;2 #12abFFF" focusposition=".45,-.45" focussize="70" type="gradientRadial"/>

</v:background><![endif]-->

<!---------------------------BACKGROUND AND CONTROL OF THE SIZE OF THE WINDOW---------------------> 

<!---THIS IS THE POP UP TEXT-------------->

<A class="gsm1Print" title="THIS WILL OPEN

A VBS BOX THAT HAS 3 SELECTIONS.

1\ YES = PACKAGER

2\ NO = GSMBROWS

3\ CANCEL = QUIT AND DO NOTHING">

<!---THIS IS THE POP UP TEXT-------------->

<!--------:: BUTTON001 ::--DO NOT DELETE-->

<script LANGUAGE="VBScript">

<!--

Sub Button001_OnClick

<!----THIS MUST MATCH THE BOTTOM NUMBER--->

<!--------:: BUTTON001 ::--DO NOT DELETE-->

<!---THE SCRIPT FOR THE BUTTON ACTION-------------->

<!---THE YES PART OF THE SCRIPT-------------------->

If RTS1 = 6 THEN

On Error Goto 0

Set sh = CreateObject("WScript.Shell")

sh.Run ("packager.exe")    THIS IS THE ACTION PART. PLACE WHAT YOU WANT TO RUN, THERE MUST BE  A FULL PATH ,TO WHAT YOU WANT! PACKERGER.EXE IS PART OF WINDOWS AND SO IT SEEMS TO START IT WITH OUT THE PATH. THE SAME GOES FOR NOTEPAD MSPAINT WINDOWS MEDIA PLAYER IS WHAT I HAVE TESTED WITH THIS.

else

end if

<!---THE YES PART OF THE SCRIPT-------------------->

<!---THE NO PART OF THE SCRIPT--------------------->

If RTS1 = 7 THEN

On Error Goto 0

IF YOU FOLLOW THIS AND GUIDE AND DONT TOUCH THE RED PLACE  YOUR ACTION HERE IN VBS SCRIPT LANGUAGE ***NOTE SOME TIMES VBS SCRIPTS HAVE TO BE MODIFIED TO WORK ON THE HTA.

SCRIPT ACTION HERE

<!---THE NO PART OF THE SCRIPT--------------------->

<!---THE CANCEL PART OF THE SCRIPT----------------->

If RTS1 = 2 THEN

On Error Goto 0

SCRIPT ACTION HERE

else

end if

else

end if

<!---THE CANCEL PART OF THE SCRIPT----------------->

<!--------:: BUTTON001 ::--DO NOT DELETE-->

End Sub

-->

</SCRIPT>

<INPUT NAME="Button001" TYPE="BUTTON" VALUE=" OK 01 ">

<!----THIS MUST MATCH THE TOP NUMBER------>

<!--------:: BUTTON001 ::--DO NOT DELETE-->

To Edit This Use Winrar And Just Right Click It And Than Extract The Files To A Location Than Edit The HTA

There Are 2 Files In The WinRar

1:\ UaKillTime.HTA

The Main File This Is A Almost 2000 Lines Long

Button 1

This Has A Brows For Vbs That Will Open A Selected Folder And Packager.exe

Plus A Cancel Action

Button 2

Iexpress And A Simple RunOnceEx Maker

Plus A Cancel Action

Button 3

A Brows For Vbs That Will Delete A Selected folder

A Blank Spot To Run A Local Music List

'sh.Run ("H:\AudioFiles\dance.m3u"),2

'sh.Run ("THE LOCATION OF THE FILE\SOME MUSIC FILE.m3u"),2

MSGBOX "YOU MUST HAVE A LOCATION" & V & "FOR THE SCRIPT TO RUN", 0 + 48, SPACE(10) & "MESSAGE TO USER"

If You Dont Edit You Will Get This Messeage Box

Plus A Cancel Action

4:\ This Make A Winnt.sif Based On The One I Use

It Has User Inputs For Most of The Things.

Winnt.Bat File

Here Is The Winnt.bat That it Outputs

---------------------------------------------------------------------------------------------

@rem SetupMgrTag

@echo off

for %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\SETUP.exe set CDROM=%%i

Rem

Rem This is a SAMPLE batch script generated by Setup Manager.

Rem If this script is moved from the location where it was generated, it may have to be modified.

Rem

set AnswerFile=.\winnt.sif

set SetupFiles=%CDROM%:\i386

%CDROM%:\i386\winnt32 /s:%SetupFiles% /unattend:%AnswerFile% /copysource:lang

Plus A Cancel Action

----------------------------------------------------------------------------------------

Buttons 5 to 8 Are Just A Yes No Vbs That Open

Windows Media Player To A Radio Station Yes To

Open It No To Quit.

RTS2 = MsgBox (B & RT1 & V &"WAS YOUR SELECTION", 0 + 48, RT1)

CreateObject("WScript.Shell").RUN ("wmplayer.exe http://www.di.fm/wma/eurodance.asx"),2

2\ The Start And Clean up Cmd

The Start Script

echo off && cls && color 9f && mode con: Cols=55 Lines=3 && Echo.

start %systemdrive%\UaKillTime.hta

ping -n 2 127.0.0.1 | Echo Starting UaKillTime

> Cu1.vbs Echo Dim Gb

>> Cu1.vbs echo set Gb = (CreateObject("Scripting.FileSystemObject"))

>> Cu1.vbs echo Gb.Deletefile ("StartHta.cmd")

>> Cu1.vbs echo Gb.DeleteFile ("CU1.vbs")

>> Cu1.vbs echo Delete=("StartHta.cmd")

>> Cu1.vbs echo Delete=("CU1.vbs")

>> Cu1.vbs echo msgbox "Clean UP Completed?",vbokonly+48,"Clean Up Those Files"

DEL %systemdrive%\UaKillTime.hta

ping -n 2 127.0.0.2 | Echo Starting UaKillTime Clean Up

start %systemdrive%\CU1.vbs

Hope This Helps

Edited by gunsmokingman

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...