pendzi
Goto Top

Automatisch ENTER oder RETURN simulieren

Hallo Community,

Ich möchte zurzeit meine VMware-player installation automatisieren,
problem ist es jetzt die "defaults" zu bestätigen mit "enter" wie man es auch während der installation machen soll.
Der Code dafür sie wie folgt aus:

$answer = check_answer_binpath($bin, 'default');
if (not ($answer eq '')) {
return $answer;
}

Die Installation sieht wie folgt aus: In which directory do you want to install the binary files?
[/usr/bin]

jetzt soll der "user" also ich in dem fall einfach nur ENTER drücken und das möchte ich jetzt einfach mit ins installations file weitergeben, dass er von selber "ENTER" drückt. Kann man das machen?

Ich kann absolut null in Perl =)


hier noch paar sachen, die zusmamenhängen könnten

$answer = check_answer_binpath($bin, 'default');
if (not ($answer eq '')) {
return $answer;
}

if (get_answer('Setup is unable to find the "' . $bin . '" program on your machine. Please make sure it is installed. Do you want to specify the location of this program by hand?', 'yesno', 'yes') eq 'no') {
return '';
}

return get_answer('What is the location of the "' . $bin . '" program on your machine?', 'binpath', '');

if ($source eq 'user') {
print wrap('The answer "' . $answer . '" is invalid. It must be the complete name of a binary file.' . "\n\n", 0);
}
return '';
}
$gAnswerSize{'binpath'} = 20;
$gCheckAnswerFct{'binpath'} = \&check_answer_binpath;

  1. Prompts the user if a binary is not found
  2. Return value is:
  3. '': the binary has not been found
  4. the binary name if it has been found
sub DoesBinaryExist_Prompt {
my $bin = shift;
my $answer;

Content-Key: 96425

Url: https://administrator.de/contentid/96425

Printed on: April 19, 2024 at 07:04 o'clock

Mitglied: 68023
68023 Sep 09, 2008 at 07:08:16 (UTC)
Goto Top
Hallo,

schau doch mal auf der Herstellerwebsite / Google ob es für diese Installation eine Silent-Methode gibt, der du nur die Argumente beim Aufruf mitgibst.

Gruß
Nico
Member: Pendzi
Pendzi Sep 09, 2008 at 07:31:23 (UTC)
Goto Top
Ja ich hab schon alles abgesucht nach parametern die man mitgeben kann oder "unattended installation" etc.
Dann haben wir versucht zwei Baugleich Maschinen 1x Mit und 1x Ohne VMware aufzusetzen und mittels "rsync" (remote sync) zu vergleichen dennoch unterscheiden sich beide Maschinen zu sehr, da jede Hardwarekomponente ne andere ID / Code etc hat.

Jetzt grade schaue ich wo VMWare einträge macht und versuche demnach mögl. alle daten zu erwischen und auf das Leere system zu kopieren und vielleicht damit ans laufen zu bringen, denn dann könnte man die Daten einfach per script kopieren und VMware läuft ohne installation.

Ist alles bisschen schwirig, wollen halt ne komplett automatische installation vom betriebsystem bishin zur Software.
Member: robcomboy
robcomboy Sep 09, 2008 at 07:54:00 (UTC)
Goto Top
Hallo,

Nimm einfach AutoHotKey.
Ist sehr einfach, gute Hilfe und einfach zu schreiben.

http://de.autohotkey.com/

Grüße, robcomboy
Mitglied: 68023
68023 Sep 09, 2008 at 07:56:52 (UTC)
Goto Top
cooooles Teil! Danke für den Tip!
Member: Pendzi
Pendzi Sep 09, 2008 at 08:02:13 (UTC)
Goto Top
ja is zwar lieb gemeint nur leider handelt es sich bei meinem problem um eine installation auf "ubuntu" d.h alles auf consolen ebene. face-sad
Mitglied: 6890
6890 Sep 26, 2008 at 23:33:48 (UTC)
Goto Top
Nabend,

kleiner Tipp: Nach der installation von VMware server|workstation gibt es unter /etc/vmware ein file namens "location". Da stehen alle installierten Dateien usw drinne.

mfg