TWILL Posted May 21, 2004 Share Posted May 21, 2004 Please bare with me as this is hard to explain, so it may be a little confusing.Im have been using the windows post install wizard found here: http://www.msfn.org/board/index.php?showtopic=11491&st=30 to install some apps.I recently used BuckeyeXPs office shrink to shrink down office here: http://www.msfn.org/board/index.php?showtopic=16709I then RAR'd the office files to a sfx file, to shrink it more.I was able to install office correctly if I installed it manually from the cmd window, but when I try to install unattended office2003 with the post install wizard which uses runeonceex it never finishes the install before it goes to the next ronceonceex command, which happens to be a clean up command so it deletes all the office install files before office install is complete.Here is a snip of the code// note: strpath is the temp directory//Install Microsoft Officeif (document.inner.WPI.chkbox023.checked){var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");WshShell.regWrite(KeyBase + "\\125\\", "Installing Microsoft Office", "REG_SZ");WshShell.regWrite(KeyBase + "\\125\\1", CDROM + "\\install\\Office2003\\Office2003.exe", "REG_SZ");WshShell.regWrite(KeyBase + "\\125\\2", strPath + "\setup.exe TRANSFORMS=Unattended.MST /qb-", "REG_SZ"); } //Cleanup the Temp directoryWshShell.regWrite(KeyBase + "\\150\\", "Cleaning Up Temp Files", "REG_SZ");WshShell.regWrite(KeyBase + "\\150\\1", "cmd.exe /c RD /s /q " + strPath, "REG_SZ");I do know it does unzip the files to the temp directory but it moves to the cleanup process and deletes the files before it installs. I initally had the sfx run the install command but it also never completed, which is why I added the install command seperately as shown in the code above.I thought all processes had to complete before it moved to the next process.... Does anyone know why its moving to the next one before the current one is completed?thanksTWILL Link to comment Share on other sites More sharing options...
[BM]Crusher Posted May 21, 2004 Share Posted May 21, 2004 no replies must be the confusing java script giving everyone the willies...try asking whimsy (WPI creator) Link to comment Share on other sites More sharing options...
sleepnmojo Posted May 21, 2004 Share Posted May 21, 2004 Where does it extract the files? Not sure it runs the installer, but I would assume you would extract it to a directory, which would be strPath. Since I don't see where that is declared, I would assume something like c:\install. Check your not extracting to c:\install\office2003\, because then your setup wouldn't work. If it isn't working, then it would skip that command, and go on to the next one, which is why cleanup is going. Link to comment Share on other sites More sharing options...
TWILL Posted May 21, 2004 Author Share Posted May 21, 2004 Thanks for the replies@[bM]Crusher -- yes it looks a little bad but actually its not much different than the other way everone is writing to the runonceex. Special thanks to Whimsy and AirMaleDFW for helping me with understanding the code, I definitely wouldnt have figured it out all by myself.Here is a comparison if anyone is interested, they both write to the runonceex:the unattended install wayREG ADD %KEY%\001 /VE /D "Preparing Installation..." /fREG ADD %KEY%\001 /V 1 /D "%systemdrive%\apps\prepare.cmd" /fvar CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");WshShell.regWrite(KeyBase + "\\001\\", "Preparing Installation...", "REG_SZ");WshShell.regWrite(KeyBase + "\\001\\1", CDROM + "\\apps\\prepare.cmd", "REG_SZ"); //prepare cmd is being run from CD instead of systemdrive@sleepnmojoYes the directory it expands to is strPath = c:\temp. Once it unzips, it does begin to install but during the install it goes to the cleanup which deletes strPath or c:\temp.I can get it to work if I dont zip the files and just install from the regular files. So it must be somthing to do with unzipping that runonceex doesnt like. thanks again for the replies!! TWILL Link to comment Share on other sites More sharing options...
Alanoll Posted May 21, 2004 Share Posted May 21, 2004 could it be that the archive is deleting the files after it extracts them? I know some of em have that option, maybe an accident? Link to comment Share on other sites More sharing options...
TWILL Posted May 22, 2004 Author Share Posted May 22, 2004 @Alanoll - I checked for that and the archive is not deleting the files. Good thought though.I did however, find a fix, I had to add another line to the runonceex from this://Install Microsoft Officeif (document.inner.WPI.chkbox023.checked){var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");WshShell.regWrite(KeyBase + "\\125\\", "Installing Microsoft Office", "REG_SZ");WshShell.regWrite(KeyBase + "\\125\\1", CDROM + "\\install\\Office2003\\Office2003.exe", "REG_SZ");WshShell.regWrite(KeyBase + "\\125\\2", strPath + "\setup.exe TRANSFORMS=Unattended.MST /qb-", "REG_SZ"); }to this://Install Microsoft Officeif (document.inner.WPI.chkbox023.checked){var CDROM = WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup\\SourcePath");WshShell.regWrite(KeyBase + "\\125\\", "Installing Microsoft Office", "REG_SZ");WshShell.regWrite(KeyBase + "\\125\\1", CDROM + "\\install\\Office2003\\Office2003.exe", "REG_SZ");WshShell.regWrite(KeyBase + "\\130\\1", strPath + "\setup.exe TRANSFORMS=Unattended.MST /qb-", "REG_SZ"); }So it now works! Go figure!thanks for the input!TWILL Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now