New Posts  All Forums:Forum Nav:

Help with scripting

post #1 of 8
Thread Starter 
Hey guys,

I'm currently in a tech support class and my "teacher" has assigned me the job of scripting an automated install of Java SDK 1.4.0_01

Problem is, I've never scripted before and I don't know what I have to do for an automated install

Any help is appreciated

Thanks
post #2 of 8
Are you allowed to use any scripting language? If so Python would the best choice IMO.
post #3 of 8
Thread Starter 
Quote:
Originally Posted by JTD92 View Post

Are you allowed to use any scripting language? If so Python would the best choice IMO.

He said if you can use Python, he'll make it native to the computers

I guess that's cool
post #4 of 8
Is this targeting Windows or Linux machines?
post #5 of 8
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

Is this targeting Windows or Linux machines?

Windows. Primarily 7.
post #6 of 8
How much control do you need to have?

Windows supports the following runtimes out-of-the-box
  • Batch programs (technically not a programming language and also rather inflexible, but if it's something very basic then it will do the job)
  • Windows Scripting Host (WSH) which supports VBScript and Javascript (it's not the nicest environment to work in, but it will get the job done)
  • Windows also supports .NET languages (eg VB.NET, C#) through Powershell, but that's not always installed by default


AFAIK Python cannot be compiled into native binaries, but you can freely install Pythons runtime onto every machine
Edited by Plan9 - 10/7/13 at 7:32am
post #7 of 8
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

How much control do you need to have?

Windows supports the following runtimes out-of-the-box
  • Batch programs (technically not a programming language and also rather inflexible, but if it's something very basic then it will do the job)
  • Windows Scripting Host (WSH) which supports VBScript and Javascript (it's not the nicest environment to work in, but it will get the job done)
  • Windows also supports .NET languages (eg VB.NET, C#) through Powershell, but that's not always installed by default


AFAIK Python cannot be compiled into native binaries, but you can freely install Pythons runtime onto every machine

I'm as free as you can be

As far as Python goes, if it's the best way, it'll be installed on every machine
post #8 of 8
Quote:
Originally Posted by TinDaDragon View Post

Hey guys,

I'm currently in a tech support class and my "teacher" has assigned me the job of scripting an automated install of Java SDK 1.4.0_01

Problem is, I've never scripted before and I don't know what I have to do for an automated install

Any help is appreciated

Thanks

You didn't really provide a lot of details on what you mean by "scripting" the install. You just want to start with a "clean system" devoid of the SDK and end with a system that has the SDK with specific options selected and other options de-selected, I would guess?

I was going to try and get some information for you. I found the download for this JDK at the location below, for instance. I couldn't download it though because I dn't have time to create a username/password a the moment.
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html#7093-j2sdk-1.4.0_01-oth-JPR

Usually you can use a flag for the installer depending on the variety. If the JDK uses the same installer technology as the java runtimes, which I believe is installshield, there should be an INS file. For instance, you could run something like
setup.exe -s:c:\somepath\setup.ins
Then fill out the INS file to answer all the setup prompts.

What I sometimes do, which again I can't do at the moment, open up my temp folder which you can to with %temp% in the run box and clear it out. Then run the installer and see all the files it leaves in there. Usually the installer exe you download in just a container for the real setup files such as setup.exe or install.msi. If it were an MSI there would a much larger world of possibilities but this is Sun/Oracle we're talking about here so probably not.

Of course, if there aren't any silent install parameters, INS files or /QR options available a lot people for some reason like AutoIT for scripting installs and autohotkey is also a cool scripting language.

Plan9 mentioned that Windows actually comes with windows script host. You could create an HTA to do the work for you. No third party tools necessary.

I just found this page which might help. Looks like it's for java 7 but it should at least get you started I think.
http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html

Edit:
Oh, and if you can swing it try practicing in a VM (like virtualbox). Much faster than on a real machine in my experience.
 
VM Server
(17 items)
 
 
CPUGraphicsRAMHard Drive
Intel Ivy Bridge Core i7-3630QM nVidia GeForce GTX 680M 16GB DDR3 1600MHz Dual Channel Memory (2 SODIMMS) Hard Drive: Serial-ATA II 3GB/s 
Hard DriveOSMonitorPower
Hard Drive: Serial-ATA II 3GB/s Windows 10 Pro x64 17.3" FHD 16:9 (1920x1080) Battery: Smart Li-ion Battery (8-Cell) 
Audio
Sound Blaster Compatible 3D Audio 
CPUMotherboardGraphicsRAM
Intel Core i7 860 Biostar T5 XE Radeon HD 5870 Corsair 16GB  
Hard DriveHard DriveOptical DriveOS
Western Digital hard drive wd1001fals-00e8b0 Maxtor 300GB I don't need no stinking optical drive Microsoft Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
HP ZR24w 24'' Samsung SyncMaster 24" logitech wireless k360 Seventeam ST-850ZAF 850W ATX 
CaseMouseAudioAudio
Thermaltake V9 Black Edition Logitech G500 Programmable Gaming Mouse FiiO E7 USB DAC and Portable Headphone Amplifier Sennheiser HD555 Professional Headphones 
  hide details  
Reply
 
VM Server
(17 items)
 
 
CPUGraphicsRAMHard Drive
Intel Ivy Bridge Core i7-3630QM nVidia GeForce GTX 680M 16GB DDR3 1600MHz Dual Channel Memory (2 SODIMMS) Hard Drive: Serial-ATA II 3GB/s 
Hard DriveOSMonitorPower
Hard Drive: Serial-ATA II 3GB/s Windows 10 Pro x64 17.3" FHD 16:9 (1920x1080) Battery: Smart Li-ion Battery (8-Cell) 
Audio
Sound Blaster Compatible 3D Audio 
CPUMotherboardGraphicsRAM
Intel Core i7 860 Biostar T5 XE Radeon HD 5870 Corsair 16GB  
Hard DriveHard DriveOptical DriveOS
Western Digital hard drive wd1001fals-00e8b0 Maxtor 300GB I don't need no stinking optical drive Microsoft Windows 7 Ultimate x64 
MonitorMonitorKeyboardPower
HP ZR24w 24'' Samsung SyncMaster 24" logitech wireless k360 Seventeam ST-850ZAF 850W ATX 
CaseMouseAudioAudio
Thermaltake V9 Black Edition Logitech G500 Programmable Gaming Mouse FiiO E7 USB DAC and Portable Headphone Amplifier Sennheiser HD555 Professional Headphones 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming