Help - Search - Members - Calendar
Full Version: NAV2004 & VS - Unattended
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   
Google Internet Forums Unattended CD/DVD Guide
MtK
Hi,

What should I do in order to install NAV2004 & Visual Studio from an unattended XP-CD?
LiquidSage
VS 6 Enterprise Edition
1) Copy CD1 to a local directory & remove read only attrib's.
(Particularly vs98ent.stf)
3) Run >setup/accost.exe application to map and config components you will have installed.
4) Save the resulting file as \setup\vs98ent.stf
5) Copy your install folder to wherever it will be and run at cmd prompt --> path\smsinst.exe /k XXXXXXXXXX
(XXX-XXXXXXX --> CD Key) (smsinst is at root of VS cd)

You will need to reboot to install MSDN or anything extra since this places reboot keys in registry.

VS .Net uses a sms wrapper. MS has silent install instructions for this. Othwise, the basic msi cmd's should work.
Deploy VS Net silently

Only way i know how to silent install NAV2004 is through a transform file or a direct edit of the NAV msi itself. Get AdminStudio Eval. Edition or the free MaSaI editor to do this.
MtK
Thanks for the VS help...
about the reboot: I'm not installing MSDN, will it have to reboot anyway?

about the NAV2004, I don't want to mess with the files...
LiquidSage
no, i don't think it will auto reboot...but there are reg keys in run once to stop any server or msvs/msdn installs untill reboot. I would recommend making VS your last install if doing a batch file.
MtK
thanks, for now I'm only making a batch file for each & every installation, then i'll decide which will first...
LiquidSage
here.. i knew i had this saved somewhere.....


Microsoft Visual Studio 6.0
This is another fun one.

You might try following the directions in KB article 195828. If you do, you will be disappointed, because smsinst.exe forks and exits immediately, rendering it useless for scripting. The KB article's instructions for using the acost.exe tool to configure which components to install is still accurate, however.

Luckily, by running "strings" on smsinst.exe, we can learn that all it does is run regedit /s key.dat and then fire up acmboot.exe. The key.dat file is just a simple registry patch to trick acmboot.exe into thinking that the GUI portion of Setup has already run. You must provide the /k switch to acmboot.exe to specify your license key (sans hyphens).

Having installed Visual Studio, you probably want to install the latest service pack (SP5 as of this writing). To perform an unattended installation of SP5, run setupsp5.exe /qn1. You may also provide the /g switch to specify a log file.

But oh, if only it were that simple. If you are installing on Windows 2000, you will find that the /qn1 switch does not actually work, because the installer insists on popping up a useless warning that your version of MDAC is out-of-date.(XP should work MtK, but see about putting MDAC2.8 before VS6 setup) The solution to this? Update MDAC to the latest version before trying to install the service pack.

So, the full unattended procedure for installing Visual Studio 6.0 is:

Run regedit /s key.dat
Run start /wait acmsetup.exe /k license-key
Reboot
Update MDAC to the latest version
Run start /wait setupsp5.exe /qn1

a .bat file example....
--------------------VS6.bat---------------------------------------------------
:: Install Visual Studio 6.0 and service pack

:: Trick acmboot.exe into thinking that GUI setup has already run
start /wait regedit /s %Z%\scripts\vs6.reg
if errorlevel 1 exit 1

:: Install latest service pack
todo.pl "%Z%\updates\VS6\setupsp5.exe /qn1 /g c:\netinst\logs\vs6sp5.txt" .reboot

:: NOTE: You must create %Z%\site\vs6_key.bat to set the vs6_key
:: variable to your license key
call %Z%\site\vs6_key.bat
if %vs6_key%.==. goto nokey
todo.pl "%Z%\packages\VS6\acmboot.exe /qn1 /g c:\netinst\logs\vs6.txt /k %vs6_key%" .reboot
if errorlevel 1 exit 1
exit 0

:nokey
@echo *** Unable to get VS6 license key
@echo *** (did you forget to create %Z%\site\vs6_key.bat?)
exit 2
--------------------------------------------------------------------------------------------
darthyoda6
Gee, that example looks mighty familiar. I know, the unattended vs6.bat from the scripts directory.
LiquidSage
it might be, I don't know. I had it saved from a fileforum site. i think the same web page from where i got WIWW.
MtK
Hi,

How "key.dat" should look like?

In which format "license-key" should be written? ("XXX-XXXXXXX" OR "XXXXXXXXXX")

Where %vs6_key% is set, & to what it is set?

Does ".reboot" works?
darthyoda6
I asked the maker of the file the same question, and he replied:

Put this is vs6_key.bat:

set vs6_key=1231234567


(That is, set the vs6_key variable to be your serial number without
hyphens.)


The .reboot & .todo.pl is part of the structure from Unattended at http://unattended.sourceforge.net It uses perl to create a todo.txt put you have to call todo.pl in reverse order. If you're not using unattended, you have to put the lines from the with the .todo.pl in the example in the opposite order, and you can't use the .reboot.
MtK
Well, I rather use batch commands...

thanks...
LiquidSage
adding to darthyoda,
VS6 Silent via SMS
darthyoda6
Thanks for the information, LiquidSage. The quotes I use cam from the installers.html file documentation from unattended, which you can use to pre-install Xp or 2000.

QUOTE
You might try following the directions in KB article 195828. If you do, you will be disappointed, because smsinst.exe forks and exits immediately, rendering it useless for scripting. The KB article's instructions for using the acost.exe tool to configure which components to install is still accurate, however.

