MSFN Forum: The Official Windows Post Install Wizard Thread - MSFN Forum

Jump to content



  • 9 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

The Official Windows Post Install Wizard Thread Rate Topic: ***** 1 Votes

#21 User is offline   ahmedramzi 

  • Member
  • PipPip
  • Group: Members
  • Posts: 258
  • Joined: 08-June 03

Posted 28 November 2003 - 06:14 PM

could you post your reg and inf file please?


#22 User is offline   Whimsy 

  • Junior
  • Pip
  • Group: Members
  • Posts: 56
  • Joined: 27-November 03

Posted 28 November 2003 - 07:59 PM

ahmedramzi, on Nov 28 2003, 07:14 PM, said:

could you post your reg and inf file please?

Sure.

I'm starting to wish I had bandwidth so I could post my entire $oem$ directory :)

Ok, so as most of you know, Winamp will not install quietly. To make it shutup, here's what I did:

1) I started by installing Winamp 2.91.
2) I copied the Winamp directory to E:\windows\cds\wxppro\files\$oem$\$1\Install\
3) I deleted the junk I didn't want anyway, but added my SNESAMP Plugin, cause Super Nintendo music kicks a**.
4) I created this (Filename: Winamp.inf)

[Version]
Signature=$Windows NT$ 


[DestinationDirs]
WinampCopy=24,%PROGRAMF%\Winamp
WinampDel=24,%PROGRAMF%\Winamp
;SampleINFCopy=17


[DefaultInstall]
;CopyFiles=WinampCopy,SampleWinCopy,SampleSysCopy,SampleINFCopy,SampleHLPCopy
CopyFiles=WinampCopy,WinampDel
AddReg=SampleRegisterApp,SampleRegUninstall,SampleRenameFiles
UpdateInis=SampleAddLinks 

[RemoveSample]
;DelFiles=SampleWinCopy,SampleSysCopy,SampleINFCopy,SampleHLPCopy
DelFiles=WinampCopy
DelReg=SampleUnRegisterApp,SampleRegUninstall
AddReg=SampleRemoveLFNs
UpdateInis=SampleRemoveLinks 

;Add files here
[WinampCopy]
demo.mp3
list.txt
PXSDKPLS.dll
UninstWA.exe
whatsnew.txt
Winamp.eq1
winamp.exe
Winamp.ini
Winamp.lks
Winamp.q1
winampa.exe
winampmb.htm
Plugins\CDDBCW.dll
Plugins\CDDBUIW.dll
Plugins\dsp_sc.ini
Plugins\enc_aac.dll
Plugins\in_cdda.dll
Plugins\in_dshow.dll
Plugins\in_midi.dll
Plugins\in_mod.dll
Plugins\in_mp3.dll
Plugins\in_mp3P.dll
Plugins\in_nsv.dll
Plugins\in_snes.dll
Plugins\in_snes.hlp
Plugins\in_umx.dat
Plugins\in_umx.dll
Plugins\in_vorb.dll
Plugins\in_wave.dll
Plugins\in_wm.dll
Plugins\lamedll.dll
Plugins\nsvdecac.dll
Plugins\nsvdecvp.dll
Plugins\out_disk.dll
Plugins\out_ds.dll
Plugins\out_null.dll
Plugins\out_wave.dll
Plugins\out_wm.dll
Plugins\out_xf.dll
Plugins\plugin.ini
Plugins\readfile.dll
Plugins\SNESAmp.cnt
Plugins\SNESAmp.hlp
Plugins\SNESAPU.DLL
Plugins\unrar.dll
Plugins\vis_nsfs.dll
Plugins\vmdsktp.dll


[SampleRegisterApp]



[SampleUnRegisterApp]


[SampleRegUninstall]
;Add entry to the Add-Remove Programs control panel to uninstall the program:
HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winamp,"Winamp 2.91",,"Winamp"
HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winamp,"Winamp 2.91",,"RunDll setupx.dll,InstallHinfSection RemoveSample 4 winamp.inf" 

[SampleRenameFiles]
;renames 8.3 files to Long File Names
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,,,"%24%\%PROGRAMF%\Winamp"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,,,"%24%\%PROGRAMF%\Winamp\plugins"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,cddbcw.DLL,,"CDDBControlWinamp.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,CDDBUIW.DLL,,"CDDBUIWinamp.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,in_mp3p.dll,,"in_mp3PRO.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,in_vorb.dll,,"in_vorbis.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,nsvdecac.dll,,"nsvdec_aac.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,nsvdecvp.dll,,"nsvdec_vp5.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,readfile.dll,,"read_file.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,vmdsktp.dll,,"vms_desktop.dll"

