Jump to content

Recommended Posts

Posted (edited)

These are the tools I have created and I use with almost every install

another tool very useful is CMenu, but it dont work in 64bit :(

Choice.exe

~~~~~~~

for windows xp you need to get it (and make sure it have the same usage as that one below)

CHOICE.EXE

ss64.com/nt/choice.html

Syntax

CHOICE [/C[:]choiceKeys] [/N] [/T[:]k,nn] [text]

Key

/C[:]choiceKeys : One or more keys the user can press. Default is YN

/N : Do not display choiceKeys at end of prompt string.

/S : case Sensitive.

/T[:]k,dd : Default the choice to k after dd seconds

text : Message string to display the choices available

CD_Eject.vbs

~~~~~~~~

to eject the cd/dvd/br rom (i dont use it anymore)

if you dont include it, when it starts to call the applications it will show an error msg but everything is fine,

just the option to eject the rom won't show up

Applications.cmd

~~~~~~~~~~~

it's an application caller, which if you open it (double click) it will call your applications.

-to call the applications

-~~~~~~~~~~~~~~

first, they should be in a folder which is set by the ‘foli’ variable, and should be in the root of the drive (C:, D:, E:, etc.).

ex. set foli=_Unattended

ex. C:\_Unattended

second, inside the ‘foli’ you could have sub divisions, I think up to 2 folders

ex. C:\_Unattended\Multimedia\Documents

ex. C:\_Unattended\System

third, the application folder must contain the same name as the .cmd file, or inside the app folder must be a .cmd file with the same name (don’t use spaces for this names)

ex. C:\_Unattended\Multimedia\Documents\Office\Office.cmd

ex. C:\_Unattended\System\WindowsSettings\WindowsSettings.cmd

Variables.cmd

~~~~~~~~~

it contains obviously the variables to be used

it could have the applications commands in there

-to include the applications commands in here

-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

in the file (Variables.cmd) there some examples at the end, and one empty

first, you must set the application function name, which is the same as the .cmd file, but without the .cmd extension

ex. :Office (parting of the Office.cmd)

and the name (ex. Office) will repeat four times in the empty one, it have to be with the underscore and number (IF IT HAVE IT) for it to work, it will be calling or going there having ‘Office’ as a reference

ex. :Office , :Office_ , :Office_1

ex. :WindowsSettings , :WindowsSettings_ , WindowsSettings_1 , WindowsSettings_2

:Office (here)

set nmf= (Program Title here)

call :header

goto :start

:Office_ (here)

set key=%app_key%\

call %xfn% /er "%key%"

if "%iex%"=="n" goto :Office_1 (here)

(Program install here)

:Office_1 (here)

(Program settings here)

the ‘iex’ will tell if the program needs to be installed, if it’s a ‘n’ it don’t need to be installed and it goes to the settings to prevent double installs

you could use the function ‘/er’ or ‘/ef’ to do that.

if you will add the apps to 'Variables.cmd' you must update the 5th line, to include the name of the program or whatever you all it in there

ex. for %%i in (variables Applications Office) …

Functions.cmd

~~~~~~~~~

it contains obviously the functions

you can open it (double click) to see the functions (help file)

1-0Script_.au3

~~~~~~~~~

it contains most of the commands I use for it, I use a loop until the program exits, I recommend you to make a copy without the loop to test the script before using it with the loop it turns very annoying when it went wrong

also, it you are going to use the loop, try to select very specific text or title of that window, otherwise it will repeat that command.

1-0Script.txt

~~~~~~~~

It contains most of the functions of the ‘Functions.cmd’ to be used to make the install of the programs, delete what you don’t need.

here the lines

::\\\\\\\\\\\\\\

:://////////////

divide the upper and bottom parts that should not be changed with exception of a few things

In the fist line, the ‘set nmf=’ is for the program title

and the 4th line could be used for 64/32 bit programs only

after you finish, rename and change the extension to .cmd, and open it to test it if you want

1-0Programs_Default.txt

~~~~~~~~~~~~~~~~

will be the .cmd file if you have the application code in the 'Variables.cmd'

and nothing to edit there, just rename and change the extension to .cmd

if you want to install just one app, go and run the '1-0Programs_Default.txt' or '1-0Script.txt' after you rename them

1-0Script-2011-11-02.zip

Edited by jorgepr13

Posted (edited)

There are far more simpler and even native ways to accomplish what I believe I have understood this script does (which is just install some apps). Maybe you can clarify if this facilitates something that I am not understanding.

And if this is the GNU licensed version of choice.exe you should point to the source and the hash to be verified.

And if its not, you might not want to be distributing that.

Edited by iamtheky
Posted (edited)

Sure, but how is that advantageous over doing this in setupcomplete.cmd with

1) an install command

2) reg add/ reg del command

3) and a del command or copy and del command for the shortcut file

It seems that I have to write that stuff out multiple places, then make sure all this stuff is in the right place -VS- just writing once in setupcomplete.cmd which works on both architectures.

And the au3 looks like it could be a much tighter loop, what is Send("!{}"), because it looks like send ALT + nothing, or send ALT + left squiggly bracket then right squiggly bracket, both seem odd.

Edited by iamtheky
Posted

setupcomplete.cmd is only for vista/w7

and i believe that you could copy the code of Applications.cmd to it

or use the Autounattend.xml

but some applications make the shortcuts or other things after you are log in, thats were it comes useful to run it again without installing the programs again

reg add will be the same

reg delete, if the value or key is not found it return an error in what i made it dont

for shortcuts you will probaly need the specific location of that shortcut to do whatever you need to do

in my tools you just need the name of the shortcut or just part of it

ex. if you have multiple shortcuts of Adobe in your desktop and you want to delete them

-Adobe Acrobat

-Adobe Reader

-Adobe Photoshop

you just need to write "adobe" to delete them

my goal is to have a clean window with the answer of the application

about the au3, the Send("!{}")

is a general form, not all the programs are the same, sometimes they work with

n = next

i = install

a = agree

f = finish

r = browse

some are not keyboard friendly, and there you need to use the other commands like:

ControlCommand($ti,$te,"Button1","UnCheck","");

ControlCommand($ti,$te,"Button1","Check","");

ControlCommand($ti,$te,"ComboBox1","SelectString","English");

$txt=ControlGetText($ti,$te,"Edit1");

ControlSetText($ti,$te,"Edit1","text")

ControlClick($ti,$te,"Button1");

you just fill it with whatever you need to make the install

post-334477-0-25016800-1320284062_thumb.

Posted (edited)

MS vs GPL not so much MS vs his own

If its MS then it shouldnt be distro'd... and that attachment should be removed?

Edited by iamtheky
Posted (edited)

That was never the accusation, I promise. Just asking if it was the MS or a GPL version.

you can go get one from FreeDos at the link below (you are not legally supposed to distribute the Microsoft file from my understanding).

http://www.freedos.org/software/?prog=choice

and put a text document in the zip with that link and the link below.

http://www.gnu.org/licenses/lgpl.html

That would be proper, imho.

Edited by iamtheky

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...