Luckily, by running "strings" on smsinst.exe, we can learn that all it does is run regedit /s key.dat and then fire up acmboot.exe. The key.dat file is just a simple registry patch to trick acmboot.exe into thinking that the GUI portion of Setup has already run. You must provide the /k switch to acmboot.exe to specify your license key (sans hyphens).

Having installed Visual Studio, you probably want to install the latest service pack (SP5 as of this writing). To perform an unattended installation of SP5, run setupsp5.exe /qn1. You may also provide the /g switch to specify a log file.

But oh, if only it were that simple. If you are installing on Windows 2000, you will find that the /qn1 switch does not actually work, because the installer insists on popping up a useless warning that your version of MDAC is out-of-date. The solution to this? Update MDAC to the latest version before trying to install the service pack.

So, the full unattended procedure for installing Visual C++ 6.0 is:

Run regedit /s key.dat
Run start /wait acmsetup.exe /k license-key
Reboot
Update MDAC to the latest version
Run start /wait setupsp5.exe /qn1
So I guess that means that you can use acost.exe to modify the .stf file which cofigures the default options, then run the "start /wait acmsetup.exe /k license-key". The only problem is that you have to copy the cd to your hard drive on the server first, since the file is readonly. The problem is you can't use the smsinst since it runs then exists right away.

And for MSDN you also can pre-install the files, but it agains means copying all the cds to the hard drive first. Again, I think you can modify the msdn stf file to configure the defualt options, but since I haven't tried this yet, I'm not sure.

QUOTE
NOTE: The following applies to the April 2002 and October 2002 editions of the MSDN Library. I make no promises about other editions, although I would be happy to hear about your experiences with them.
The good news is that the MSDN Library comes with an MSI package. The bad news is that when you try to install it with msiexec, a little dialog box appears telling you to run the provided setup.exe instead.

Naturally, this setup.exe responds to /? with "Incorrect command line parameters", so you have to guess what it wants. It turns out that it will take any arguments you give and pass them on to msiexec. So we can just run setup.exe /qb and be done with it, right? Wrong. Before running msiexec, setup.exe forks itself into the background, so start /wait returns immediately instead of waiting.

But we do not give up so easily.

If you run setup.exe with the /l*v logfile option, you can learn quite a bit about what it is doing. In particular, you can discover that setup.exe simply passes a SETUP_EXE=yes property to the underlying msiexec process.

In other words, all you have to do is run msiexec /qb /i msdn.msi SETUP_EXE=yes, and the installation proceeds without a hitch.

You may be wondering: If setting one useless property is all setup.exe does, why does Microsoft want you to use it? The answer is that the MSDN Library requires IE6, and setup.exe will install it for you if necessary. So, you should make sure you have IE6 installed before you attempt this procedure, because I have no idea what will happen otherwise.

Incidentally, this will perform a "Default" installation of MSDN Library, which means that most of the files will not be installed locally but rather loaded from the source directory as required. So choose the path to that msdn.msi package carefully, because that is the path MSDN will search whenever it needs something. (Hint: If you would rather perform a "Full" installation so that all files are copied to the local machine, add INSTALLATION_TYPE=Full to the command line.)
darthyoda6
CODE
@echo off
rem Install Visual Studio 6.0

rem Trick acmboot.exe into thinking that GUI setup has already run
start /wait regedit /s \vs6.reg

start /wait \VS6\acmboot.exe /qn1  /k 123456789

rem reboot the computer taken from the MSFN xp unattend
shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute"


vs.reg
CODE
REGEDIT4

; Trick acmboot.exe into tinking that GUI setup has already run
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Visual Studio 98\SetupWizard]
"aspo"=dword:38395356

; Install everything under C:\VS6, because developers hate to type
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Studio]
"ProductDir"="C:\\VS6"


Hope this helps. Again, I took the info from unattended and tried to put it in batch format.
MtK
@darthyoda6,

Does it work, have you checked that out?
darthyoda6
Unfortuneatly, I haven't been able to redo my computer yet, so I haven't tried it out yet, but the bat file is from several reliable sources.
MtK
@darthyoda6,

Is the "\\" a mistake?
QUOTE
; Install everything under C:\VS6, because developers hate to type
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Studio]"ProductDir"="C:\\VS6"


How can I tell VS to install only pre-specified Components?
darthyoda6
The \\ isn't a mistake, because in .reg files \\ equals one \, but as a text file you have to have two because one \ means something else, but I'm not sure which.

For the which options to pre-install, I think if you use the acost.exe from the last post of LiquidSage and edit the .stf file with it, I think that would work, but I don't know for sure yet.
darthyoda6
I finally got around to redoing my computer, and I tried for the pre-installing. By using LiquadSage's post about using the acost.exe to define what items to pre-install, and using the instructions for unattened. It worked fine. The onlything that had to get changed was the header for the reg file. So:

vs6.bat
CODE
@echo off
rem Install Visual Studio 6.0

rem Trick acmboot.exe into thinking that GUI setup has already run
start /wait regedit /s \vs6.reg

start /wait \VS6\acmboot.exe /qn1  /k 123456789


vs6.reg
CODE
Windows Registry Editor Version 5.00

; Trick acmboot.exe into tinking that GUI setup has already run
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Visual Studio 98\SetupWizard]
"aspo"=dword:38395356

; Install everything under C:\VS6, because developers hate to type
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Studio]
"ProductDir"="C:\\VS6"


Incedently, this works for Visual Basic 6 as well, all you have to do is switch Visual Basic 6 for Visual Studio 6. in
CODE
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic\SetupWizard]
"aspo"=dword:38395356

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic]
"ProductDir"="C:\\VB6"
LiquidSage
good to hear all went well laugh.gif

VS has been a hot topic lately. It's nice to hear other people's outcomes.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.