[SampleRemoveLFNs]
;Deletes files with Long File Names during Uninstall
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,,,"%24%\%PROGRAMF%\Winamp"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,,,"%24%\%PROGRAMF%\Winamp\plugins"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,cddbcw.DLL,,"CDDBControlWinamp.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,CDDBUIW.DLL,,"CDDBUIWinamp.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,in_mp3p.dll,,"in_mp3PRO.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,in_vorb.dll,,"in_vorbis.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,nsvdecac.dll,,"nsvdec_aac.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,nsvdecvp.dll,,"nsvdec_vp5.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,readfile.dll,,"read_file.dll"
HKLM,Software\Microsoft\Windows\CurrentVersion\RenameFiles\Winamp,vmdesktp.dll,,"vms_desktop.dll"


[SampleAddLinks]
;Adds shortcut to SAMPLE.EXE on the Start Menu:
setup.ini, progman.groups,, "Sample=%SampleFolder%";creates folder
setup.ini, Sample,, """%SampleDesc%"", %24%\%programf%\winamp\Winamp.exe";creates link 

[SampleRemoveLinks]
;Removes shortcut to SAMPLE.EXE on the Start Menu during Uninstall:
setup.ini, progman.groups,, "Sample=%SampleFolder%";creates folder
setup.ini, Sample,, """%SampleDesc%"", %24%\%programf%\winamp\Winamp.exe";RMLink
[SourceDisksNames]
1=%DiskName%,Sample,0 

[SourceDisksFiles]
sample.exe=1,,13456
sample.dll=1,,20987
sample.bmp=1,,64098
sample.hlp=1,,55441
sample.inf=1,,5687 

[Strings]
PROGRAMF="PROGRA~1"
SampleFolder="Winamp"
SampleDesc="Winamp 2.91"
DiskName="Whimsy's Winamp 2.91 Installer kit"


5) Next, I went into regedit, and pulled some data out, and placed it into winamp.reg:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.mp3]
"Content Type"="audio/mpeg"
@="Winamp.File"
"PerceivedType"="audio"
"MP2.Last"="Custom"
"Winamp_Back"="mp3file"

[HKEY_CLASSES_ROOT\.mp3\OpenWithProgIds]
"mp3file"=hex(0):

[HKEY_CLASSES_ROOT\.mp3\PersistentHandler]
@="{098f2470-bae0-11cd-b579-08002b30bfeb}"

;*********************
; winamp.file entries
;*********************

[HKEY_CLASSES_ROOT\Winamp.File]
@="Winamp media file"

[HKEY_CLASSES_ROOT\Winamp.File\DefaultIcon]
@="C:\\Program Files\\Winamp\\winamp.exe,1"

[HKEY_CLASSES_ROOT\Winamp.File\shell]
@="Play"

[HKEY_CLASSES_ROOT\Winamp.File\shell\Enqueue]
@="&Enqueue in Winamp"

[HKEY_CLASSES_ROOT\Winamp.File\shell\Enqueue\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" /ADD \"%1\""

[HKEY_CLASSES_ROOT\Winamp.File\shell\Enqueue\DropTarget]
"Clsid"="{77A366BA-2BE4-4a1e-9263-7734AA3E99A2}"

[HKEY_CLASSES_ROOT\Winamp.File\shell\ListBookmark]
@="Add to Winamp's &Bookmark list"

[HKEY_CLASSES_ROOT\Winamp.File\shell\ListBookmark\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" /BOOKMARK \"%1\""

[HKEY_CLASSES_ROOT\Winamp.File\shell\open]
@=""

[HKEY_CLASSES_ROOT\Winamp.File\shell\open\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Winamp.File\shell\open\DropTarget]
"Clsid"="{46986115-84D6-459c-8F95-52DD653E532E}"

[HKEY_CLASSES_ROOT\Winamp.File\shell\Play]
@="&Play in Winamp"

[HKEY_CLASSES_ROOT\Winamp.File\shell\Play\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Winamp.File\shell\Play\DropTarget]
"Clsid"="{46986115-84D6-459c-8F95-52DD653E532E}"

;***********************
;Winamp Playlist Entries
;***********************

[HKEY_CLASSES_ROOT\Winamp.Playlist]
@="Winamp playlist file"
"EditFlags"=hex:00,00,01,00

[HKEY_CLASSES_ROOT\Winamp.Playlist\DefaultIcon]
@="C:\\Program Files\\Winamp\\winamp.exe,2"

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell]
@="Play"

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\Enqueue]
@="&Enqueue in Winamp"

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\Enqueue\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" /ADD \"%1\""

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\ListBookmark]
@="Add to Winamp's &Bookmark list"

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\ListBookmark\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" /BOOKMARK \"%1\""

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\open]
@=""

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\open\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\Play]
@="&Play in Winamp"

