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

Jump to content


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

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

#41 User is offline   AirMaleDFW 

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

Posted 06 April 2004 - 10:07 AM

Wraith is correct... that line in your generate.js is causing the invalid character error.

You'll also need to delete a preceding slash from all of your strPath + lines or the end result has too many slashes in the makeup.

from strPath + "\\Applications\\blahblah

to strPath + "\Applications\\blahblah


#42 User is offline   celzius 

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

Posted 06 April 2004 - 03:54 PM

Thanks alot guys. It was as you said.

:)

#43 User is offline   Mr.J!M 

  • Junior
  • Pip
  • Group: Members
  • Posts: 70
  • Joined: 25-March 04

Posted 17 April 2004 - 11:18 AM

This Soft work with Windows 2000?

#44 User is offline   [BM]Crusher 

  • Got milk?
  • PipPipPipPip
  • Group: Members
  • Posts: 570
  • Joined: 05-April 04

Posted 18 April 2004 - 01:14 AM

MrJ!M it should work with Win2K, but perhaps not 98/ME?

Congrats for creating this great install interface! I got mine working without too many hassles and now I have over 21 items on my WPI install page :)

I am running mine through cmdlines.txt and therefore it is running at 640x480 resolution... is there a way I can make more space for the list of programs? I already had to make the names really short and put them into 3 columns otherwise they don't all fit on the screen? I know nothing about java, vb or even html, I looked through some of the files but have no idea how to make more space :rolleyes:

Again, thanks a tonne for creating this it is awesome! :D

#45 User is offline   TWILL 

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

Posted 19 April 2004 - 04:58 PM

@[BM]Crusher

In the file WPI.hta I think you can change the screen size. Near the begining of the file youll see script that sets the resize to (800,600), all you should have to do is put in the resolution you want. You just have to be careful because if you make it say 1024x768 res and you open it on a machine with 800x600 res the buttons may not be accessable.


TWILL

#46 User is offline   TWILL 

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

Posted 19 April 2004 - 05:08 PM

This one should be an easy one for you VBscript gurus...

AirMaleDFW??? :)

Im having trouble getting install shield apps to install. I am assuming its because the setup file doesnt know where the iss file is.

Does anyone know how you point to an setup.iss file for installsheild apps?

if (document.inner.WPI.chkbox012.checked){
var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");
WshShell.regWrite(KeyBase + "\\70\\", "PowerDVD5", "REG_SZ");
WshShell.regWrite(KeyBase + "\\70\\1", CDROM + "\\install\\PowerDVD\\Setup.exe -s", "REG_SZ");

}


Ive seen this code around and I see how they are telling where the setup.iss file is but Im not sure how to do it in the code above.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz100]
"1"="\\Applications\\PowerDVD5\\Setup.exe -s %systemdrive%\\install\\Applications\\PowerDVD5\\setup.iss"
@="Installing Power DVD 5"





thanks
TWILL

#47 User is offline   airmr 

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

Posted 20 April 2004 - 10:26 AM

setup -s -f1"%PathTo%setup.iss"

#48 User is offline   AirMaleDFW 

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

Posted 20 April 2004 - 11:35 AM

Try this...

if (document.inner.WPI.chkbox012.checked){
var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");
	WshShell.regWrite(KeyBase + "\\70\\", "PowerDVD5", "REG_SZ");
	WshShell.regWrite(KeyBase + "\\70\\1", CDROM + "\install\\PowerDVD\\Setup.exe -s " + CDROM + '\install\\PowerDVD\\setup.iss', "REG_SZ");

}


Also, the var CDROM already contains a slash in it like "D:\" so CDROM + "\\install\\PowerDVD... would add too many slashes and result in D:\\install\PowerDVD...

CDROM + "\install\\PowerDVD... would have the work option.

#49 User is offline   TWILL 

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

Posted 20 April 2004 - 04:36 PM

Thanks Airmr and AirMaleDFW!

But for some reason I still cant get it to install though. It reads the CD for a few seconds and then it just quits with no installation. Its only the programs with the -s (installshield) that I am having problems with and I assume its not finding the setup.iss.

I was able to install the app from the cd by manualy using the Setup.exe -s in a cmd window, so I assume my code is wrong.

Ive tried it both ways with and without the -f1
if (document.inner.WPI.chkbox012.checked){
var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");
WshShell.regWrite(KeyBase + "\\70\\", "PowerDVD5", "REG_SZ");
WshShell.regWrite(KeyBase + "\\70\\1", CDROM + "\install\\PowerDVD\\Setup.exe -s " + CDROM + '\install\\PowerDVD\\setup.iss', "REG_SZ");

}


and

if (document.inner.WPI.chkbox012.checked){
var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");
WshShell.regWrite(KeyBase + "\\70\\", "PowerDVD5", "REG_SZ");
WshShell.regWrite(KeyBase + "\\70\\1", CDROM + "\install\\PowerDVD\\Setup.exe -s -f1 " + CDROM + '\install\\PowerDVD\\setup.iss', "REG_SZ");

}


Should those be single or double quotes around the section:

'\install\\PowerDVD\\setup.iss'


Any ideas why it doesnt complete the install? :)

TWILL

#50 User is offline   AirMaleDFW 

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

Posted 20 April 2004 - 05:51 PM

The code above produces the following RunOnceEx entries. Is this what you type at the command line for a successfull install?

To test any changes you make to generate.js, you can comment out the rundll32 line at the end //WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess");.

Then you can run WPI.HTA right on your computer. Make selections and choose "Begin Install"... (which of course it won't). It will though, make the RunOnceEx entries. You can run regedit to view them to make sure you have all the slashes and quotes and such you want for your installation. Then delete the RunOnceEx entries so they don't end up running on your computer next time you reboot.

If you leave regedit open on the RunOnceEx keys while you run WPI.HTA, you'll have to select "View / Refresh" to see the new or updated keys you are testing.

Attached File(s)



#51 User is offline   TWILL 

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

Posted 20 April 2004 - 06:52 PM

Thanks AirMaleDFW for the quick reply.

I was wondering how I could check the RunOnceEx entries. This will help a lot in the future.

I did find out what was wrong. I was looking through some other posts and came across this one http://www.msfn.org/...showtopic=17207

Quote

Alanoll wrote:
try adding the -f2 switch.

Installshield has a tendency to quite if it can't write a log, and the -f2 makes sure you have a path

-f2"%windir%\temp\install.log"


sure enough I changed the code to this

added this to the begining of generate.js
 tf2 = fso.CreateTextFile((WshEnv("SYSTEMDRIVE"))+"\\TEMP\\install.log", true);


and this

if (document.inner.WPI.chkbox012.checked){
var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");
WshShell.regWrite(KeyBase + "\\70\\", "PowerDVD5", "REG_SZ");
WshShell.regWrite(KeyBase + "\\70\\1", CDROM + "\install\\PowerDVD\\Setup.exe -s -f2" + strPath + '\\install.log',  "REG_SZ");
}


and it installed. Apparently Alanoll was correct installshield needs the install.log or it will not work.


Thanks again AirMaleDFW for the help. :)

TWILL

#52 User is offline   Please 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 29-November 03

Posted 21 April 2004 - 07:13 AM

May I ask one stupid question?
If I wanna remove all software of %systemdrive%\TEMP after I finish installation,
then where to put following command?
RD /s /q %systemdrive%\TEMP\

or how to launch the RunOnceEx process later when i finish selection and exit? Then I can control everything.
Thank you very much. :)

#53 User is offline   AirMaleDFW 

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

Posted 21 April 2004 - 12:27 PM

@Please: Instead of copying the program installations to the %systemdrive%\TEMP as I had done.... perhaps do as TWILL is doing and just install the selected programs from the unattended cdrom. Then you don't have to worry about creating TEMP directories on the hard drive, copying over install programs and cleaning up afterward.

You can have a directory on your unattended cdrom called APPS (or whatever you wish to call it). Have your installations reside in subdirectories under APPS on the cdrom.

The following generate.js code is an example of having your applications install from the unattended cd after the user selects which ones he/she wants installed (when WPI.HTA is run).

The RunOnceEX keys generated are processed immediately after the selections have been made and the WPI.HTA program exits.

function CreateFile()
{

  var WshShell = new ActiveXObject("wscript.shell");
  var WshEnv = WshShell.Environment("PROCESS");
  var KeyBase = "HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx";
  var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");

//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", CDROM + "\APPS\\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", CDROM + "\APPS\\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", CDROM + "\APPS\\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", CDROM + "\APPS\\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", CDROM + "\APPS\\Acrobat\\O_AR601.EXE /Q", "REG_SZ");
WshShell.regWrite(KeyBase + "\\30\\2", CDROM + "\APPS\\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", CDROM + "\APPS\\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", CDROM + "\Applications\\WinRAR\\O_WR330.EXE /s", "REG_SZ");
WshShell.regWrite(KeyBase + "\\40\\2", CDROM + "\APPS\\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", CDROM + "\APPS\\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", CDROM + "\APPS\\RegTweaks\\TweakXP.EXE /Q", "REG_SZ");
  }

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

  var WshShell = new ActiveXObject("wscript.shell");
  var WshEnv = WshShell.Environment("PROCESS");
  WshShell.Run("rundll32.exe iernonce.dll,RunOnceExProcess");
self.close();
}


#54 User is offline   TWILL 

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

Posted 21 April 2004 - 04:25 PM

Right on AirMaleDFW, thats exactly what I do.

I dont like to install most apps during an unattended install, so I chose to have a seperate apps install disk because copying over the files and then installing them is a waste of time.

I do still use the temp directory because of the issue I was having with the installsheild apps needing to write to a install.log file.

Unfortunately, I still havent figured out how to automatically delete the temp directory after all the installs are done. Im dont think that you can do this in generate.js since it closes before the apps are installed. :)

#55 User is offline   AirMaleDFW 

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

Posted 21 April 2004 - 05:18 PM

@Twill: You can do it in generate.js because, although it closes, the RunOnceEx entries it writes continues on.

