Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to Install Softwares
2011-03-10, 10:52 AM, (This post was last modified: 2011-03-10, 11:02 AM by ata4you.)
#5
RE: Unable to Install Softwares
Dear Thanks for rlpy

First i have not burned that image, i am try to install on my virtual machine

second thing is YES the CD has folder "Software" and $OEM$

AND all the things you have asked is alright in the iso
like "RunOnceEX.js" etc

the konten.js files are look like this
------------------------------------
var WshShell = new ActiveXObject("WScript.Shell");
var key = "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\";

WshShell.Run("net user \"Administrator\" \"\" /add", 0, true);
WshShell.Run("net localgroup \"Users\" \"Administrator\" /delete", 0, true);
WshShell.Run("net localgroup \"Guests\" \"Administrator\" /delete", 0, true);
WshShell.Run("net localgroup \"HelpServicesGroup\" \"Administrator\" /delete", 0, true);
WshShell.Run("net localgroup \"Network Configuration Operators\" \"Administrator\" /delete", 0, true);
WshShell.Run("net localgroup \"Remote Desktop Users\" \"Administrator\" /delete", 0, true);
WshShell.Run("net localgroup \"Replicator\" \"Administrator\" /delete", 0, true);
WshShell.Run("net localgroup \"Backup Operators\" \"Administrator\" /delete", 0, true);
WshShell.Run("net localgroup \"Administrators\" \"Administrator\" /add", 0, true);
WshShell.Run("net localgroup \"Power Users\" \"Administrator\" /add", 0, true);

WshShell.Run("net accounts /maxpwage:unlimited", 0, true);

WshShell.RegWrite(key + "DefaultUserName", "Administrator", "REG_SZ");
WshShell.RegWrite(key + "DefaultPassword", "", "REG_SZ");
WshShell.RegWrite(key + "AutoAdminLogon", "1", "REG_SZ");
-------------------------------------------------------------
and
RunOnceEx.js look like above

--------------------------------------------------------------
//003

var soft = new Array();
var key = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\";
var runonceex_js = "HKLM\\SOFTWARE\\RunOnceEx.js";
var WshShell = new ActiveXObject("WScript.Shell");
var fso = new ActiveXObject( "Scripting.FileSystemObject" );
var n = 0;

soft.title = "Set Up Software";
soft.insertNextMedium = "Please insert next disk with {soft}";
soft.rebootMessage = "Clean & Reboot";
soft.startReboot = "reboot.exe /t 60 /m \"{message}\" /r {runat}";

soft[n] = new Array();
soft[n].name = "Acrobat";
soft[n].checkPoint = "Software\\Acrobat";
soft[n][0] = "\"%CDROM%\\Software\\Acrobat\\AdbeRdr930_en_US.exe\" /QB";
n++;

soft[n] = new Array();
soft[n].name = "Winrar";
soft[n].checkPoint = "Software\\Winrar";
soft[n][0] = "\"%CDROM%\\Software\\Winrar\\wrar393.exe\" /s";
n++;

soft[n] = new Array();
soft[n].name = "kas";
soft[n].checkPoint = "Software\\kas";
soft[n][0] = "\"%CDROM%\\Software\\kas\\kis11.0.1.400en.exe\" /s";
n++;

soft[n] = new Array();
soft[n].name = "VLc";
soft[n].checkPoint = "Software\\VLc";
soft[n][0] = "\"%CDROM%\\Software\\VLc\\vlc-1.1.4-win32.exe\" /S";
n++;

soft[n] = new Array();
soft[n].name = "Office";
soft[n].checkPoint = "Software\\Office";
soft[n][0] = "\"%CDROM%\\Software\\Office\\Microsoft Office 2007\\setup.exe\" /QB";
n++;

soft.startReboot = soft.startReboot.replace("{message}", soft.rebootMessage);
//soft.insertNextMedium = soft.insertNextMedium.replace( "{soft}", soft[a].name );

function FindDriveLetter( dir )
{
var e = new Enumerator( fso.Drives );
var x;
var letters = new Array();
var path;

for( ; !e.atEnd(); e.moveNext() )
{
x = e.item();

if( x.DriveType == 3 || x.IsReady )
{
letters = letters.concat( x.DriveLetter );
}

}

if( dir.length == 0)
{
return letters[0] + ":";
}

for( i = 0; i < letters.length; i++ )
{
if(dir.substr(0, 2) != "\\\\")
path = letters[i] + ":\\" + dir;

if( fso.FolderExists( path ) || fso.FileExists( path ) )
{
return letters[i] + ":";
}
}
return "";
}