[HKEY_CLASSES_ROOT\Winamp.Playlist\shell\Play\command]
@="\"C:\\Program Files\\Winamp\\winamp.exe\" \"%1\""

;***************
;Skinzip entries
;***************


This should associate winamp with MP3 files, and add the context menus. The only problem is uninstallation - It will not show up in the Add/Remove programs applet.

Hope this helps people out! Remember to consult the file list.

If you want to use this as a template to create your own file copy "engines", then rememebr to save a lot of time with dir /b >filelist.txt. That way, you only have to copy from a text file, and not each individual file name.

Hope that helps!

#23 User is offline   aitf311 

  • Newbie
  • Group: Members
  • Posts: 37
  • Joined: 21-October 03

Posted 28 November 2003 - 09:06 PM

Whimsy if you need some files hosted, Ill do it for you, I am very interested in this...

#24 User is offline   Whimsy 

  • Junior
  • Pip
  • Group: Members
  • Posts: 56
  • Joined: 27-November 03

Posted 28 November 2003 - 09:42 PM

aitf311, on Nov 28 2003, 10:06 PM, said:

Whimsy if you need some files hosted, Ill do it for you, I am very interested in this...

Trust me, you don't want to be hosting this monster. Besides, it would take away the fun of editing your individual configurations!

I think I might create a smaller tree, however, so people can get a starting point for adding their own configuration changes, while having a usable foundation. After that, I think I will try to create a "Windows Post-Install Wizard Pre-Configuration Wizard" (Or something like that)..

Thanks everyone! I really appreciate your feedback!

Edit:
I'll accept the hosting once I finalize some details. I am well underway coding the configuration program, but I need a couple of days. After that, I intend to give out a test release, and if everything comes back good, I will then officially release a "Version 1".

There will be a 100KB release, and maybe a MUCH MUCH LARGER release, depending on hosting options. I would consider a Bit-torrent release, except I share my internet access with 7 other computers in my house. And yes, we all use it, constantly.

Again, I love the positive feedback.

#25 User is offline   gamehead200 

  • SEARCH!!! SEARCH!!!
  • Group: Super Moderator
  • Posts: 7,019
  • Joined: 02-September 02
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 28 November 2003 - 09:44 PM

I can host it... I have 20 gigs of bandwidth that I hardly use! :rolleyes:

I could setup a sub-domain for you! :)

#26 User is offline   shareef59 

  • Member
  • PipPip
  • Group: Members
  • Posts: 209
  • Joined: 21-November 03

Posted 03 December 2003 - 10:03 PM

@Whimsy

Really impressed with your WPI script, show alot of promise!!! Saying that, I am going to ask a really silly question!! :) My brains been like cheese recently!

Quote:

[GuiRunOnce]
%systemdrive%\install\wpi.cmd
%systemdrive%\install\install.cmd
%systemdrive%\cleanup.cmd


I understand the wpi & cleanup cmd, but what does the install.cmd contain. Can you show an example?

Thanks!

#27 User is offline   Whimsy 

  • Junior
  • Pip
  • Group: Members
  • Posts: 56
  • Joined: 27-November 03

Posted 12 December 2003 - 03:20 AM

shareef59
The install.cmd file is generated on the fly, as you select options. When you click "continue" in the WPI, generate.js is called (see the source), and it creates the install.cmd file, with the options you've selected. It executes after wpi.hta closes.

gamehead200
I am interested in taking you up on your offer for hosting, if you can handle a 100MB package. I don't expect this to be hit too hard, but if you decide that 100 MB is too much, than I woulden't blame you :rolleyes:

-----------------------------------------------------------------------
In other news, I haven't had a lot of time to work on it, but I have tuned and updated some software packages, and wish to announce the 100MB version is complete. It contains the following packages:

Additional Patches
Basically, a CMD file that can optionally be called. It includes one patch, but you can add others to it.

Extra Command Line Tools
If you use Unix, Linux, or other operating systems, than you'll probably find a use for this :) Some of these tools are from sysinternals, and others are from various opensource porting initiatives all over the internet.

