Jump to content

Recommended Posts


Posted

Wel, i found the solution. i use the below .js-script file

function getWin(win, inc)
{
var cntr = 0;
while (!WshShell.AppActivate(win))
{
if (cntr==12) return true;
cntr++;
WScript.Sleep(inc);
}
return true;
}
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("%systemdrive%\\install\\Applications\\TextBridgePro11\\setup.exe");
{
WScript.Sleep(10000);//time needed by installer to extract its files
getWin("TextBridge Pro 11.0 - InstallShield Wizard", 500);//name of setup screen and time to hold it
WshShell.SendKeys ("{ENTER}");//hitting Next button
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{UP}");//Accept License
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{ENTER}");//hitting Next button
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{TAB}");//Next Field
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{TAB}");//Next Field
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("XXXXXXXXXXXXXX");//Enter Serial without the - in between, but just like: 12345678901234
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{ENTER}");//hitting Next button
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{ENTER}");//hitting Next button
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{ENTER}");//hitting Install button
WScript.Sleep(25000);//Wait until Next
WshShell.SendKeys ("{ESC}");//No registration
WScript.Sleep(250);//Wait until Next
WshShell.SendKeys ("{ENTER}");//hitting Finish button
}

Posted

Good usage of JScript scripts. Still, you can enhance your JS.

Instead of this:

function getWin(win, inc)
{
var cntr = 0;
while (!WshShell.AppActivate(win))
{
if (cntr==12) return true;
cntr++;
WScript.Sleep(inc);
}
return true;
}
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("%systemdrive%\\install\\Applications\\TextBridgePro11\\setup.exe");
{
WScript.Sleep(10000);//time needed by installer to extract its files
getWin("TextBridge Pro 11.0 - InstallShield Wizard", 500);//name of setup screen and time to hold it

You can use this:

var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.Run("%systemdrive%\\install\\Applications\\TextBridgePro11\\setup.exe");
WScript.Sleep(10000);//time needed by installer to extract its files
WshShell.AppActivate("TextBridge Pro 11.0 - InstallShield Wizard");//name of setup screen
WScript.Sleep(500);//time to hold setup screen

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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