function GetFilledString( zahl, fillChar, num_of_digits )
{
var filledStr = zahl.toString();
while( filledStr.length < num_of_digits )
{
filledStr = fillChar + filledStr;
}
return filledStr;
}
function RunOnceEx(index)
{
WshShell.RegWrite( key + "TITLE", soft.title, "REG_SZ" );
var netzwerk_install;

for( a = index; a < soft.length; a++ )
{
if( soft[a].name == "-= REBOOT =-" )
{
WshShell.RegWrite( key + GetFilledString(a, "0", 3) + "\\", soft.rebootMessage, "REG_SZ" );
WshShell.RegWrite( key + "TITLE",
soft.title + " " + (index+1).toString() + " - " + (a+1).toString() + " / " + soft.length.toString(),
"REG_SZ" );
WshShell.Run( "rundll32.exe iernonce.dll,RunOnceExProcess", 1, true );
soft.startReboot = soft.startReboot.replace("{runat}", (a + 1).toString());
WshShell.Run( soft.startReboot );

return ++a;
}
else
{
soft[a].drive = "";

if( soft[a].checkPoint.substr(0, 2) != "\\\\")
{
soft[a].drive = FindDriveLetter( soft[a].checkPoint );
netzwerk_install = 0;
}
else
netzwerk_install = 1;

if( soft[a].drive.length == 0 && netzwerk_install == 0 )
{
WshShell.RegWrite( key + "TITLE",
soft.title + " " + (index+1).toString() + " - " + a.toString() + " / " + soft.length.toString(),
"REG_SZ" );
WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess", 1, true);
soft[a].drive = FindDriveLetter( soft[a].checkPoint );
}
if( soft[a].drive.length == 0 && netzwerk_install == 0 )
{
WshShell.Popup( soft.insertNextMedium.replace( "{soft}", soft[a].name ), 60, "", 64 );
soft[a].drive = FindDriveLetter( soft[a].checkPoint );
}
if( soft[a].drive.length == 0 && netzwerk_install == 0 )
{
WshShell.Popup( soft.insertNextMedium.replace( "{soft}", soft[a].name ), 60, "", 64 );
soft[a].drive = FindDriveLetter( soft[a].checkPoint );
}
if( soft[a].drive.length == 0 && netzwerk_install == 0 )
{
WScript.Echo( soft.insertNextMedium.replace( "{soft}", soft[a].name ) );
soft[a].drive = FindDriveLetter( soft[a].checkPoint );
index = a+1;
}
if(soft[a].drive.length || netzwerk_install == 1 )
{
WshShell.RegWrite( key + GetFilledString(a, "0", 3) + "\\", soft[a].name, "REG_SZ" );
for(b = 0; b < soft[a].length; b++)
{
if( netzwerk_install == 0 )
soft[a][b] = soft[a][b].replace( "%CDROM%", soft[a].drive );
else
soft[a][b] = soft[a][b].replace( "%CDROM%", "" );

WshShell.RegWrite( key + GetFilledString( a, "0", 3 ) + "\\" + GetFilledString( b, "0", 2 ),
soft[a][b], "REG_SZ" );
}
}
}
}

if( index > 0 && index < soft.length )
{
WshShell.RegWrite( key + "TITLE",
soft.title + " " + ( index + 1 ).toString() + " - " + soft.length.toString() + " / " + soft.length.toString(),
"REG_SZ" );
}

if( index < soft.length )
{
WshShell.Run( "rundll32.exe iernonce.dll,RunOnceExProcess", 1, true );
}
return soft.length;
}
function main()
{
//var namedArgs = WScript.Arguments.Named;
//var nextaction = WshShell.RegRead( runonceex_js + "\\" );
var startAt = 0;
//var wait_sek = 0;
var WshSysEnv = WshShell.Environment( "SYSTEM" );
var driversDir = WshSysEnv( "systemdrive" );
driversDir += "\\Drivers";

try
{
startAt = WshShell.RegRead( runonceex_js + "\\runat" );
WshShell.RegDelete( runonceex_js + "\\runat" );
}
catch(e){}

if( RunOnceEx( startAt ) == soft.length )
{
if( fso.FolderExists( driversDir ) )
{
fso.DeleteFolder( driversDir, true );
}
try
{
WshShell.RegDelete( runonceex_js );
}
catch(e){}
}
}

main();


thanks
Reply


Messages In This Thread
Unable to Install Softwares - by ata4you - 2011-03-09, 10:51 AM
RE: Unable to Install Softwares - by Vitali - 2011-03-09, 12:00 PM
RE: Unable to Install Softwares - by ata4you - 2011-03-10, 05:26 AM
RE: Unable to Install Softwares - by Vitali - 2011-03-10, 10:24 AM
RE: Unable to Install Softwares - by ata4you - 2011-03-10, 10:52 AM
RE: Unable to Install Softwares - by Vitali - 2011-03-10, 03:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)