Enable Custom Themes
The hacked UXTheme.sll file is in here.

TweakUI 2.10
Everyone loves TweakUI :D

CD Image Powertoy
this is not a Microsoft powertoy, but integrates itself well into Windows XP. For more information, please visit http://isorecorder.a...isorecorder.htm

DirectX 9b
This is the pre-OPK version with the modified setup.exe

Updated MS Virtual Machine
If you are using service pack 1 (not 1a), then this will be useful for you!

MSN Messenger 6.1
The latest version of Microsoft messenger

Windows Media Player 9
Says it all

Movie Maker 2.0
Yep!

Defilerpak 1.12
Defilerpak is a codec package that emphisizes being as light-weight as possible.

WinRAR 3.20
File Compression Package

Winamp 2.91
Modified install file - Goes in silently via an INF file

Registry Tweaks
I reocmmend that you comb through this. It uses a lot of junk I picked up on the internet. It also disables the Windows Media Player 9 prompts (Bla bla accept EULA bla bla).

There are also a lot of other options, and it includes install guides. I've also added an address for Paypal, cause people asked (woah!).

-----------------------------------------------------------------------

Final comments
I removed the Task Switcher, beacuse it would randomly screw up during the install, and I had no clue why. The code is there, so if you feel like investing a lot of time, go for it! That said, if you see other problems, tell me, and I'll see about fixing them. I havn't had a chance to test everything, since that would mean a complete reinstall of windows, and I just haven't had time for that.

Also, a preliminary version of the WPIPCW (Windows Post-Install Wizard Pre-Configuration Wizard) is included, but I have no intentions of finishing it at this point, and consider it abandoned. If anyone wants to play with it, go for it - The framework is all there, and the formula for the code is complete, but my eyes glazed over working on it, and I have a rule about that :D. I might go back to it at a later date, but I don't have plans for that at this point.

The first post for the "current" small version, with the beginnings of a config wizard (Which is, as I said, broken!)

As always, make sure you accept the included license for any application you choose to install!

#28 User is offline   stimpee 

  • Newbie
  • Group: Members
  • Posts: 26
  • Joined: 17-November 03

Posted 08 January 2004 - 08:38 PM

any more news on this?

#29 User is offline   beppemito 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 422
  • Joined: 31-August 03

Posted 15 February 2004 - 03:41 PM

Whimsy, on Dec 12 2003, 03:20 AM, said:

shareef59
The install.cmd file is generated on the fly, as you select options. When you click "continue" in the WPI, generate.js is called (see the source), and it creates the install.cmd file, with the options you've selected. It executes after wpi.hta closes.

but if i click EXIT, install.cmd isn't created and an error appear: c:\install\install.cmd isn't found!!!how can i fix it?

#30 User is offline   beppemito 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 422
  • Joined: 31-August 03

Posted 23 February 2004 - 09:32 AM

beppemito, on Feb 15 2004, 03:41 PM, said:

Whimsy, on Dec 12 2003, 03:20 AM, said:

shareef59
The install.cmd file is generated on the fly, as you select options. When you click "continue" in the WPI, generate.js is called (see the source), and it creates the install.cmd file, with the options you've selected. It executes after wpi.hta closes.

but if i click EXIT, install.cmd isn't created and an error appear: c:\install\install.cmd isn't found!!!how can i fix it?

anyone?!?!?pleasee.....

#31 User is offline   AirMaleDFW 

  • Junior
  • Pip
  • Group: Members
  • Posts: 54
  • Joined: 11-February 04

Posted 04 March 2004 - 12:24 PM

@Whimsy: Very nice job indeed!

I edited your code to put a different twist on the installation by running the items selected via a more professional (looking) RunOnceEx installation instead of the install.cmd batch file.

If anyone happens to be interested... i'll post the changes after I figure out how to work this board :-)

#32 User is offline   SKiTLz 

  • Dole Bludger
  • PipPip
  • Group: Members
  • Posts: 215
  • Joined: 05-November 03

Posted 04 March 2004 - 12:40 PM

If anyone is interested... Rather than having wpi.hta close then call install.cmd by another means I made the generate.js script first generate the install.cmd file then run it... Then wpi.hta will close..

Add this too wpi.hta (change the path to your install.cmd)

<script 
	language="vbscript">
	function RunBat()
	Set wShell = CreateObject("Shell.Application")
	wShell.Open "C:\Scripts\Install.bat"
	set wShell = nothing
	end function
</SCRIPT>


Add this to the end of generate.js before tf.Close();
RunBat();


