NAV2004 & VS - Unattended
#1
Posted 01 February 2004 - 10:16 AM
What should I do in order to install NAV2004 & Visual Studio from an unattended XP-CD?
#2
Posted 01 February 2004 - 12:33 PM
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.
#3
Posted 01 February 2004 - 01:08 PM
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...
#4
Posted 01 February 2004 - 01:49 PM
#5
Posted 01 February 2004 - 02:06 PM
#6
Posted 01 February 2004 - 04:04 PM
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
--------------------------------------------------------------------------------------------
#7
Posted 01 February 2004 - 11:31 PM
#8
Posted 02 February 2004 - 12:08 AM
#9
Posted 02 February 2004 - 03:37 AM
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?
#10
Posted 02 February 2004 - 10:26 AM
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.
#13
Posted 02 February 2004 - 11:45 PM
Quote
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
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
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.)
#14
Posted 03 February 2004 - 12:01 AM
@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
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.
#15
Posted 03 February 2004 - 01:10 AM
Does it work, have you checked that out?
#16
Posted 03 February 2004 - 06:12 PM
#17
Posted 04 February 2004 - 11:19 AM
Is the "\\" a mistake?
Quote
[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?
#18
Posted 04 February 2004 - 10:35 PM
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.
#19
Posted 20 February 2004 - 10:28 PM
vs6.bat
@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
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
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"
#20
Posted 21 February 2004 - 01:04 AM
VS has been a hot topic lately. It's nice to hear other people's outcomes.



Help

Back to top