You can add something like this as an ending item before //Launch the RunOnceEx process...

//Cleanup the %systemdrive%\Temp directory
WshShell.regWrite(KeyBase + "\\55\\", "Cleaning Up Temp Files", "REG_SZ");
WshShell.regWrite(KeyBase + "\\55\\1", "cmd.exe /c RD /s /q " + strPath, "REG_SZ");


It will open a cmd window for the file & directory removals but it would work.
(Of course, there would have to be a var strPath declared for "%systemdrive%\Temp" or wherever it is you want to cleanup)

#56 User is offline   TWILL 

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

Posted 21 April 2004 - 05:48 PM

Schweeeet....

Ill give it a try.

I was trying to use this but was getting an error:

Char 3
Object Expected
Code 0

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

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

  DeleteFolder(strPath);

self.close();


any reason this wont work?

TWILL

#57 User is offline   AirMaleDFW 

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

Posted 21 April 2004 - 06:12 PM

@TWILL: Your DeleteFolder method would be something like...

//declare a file system object
var fso = new ActiveXObject("Scripting.FileSystemObject");
//set some var equal to a path
var strPath = WshEnv("SYSTEMDRIVE")+"\\TEMP\\";
//delete the folder
fso.DeleteFolder(strPath);


I don't think you'd want to delete the folder from generate.js though since some of your RunOnceEx programs would need it. It would be better to remove it as an ending RunOnceEx item.

#58 User is offline   TWILL 

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

Posted 21 April 2004 - 07:16 PM

@AirMaleDFW

Your right I'll need it for my RunOnceEx programs. I misread you previous post where you were talking about the ROnOnceEX continuing on. Thanks again for slapping me into shape!


by the way I put this in but I get a Type Mismatch error

//Cleanup the Temp directory
WshShell.regWrite(KeyBase + "\\100\\", "Cleaning Up Temp Files", "REG_SZ");
WshShell.regWrite(KeyBase + "\\100\\1", "cmd.exe /c RD /s /q " + strPath, "REG_DWORD");


I can see that the first WshShell line makes it into the registry RunOnceEX but It doesnt like this line:
//Cleanup the Temp directory
WshShell.regWrite(KeyBase + "\\100\\1", "cmd.exe /c RD /s /q " + strPath, "REG_DWORD");



Did you happen to try this out?

#59 User is offline   AirMaleDFW 

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

Posted 21 April 2004 - 10:14 PM

@TWILL: Sorry... somehow or other I originally posted the cmd.exe cleanup example as REG_DWORD when it's REG_SZ. I've edited the earlier post to correct that. Thanx for pointing it out. :)

#60 User is offline   TWILL 

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

Posted 22 April 2004 - 06:24 PM

@AirMaleDFW No problem!

You saved the day again!!



Also if in case anyone else follows this post....

If you have enough install programs to get the reg line count higher than 95 you may want to number them with leading zeros like this the ones in blue tags (the color doesnot work in code):

//System Updates - Patches
if (document.inner.WPI.chkbox001.checked){
WshShell.regWrite(KeyBase + "\\[COLOR=blue]010[/COLOR]\\", "Installing Microsoft Updates", "REG_SZ");
WshShell.regWrite(KeyBase + "\\[COLOR=blue]010[/COLOR]\\1", CDROM + "\APPS\\XP-Updates\\RQ817778.EXE -q -u -o -n -z", "REG_SZ");
 }

//Install TweakUI
if (document.inner.WPI.chkbox002.checked){
WshShell.regWrite(KeyBase + "\\[COLOR=blue]015[/COLOR]\\", "Installing TweakUI 2.10", "REG_SZ");
WshShell.regWrite(KeyBase + "\\[COLOR=blue]015[/COLOR]\\1", CDROM + "\APPS\\TweakUI\\O_TWEAKU.MSI /QN", "REG_SZ");
 }

//Install CD Image Powertoy
if (document.inner.WPI.chkbox003.checked){
WshShell.regWrite(KeyBase + "\\[COLOR=blue]020[/COLOR]\\", "Installing CD Image ISO Recorder", "REG_SZ");
WshShell.regWrite(KeyBase + "\\[COLOR=blue]020[/COLOR]\\1", CDROM + "\APPS\\ISORecdr\\ISORECORD.MSI /QN", "REG_SZ");
 }

...
...

...

//blah blah....
if (document.inner.WPI.chkbox00x.checked){
WshShell.regWrite(KeyBase + "\\100\\", "Installing blah blah blah", "REG_SZ");
WshShell.regWrite(KeyBase + "\\100\\1", CDROM + "\APPS\\ISORecdr\\ISORECORD.MSI /QN", "REG_SZ");
 }


If you dont your folders in RunOnceEx will look like this

100
15
20
25
...
...

and the last program (program on line 100) will exectue first.

instad of like this

015
020
025
030
...
...
100


I hope this explained this ok, as I dont know the exact terminology for the numbers in the script.


TWILL

Share this topic:


  • 9 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • 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 - 2013 msfn.org
Privacy Policy