Now when you click continue it'll generate the script, run it, then exit.. Nothing big but its easier I find..

Cheers

#33 User is offline   AirMaleDFW 

  • Junior
  • Pip
  • Group: Members
  • Posts: 54
  • Joined: 11-February 04

Posted 04 March 2004 - 12:50 PM

Ok.... here is the generate.js code for installing the items selected via a RunOnceEx method instead of an install.cmd batch file.

Edit your own source as needed. In this example, I had less installable items to select from than Whimsy's list. Also, all of my application / update installs are run from %SYSTEMDRIVE%\TEMP, etc.

function CreateFile()
{

   var WshShell = new ActiveXObject("wscript.shell");
   var WshEnv = WshShell.Environment("PROCESS");
   var fso, tf, KeyBase;

   fso = new ActiveXObject("Scripting.FileSystemObject");
   KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx";

   //Next 6 lines were written by Fiend, and fix a crash.
   var strPath = WshEnv("SYSTEMDRIVE")+"\\TEMP\\";
   var strFile = "install.cmd";
   if (fso.FolderExists(strPath) == false)
    {
    fso.CreateFolder(strPath);
    }

   tf = fso.CreateTextFile((WshEnv("SYSTEMDRIVE"))+"\\TEMP\\install.cmd", true);

//Header area.
	WshShell.regWrite(KeyBase + "\\Title", "Finalizing Installation.", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\Flags", 0x00000020, "REG_DWORD");

//System Updates - Patches
if (document.inner.WPI.chkbox001.checked){
	WshShell.regWrite(KeyBase + "\\10\\", "Installing Microsoft Updates", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\10\\1", strPath + "\XP-Updates\\RQ817778.EXE -q -u -o -n -z", "REG_SZ");
   }

//Install TweakUI
if (document.inner.WPI.chkbox002.checked){
	WshShell.regWrite(KeyBase + "\\15\\", "Installing TweakUI 2.10", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\15\\1", strPath + "\TweakUI\\O_TWEAKU.MSI /QN", "REG_SZ");
   }

//Install CD Image Powertoy
if (document.inner.WPI.chkbox003.checked){
	WshShell.regWrite(KeyBase + "\\20\\", "Installing CD Image ISO Recorder", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\20\\1", strPath + "\ISORecdr\\ISORECORD.MSI /QN", "REG_SZ");
   }

//Install Defiler Codec Pack
if (document.inner.WPI.chkbox004.checked){
	WshShell.regWrite(KeyBase + "\\25\\", "Installing Defiler Codec Pack", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\25\\1", strPath + "\Defiler\\DefilerPak116.EXE /S", "REG_SZ");
   }  

//Install Adobe Acrobat Reader 6.0.1
if (document.inner.WPI.chkbox005.checked){
	WshShell.regWrite(KeyBase + "\\30\\", "Installing Adobe Acrobat 6.0.1", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\30\\1", strPath + "\Acrobat\\O_AR601.EXE /Q", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\30\\2", strPath + "\Acrobat\\CLEANUPACRO.EXE /Q", "REG_SZ");
   }

//Install Google Toolbar
if (document.inner.WPI.chkbox006.checked){
	WshShell.regWrite(KeyBase + "\\35\\", "Installing Google Toolbar", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\35\\1", strPath + "\Google\\O_GOOGTB.EXE /q", "REG_SZ");
   }
 

//Install WinRAR 3.30
if (document.inner.WPI.chkbox007.checked){
	WshShell.regWrite(KeyBase + "\\40\\", "Installing WinRAR 3.30", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\40\\1", strPath + "\WinRAR\\O_WR330.EXE /s", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\40\\2", strPath + "\WinRAR\\CLEANUPWR.EXE /Q", "REG_SZ");
   }

//Install WinZip 8.1 SR1
if (document.inner.WPI.chkbox008.checked){
	WshShell.regWrite(KeyBase + "\\45\\", "Installing WinZip 8.1 SR1", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\45\\1", strPath + "\WinZip\\O_WZ81SR1.EXE /Q", "REG_SZ");
   }

//Apply Registry Tweaks
if (document.inner.WPI.chkbox009.checked){
	WshShell.regWrite(KeyBase + "\\50\\", "Installing Windows XP Reg Tweaks", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\50\\1", strPath + "\RegTweaks\\TweakXP.EXE /Q", "REG_SZ");
   }

//Install Microsoft Office
if (document.inner.WPI.chkbox010.checked){
	var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");

	WshShell.regWrite(KeyBase + "\\55\\", "Installing Microsoft Office", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\55\\1", CDROM + "setup.exe /AUTORUN", "REG_SZ");

   }

//Launch the RunOnceEx process we just wrote keys for and exit

   var WshShell = new ActiveXObject("wscript.shell");
   var WshEnv = WshShell.Environment("PROCESS");
   var strPath = WshEnv("SYSTEMDRIVE")+"\\TEMP\\";

   WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess");
self.close();
}


#34 User is offline   SKiTLz 

  • Dole Bludger
  • PipPip
  • Group: Members
  • Posts: 215
  • Joined: 05-November 03

Posted 04 March 2004 - 02:28 PM

ahh.. your method is way better man... bastard.. Now I gotta spend all night converting mine..

#35 User is offline   airmr 

  • Junior
  • Pip
  • Group: Members
  • Posts: 81
  • Joined: 21-October 03

Posted 07 March 2004 - 07:07 AM

I made an Installation Menu from your program for CD Use.
So after always asking questions i take my chance, even if small, that noone else thought of this :) and i get famous somehow :D

Heres the code, i bet most of you did it allready :D

wpi.cmd:

Quote

start /wait .\install\WPI\WPI.HTA
ECHO ESTABLISHING CD-ROM DRIVE
SET CDROM=A
IF EXIST D:\wpi.cmd SET CDROM=D:
IF EXIST E:\wpi.cmd SET CDROM=E:
IF EXIST F:\wpi.cmd SET CDROM=F:
IF EXIST G:\wpi.cmd SET CDROM=G:
IF EXIST H:\wpi.cmd SET CDROM=H:
IF EXIST I:\wpi.cmd SET CDROM=I:
IF EXIST J:\wpi.cmd SET CDROM=J:
IF EXIST K:\wpi.cmd SET CDROM=K:
IF EXIST L:\wpi.cmd SET CDROM=L:
IF EXIST M:\wpi.cmd SET CDROM=M:
IF EXIST N:\wpi.cmd SET CDROM=N:
IF EXIST O:\wpi.cmd SET CDROM=O:
IF EXIST P:\wpi.cmd SET CDROM=P:
IF EXIST Q:\wpi.cmd SET CDROM=Q:
IF EXIST R:\wpi.cmd SET CDROM=R:
IF EXIST S:\wpi.cmd SET CDROM=S:
IF EXIST T:\wpi.cmd SET CDROM=T:
IF EXIST U:\wpi.cmd SET CDROM=U:
IF EXIST V:\wpi.cmd SET CDROM=V:
IF EXIST W:\wpi.cmd SET CDROM=W:
IF EXIST X:\wpi.cmd SET CDROM=X:
IF EXIST Y:\wpi.cmd SET CDROM=Y:
IF EXIST Z:\wpi.cmd SET CDROM=Z:

ECHO YOUR CD-ROM DRIVE IS %CDROM%


start /wait c:\install\install.cmd

ECHO Deleting Temp Installation Files...
RD /S /Q %systemdrive%\install
ECHO.


exit


In generate.js change %systemroot% to %cdrom%
in all lines that use this as installation root.

Thats it, and it works :rolleyes:

#36 User is offline   TWILL 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 16-November 03

Posted 24 March 2004 - 03:15 PM

@AirMaleDFW or anyone else with vbscript knowledge or whatever scripting it is.

Ive implemented your generate.js that uses the RunOnceEx method and it works great. I really like this method of having a standalone disk for installing the apps without batchfiles. (Thanks to Whimsy too for the ideas and app!!!)

To start off I am not very knowledgeable on vbscript, just enough for me to cause problems. :rolleyes:

Id like to know how to put into the script (generate.js) a way to add/edit the registry.

For example, Ive installed Alcohol120 like was demonstrated in the script and usually I would run a .cmd file to run Regedit and then enter the entry using the regular reg file. How would I do this with this script instead of a batchfile?

Can someone please help with the coding by giving me an example?


{edited}
Heres something I tried but doesnt seem to work, again, as for the vbcode I dont know what the heck I doing, I just learn by disaster! :)

if (document.inner.WPI.chkbox008.checked){
var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");

WshShell.regWrite(KeyBase + "\\50\\", "Alcohol 120% 1.4.8.1222", "REG_SZ");
//WshShell.regWrite(KeyBase + "\\50\\1", CDROM + "\\install\\Alcohol120\\setup.msi /QN Reboot=Suppress", "REG_SZ");
//WshShell.regWrite(KeyBase + "\\50\\2", Regedit /s CDROM + "\\install\\Alcohol120\\alc120.reg /f", "REG_SZ");
WshShell.run("Regedit /s" + CDROM + "\\install\\Alcohol120\\alc120.reg /f");
  }


thnx
TWILL

#37 User is offline   AirMaleDFW 

  • Junior
  • Pip
  • Group: Members
  • Posts: 54
  • Joined: 11-February 04

Posted 24 March 2004 - 07:32 PM

I think this is what you want for that particular scenario (given just the one example for Alcohol120)...

function CreateFile()
{

  var WshShell = new ActiveXObject("wscript.shell");
  var WshEnv = WshShell.Environment("PROCESS");
  var KeyBase, CDROM;

  CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");
  KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx";

//Header area.
WshShell.regWrite(KeyBase + "\\Title", "Finalizing Installation.", "REG_SZ");
WshShell.regWrite(KeyBase + "\\Flags", 0x00000020, "REG_DWORD");

if (document.inner.WPI.chkbox008.checked){

WshShell.regWrite(KeyBase + "\\50\\", "Alcohol 120% 1.4.8.1222", "REG_SZ");
WshShell.regWrite(KeyBase + "\\50\\1", CDROM + "\install\\Alcohol120\\setup.msi /QN Reboot=Suppress", "REG_SZ");
WshShell.regWrite(KeyBase + "\\50\\2", 'Regedit /s ' + CDROM + "\install\\Alcohol120\\alc120.reg", "REG_SZ");
 }

//Launch the RunOnceEx process we just wrote keys for and exit

  var WshShell = new ActiveXObject("wscript.shell");
  var WshEnv = WshShell.Environment("PROCESS");
  var strPath = WshEnv("SYSTEMDRIVE")+"\\TEMP\\";

  WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess");
 self.close();
}

Gives the following result for RunOnceEx key 50 at the computer I happen to be sitting at (Windows source install was CDROM E:\)

P.S. While there are simularities between vb script and java script... these *.js files are java script (in case you search for coding examples or syntax).

Attached File(s)

  • Attached File  test.jpg (32.74K)
    Number of downloads: 320


#38 User is offline   TWILL 

  • Junior
  • Pip
  • Group: Members
  • Posts: 76
  • Joined: 16-November 03

Posted 24 March 2004 - 08:32 PM

@AirMaleDFW

Thanks a ton!!! Exactly what I was looking for. I was close....

I was noticing the similarities between vb script and java script like you mentioned. Im kind of new to all this scripting stuff, and it has definitely caught my insterest so Ill be looking at it a lot more now.


I like to learn by example so thanks for posting your code it helped my a lot!

Thanks
TWILL

#39 User is offline   celzius 

  • Newbie
  • Group: Members
  • Posts: 45
  • Joined: 29-August 03

Posted 05 April 2004 - 04:04 PM

I implemented the new generate.js file into my unattended installation to use runonceex but i keep getting an error every time i push the begin install button or sometimes just when it starts. It's always this error
Line 48
Char 115
Invalid character
code 0

Here is my generate.js
function CreateFile()
{

   var WshShell = new ActiveXObject("wscript.shell");
   var WshEnv = WshShell.Environment("PROCESS")
   var fso, tf, KeyBase;

   fso = new ActiveXObject("Scripting.FileSystemObject");
   KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx";

   //Next 6 lines were written by Fiend, and fix a crash.
   var strPath = WshEnv("SYSTEMDRIVE")+"\\install\\";
   var strFile = "install.cmd";
   if (fso.FolderExists(strPath) == false)
    {
    fso.CreateFolder(strPath);
    }

   tf = fso.CreateTextFile((WshEnv("SYSTEMDRIVE"))+"\\install\\install.cmd", true);


//Header area.
   WshShell.regWrite(KeyBase + "\\Title", "Finalizing Installation.", "REG_SZ");
   WshShell.regWrite(KeyBase + "\\Flags", 0x00000020, "REG_DWORD");


//System Updates


if (document.inner.WPI.chkbox001.checked){
	WshShell.regWrite(KeyBase + "\\10\\", "Installing Norton Antivirus 2003", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\10\\1", strPath + "\\Applications\\NAV2003\\NAV\\NAV.msi /QB", "REG_SZ");
   }

if (document.inner.WPI.chkbox002.checked){
	WshShell.regWrite(KeyBase + "\\20\\", "Installing Zonealarm Pro 4.5.538.001", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\20\\1", strPath + "\\Applications\\ZoneAlarm\\zasetup.exe /s /noreboot", "REG_SZ");
   }

if (document.inner.WPI.chkbox003.checked){
	WshShell.regWrite(KeyBase + "\\30\\", "Installing Nero Burning ROM 6.3.0.2", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\30\\1", strPath + "\\Applications\\Nero\\Nero6302.exe /silent /noreboot /no_ui /nolicence /sn=1A23-0082-0030-1609-0051-7000 /write_sn", "REG_SZ");
   }

if (document.inner.WPI.chkbox004.checked){
	WshShell.regWrite(KeyBase + "\\40\\", "Installing K-Lite Mega CODEC Pack 1.01", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\40\\1", strPath + "\\Applications\\Codecs\\klmcodec101.exe /verysilent /loadinf=".\silent.inf"", "REG_SZ");
   }

if (document.inner.WPI.chkbox005.checked){
	WshShell.regWrite(KeyBase + "\\50\\", "Installing Adobe Reader 6", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\50\\1", strPath + "\\Applications\\AdobeReader6\\AR6.msi /QB", "REG_SZ");
   }

if (document.inner.WPI.chkbox006.checked){
	WshShell.regWrite(KeyBase + "\\60\\", "Installing AdAware 6 build 181", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\60\\1", strPath + "\\Applications\\AdAware\\AdAware6181.exe /s", "REG_SZ");
   }

if (document.inner.WPI.chkbox007.checked){
	WshShell.regWrite(KeyBase + "\\70\\", "Installing MSN Messenger 6.1", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\70\\1", strPath + "\\Applications\\MSN\\MsnMsgs.msi /QB", "REG_SZ");
   }

if (document.inner.WPI.chkbox008.checked){
	WshShell.regWrite(KeyBase + "\\80\\", "Installing WinRAR 3.30", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\80\\1", strPath + "\\Applications\\WinRAR\\wrar330.exe /s", "REG_SZ");
   }

if (document.inner.WPI.chkbox009.checked){
	WshShell.regWrite(KeyBase + "\\90\\", "Installing Sun Java2 Runtime Environment 1.4.2_01", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\90\\1", strPath + "\\Applications\\J2RE\\j2re142_01.exe /s /v/qn", "REG_SZ");
   }

if (document.inner.WPI.chkbox010.checked){
	WshShell.regWrite(KeyBase + "\\100\\", "Installing TweakUI 2.10", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\100\\1", strPath + "\\Applications\\TweakUI\\TweakUI.msi /qb", "REG_SZ");
   }
/* Empty
if (document.inner.WPI.chkbox011.checked){

   }

if (document.inner.WPI.chkbox012.checked){

   }

if (document.inner.WPI.chkbox013.checked){

}

if (document.inner.WPI.chkbox014.checked){

   }

if (document.inner.WPI.chkbox015.checked){

   }

if (document.inner.WPI.chkbox016.checked){

   }

if (document.inner.WPI.chkbox017.checked){

   }

if (document.inner.WPI.chkbox018.checked){

  }
*/

//Launch the RunOnceEx process we just wrote keys for and exit

   var WshShell = new ActiveXObject("wscript.shell");
   var WshEnv = WshShell.Environment("PROCESS");
   var strPath = WshEnv("SYSTEMDRIVE")+"\\install\\";

  WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess");
self.close();
}


and here is a snippet of my wpi.hta
<script
	language="JavaScript1.2"
	defer="true"
	src="./wpiscripts/generate.js"
	type="text/javascript"
	APPLICATION="yes">
</SCRIPT>

line 48 is the one that starts with defer

Can anyone help?

Thanx in advance

#40 User is offline   Wraith 

  • Dr. Nick
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,256
  • Joined: 01-January 04

Posted 05 April 2004 - 06:05 PM

You may find that the problem is this line:

WshShell.regWrite(KeyBase + "\\40\\1", strPath + "\\Applications\\Codecs\\klmcodec101.exe /verysilent /loadinf=".\silent.inf"", "REG_SZ");


At least, that's the one I'd think is the most likely cause.

You've got issues opening/closing strings, as well as a \s in there.

Try this:

WshShell.regWrite(KeyBase + "\\40\\1", strPath + "\\Applications\\Codecs\\klmcodec101.exe /verysilent /loadinf=\".\\silent.inf\"", "REG_SZ");



(Of course, this is a GUESS, I'm not an expert on WSH registry formatting, so I could be wrong :))

Share this topic:


  • 9 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy