How to install .NET Framework 2.0 from svcpack.inf

Questions or comments on the switchless installers? Want to create a new one? Talk about it here.
Post Reply
User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

How to install .NET Framework 2.0 from svcpack.inf

Post by RyanVM » Thu May 18, 2006 2:19 pm

Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
Zacam
Moderator
Posts: 615
Joined: Tue Sep 13, 2005 7:46 pm
Location: Portland, OR

Post by Zacam » Fri May 19, 2006 5:17 am

Holy sweet sh**! It's as simple as that......reg key's in the svcpack.inf.

oh man, I'm going to have fun figuring out what else windows can be made to do during setup......

User avatar
MEULC
Posts: 407
Joined: Tue Mar 08, 2005 8:58 am

Post by MEULC » Fri May 19, 2006 7:30 am

Nice... I've been looking for a workaround

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Sat May 20, 2006 5:54 pm

Oman. That's some simple shit.

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sat May 20, 2006 10:07 pm

Something else to try and work on some day. This is slightly off topic but I've been meaning to ask this for a while. Does anybody know what advantages and/or disadvantages there are, if any, to installing both V1.1 and V2.0 of the .NET Framework? If there truly do not seem to be any advantages to having 1.1 installed, it could save time during install and valuble space in the event of making a CD based source.

User avatar
Kelsenellenelvian
Moderator
Posts: 4383
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Post by Kelsenellenelvian » Sat May 20, 2006 11:01 pm

I havent had 1.1 installed since 2.0 came out and I have never looked back. No complaining from .net dependant addons either.

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sat May 20, 2006 11:09 pm

I suppose what I'm really nervous about is some screwball program that absolutely demands the V1.1 be installed, or conversely, having V1.1 installed somehow create problems for a V2.0 dependant program.

User avatar
owikh84
Posts: 151
Joined: Sat Feb 04, 2006 11:13 am
Location: Tokyo, Japan

Re: How to install .NET Framework 2.0 from svcpack.inf

Post by owikh84 » Sun May 21, 2006 9:55 am

may be somebody will make this one

User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

Post by Siginet » Sun May 21, 2006 12:47 pm

Well... I looks like we need to make a new switchess addonpack for .net 2.0. :D
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software

rf12
Posts: 10
Joined: Sun Jan 29, 2006 9:40 pm

Post by rf12 » Sun May 21, 2006 5:11 pm

For some reason, the tweaks are not applied when it is called from svcpack. When I called a batch file from svcpack that contained those tweaks, it worked. Is there an environmental variable that is required so that the tweaks can be directly applied from svcpack?

By the way, I made a combination pack (.NET 1.1 SP1 and .NET 2.0) both installing from svcpack (with the tweaks in a batch file), if anybody's interested...

rf12

User avatar
owikh84
Posts: 151
Joined: Sat Feb 04, 2006 11:13 am
Location: Tokyo, Japan

Post by owikh84 » Sun May 21, 2006 8:20 pm

ok show us what you've made ff12
Image

rf12
Posts: 10
Joined: Sun Jan 29, 2006 9:40 pm

Post by rf12 » Sun May 21, 2006 9:34 pm

Edit:

Link for the download has been moved to the release thread: viewtopic.php?t=2270

If anyone finds out how the tweaks can be applied directly from svcpack, I'd be glad to update the addon.

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Mon May 22, 2006 5:40 pm

I've got a good idea for how to do everything needed within one EXE. I'm going to play with it over the weekend and see what results ;) :)
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
Aserone
Posts: 306
Joined: Sat Mar 11, 2006 8:46 pm
Location: Opioid dependent head.

Post by Aserone » Tue May 23, 2006 2:59 pm

RyanVM wrote:I've got a good idea for how to do everything needed within one EXE. I'm going to play with it over the weekend and see what results ;) :)
I already made one. ;)

There are many ways to do it with just one EXE, this is just the first method to pop into my head...

[Release] Microsoft .NET 2.0 Single EXE from SVCPACK by Aserone

Have fun!
//Aserone-Foxy | EULA: Everything I say/post is a lie and/or forwarded from swim.

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Sun May 28, 2006 8:00 pm

Hmm, I was thinking about this today. One HUGE problem I see with making a switchless installer like this is that it'll mean leaving HKLM\SYSTEM\Setup - SystemSetupInProgress=1 once it's done. That's fine during svcpack.inf, but I'm worried about what implications that'll have if someone installs it from a later stage of setup.
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sun May 28, 2006 8:10 pm

You could probably just slip in a .cmd file that does all of the .msi launching and then reset the registry as needed once it's finished. This is a setup I use in my Cisco VPN Client silent installer. The .cmd file launches the setup, and then after the setup is complete sets the read only attribute for any and all profiles that it locates for the client.

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Sun May 28, 2006 8:24 pm

A CMD file is being used by Aserone, but the problem is that the necessary value of that key depends on when it's being run.

EDIT: BTW, Aserone, you can shave a little more space off the size of the EXE by using 7zip 4.42 w/ Ultra compression. I'm getting a 15.8MB archive instead of 16.0MB.
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sun May 28, 2006 10:05 pm

I haven't looked into making an installer for this yet, so I'm not completely understanding of what all is going on or what's needed. But what I'm picturing in my mind is this:

1 - regedit /s reg setting needed to install

2 - start /wait msiexec /i blah blah

3 - regedit /s return reg to normal

Maybe this is where I'm not getting it. If I'm completely wrong here, just ignore me lol

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Sun May 28, 2006 10:17 pm

Read the top link ;)

Part of tricking it installing during XP setup is writing a registry entry before starting telling the installer it's not Windows Setup, then setting that value back afterwards. That's fine during Windows setup, but telling Windows it's in setup afterwards might be a problem ;)
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Sun May 28, 2006 10:32 pm

I had a hard time wrapping my brain around that post the first time I read it. The second time wasn't a whole lot better :P One thing I did get is that if XP SP3 ever becomes a reality, this should be easier at that time. I think I'll leave this one to someone better qualified than me.

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Sun May 28, 2006 11:46 pm

You could try IF/THEN/GOTO statements in you CMDs using REG QUERY as your trigger to check the value of that regkey. I'm too lazy to give an example at the moment, but it's definitely doable. :D

Try "REG QUERY /?" at a command prompt to see what I'm talking about.

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Mon May 29, 2006 1:01 am

I understand exactly what you mean. I'm debating if it's worth the trouble, though :P
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
Aserone
Posts: 306
Joined: Sat Mar 11, 2006 8:46 pm
Location: Opioid dependent head.

Post by Aserone » Mon May 29, 2006 1:24 am

RyanVM wrote:EDIT: BTW, Aserone, you can shave a little more space off the size of the EXE by using 7zip 4.42 w/ Ultra compression. I'm getting a 15.8MB archive instead of 16.0MB.
It's actually Ultra and 4.42, but ultra can't be sat higher then the appropriate amount of ram avalible on the particular comp (1024 in this case).. It's 64/128 if I remember correctly (d of >96 requires over 1024Mb).

Unnecessary to use commandline when I just need to switch comp.. Will recompress them and upload later. ;)
//Aserone-Foxy | EULA: Everything I say/post is a lie and/or forwarded from swim.

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Mon May 29, 2006 1:26 am

I did 64/64 for my compression settings (I've also got 2GB RAM)
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
Aserone
Posts: 306
Joined: Sat Mar 11, 2006 8:46 pm
Location: Opioid dependent head.

Post by Aserone » Mon May 29, 2006 1:27 am

RyanVM wrote:I did 64/64 for my compression settings (I've also got 2GB RAM)
Well that's interesting, but I got better ratio I think with 64/128 or if it were 64/96 don't remember..

Edit: will tryout 64/64 again also.. :shock: Mines 16.0 Mb strange.. Maybe I f***** up with "encrypt filenames" wich I usually use..
//Aserone-Foxy | EULA: Everything I say/post is a lie and/or forwarded from swim.

User avatar
Aserone
Posts: 306
Joined: Sat Mar 11, 2006 8:46 pm
Location: Opioid dependent head.

Post by Aserone » Mon May 29, 2006 4:17 am

You updated your 2.0 installer now and I thought it were svcpack compatible and you just forgot to change the description, this still says.
RyanVM wrote:Self-extracting switchless installer. This installer cannot be run from svcpack.inf and requires Windows Installer 3.1 to be installed prior to it.
Trying to figure out how you did it quickly faded away (seemed impossible) nothing added/changed at all. ;)

Same RunProgram:
"msistub netfx2.msi ADDEPLOY=1 REBOOT=Suppress /qb-!"
Files all the same: netfx.msi - same as last one.


About ADDEPLOY..
Used your netfx.msi Roguespear (hope its ok), you've removed the whole condition right?..

Info: How to deploy the .NET Framework 2.0 by using the MSI directly by Aaron Stebner


Some questions for you Ryan, have you added anything to the sfx module, config I can't see or is it just a repack (looks like it to me :?)?

SFX module size ~82kb, what sfx version are you using (4.14)? You've effectively reshacked it away I guess. ;) Any disadvantages to this or just less options?

RyanVM wrote:Hmm, I was thinking about this today. One HUGE problem I see with making a switchless installer like this is that it'll mean leaving HKLM\SYSTEM\Setup - SystemSetupInProgress=1 once it's done. That's fine during svcpack.inf, but I'm worried about what implications that'll have if someone installs it from a later stage of setup.
As to the whole "SystemSetupInProgress". That might be serious and I understand why you wouldn't want to release a version before it can be checked/fixed, so that it doesn't set it to 1 while installing after setup!

Will post a warning in my release thread for now, and a restore reg for people that might have installed after setup. Hope I get time to have some sort of "fixed" exe up later today..
//Aserone-Foxy | EULA: Everything I say/post is a lie and/or forwarded from swim.

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Mon May 29, 2006 9:39 am

ADDEPLOY is necessary to be able to install it directly from the MSI.
I use a custom SFX module that I compiled from the source myself.

What's uploaded currently is just a repack with a higher compression ratio. Subscribe to my newsletter and you'll know that in the future ;)
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
Aserone
Posts: 306
Joined: Sat Mar 11, 2006 8:46 pm
Location: Opioid dependent head.

Post by Aserone » Mon May 29, 2006 10:57 am

RyanVM wrote:ADDEPLOY is necessary to be able to install it directly from the MSI.
Yeah that I know, but I use Rogues netfx2.msi file which is already modified to takeaway that condition so it's not nessicary to set. That were more a question to him if it's ok for me to use it..
RyanVM wrote:I use a custom SFX module that I compiled from the source myself.

What's uploaded currently is just a repack with a higher compression ratio. Subscribe to my newsletter and you'll know that in the future ;)
Cool, had no idea you had one. Will do. :lol:
//Aserone-Foxy | EULA: Everything I say/post is a lie and/or forwarded from swim.

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Mon May 29, 2006 10:59 am

You can use whatever of mine you like...

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Mon May 29, 2006 12:04 pm

lol RogueSpear, taking the easy way and just removing the condition altogether, eh? :P :lol:
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Mon May 29, 2006 12:39 pm

So what's the CMD that people are discussing?

You guys want a CMD that will check the value of HKLM\SYSTEM\Setup\SystemSetupInProgress before .NET Framework 2.0 is actually installed?

So...
1. check SystemSetupInProgress
2. store value in a variable.
3. If it's set to 1, then delete the key: HKLM\Software\Microsoft\PCHealth\ErrorReporting\DW
4. If it's set to 1, then change it to 0
5. install .NET Framework 2
6. If (1) was set to 1 prior to installing, then restore its value back to 1.


If that's correct, then I could whip this up rather quickly. *shrug*

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Mon May 29, 2006 12:41 pm

I was going to create that CMD until I realized that I may have to parse the output of REG QUERY to get a usable value. I'd say go for it if you have the inclination. :)

User avatar
RogueSpear
Posts: 1155
Joined: Tue Nov 23, 2004 9:50 pm
Location: Buffalo, NY

Post by RogueSpear » Mon May 29, 2006 12:46 pm

RyanVM wrote:lol RogueSpear, taking the easy way and just removing the condition altogether, eh? :P :lol:
Man I got so much on my plate right now.. holy crap :lol: otherwise I might be up to it.

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Mon May 29, 2006 1:42 pm

5eraph wrote:I was going to create that CMD until I realized that I may have to parse the output of REG QUERY to get a usable value. I'd say go for it if you have the inclination. :)
Well, that's simple enough. I just wanted to make sure that's what was needed.

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Mon May 29, 2006 2:01 pm

I haven't tested it, but this should work...

Code: Select all

@echo off
SETLOCAL ENABLEEXTENSIONS
FOR /F "tokens=2* delims=	 " %%A IN ('reg query "HKLM\SYSTEM\Setup" /v SystemSetupInProgress') DO SET SSIP=%%B
IF /I '%SSIP%'=='0x0' SET SSIP=0
IF /I '%SSIP%'=='0x1' ( 
	SET SSIP=1
) ELSE ( 
	SET SSIP=1
)
IF /I '%SSIP%'=='1' (
	reg delete HKLM\Software\Microsoft\PCHealth\ErrorReporting\DW /f
	reg add HKLM\SYSTEM\Setup /v SystemSetupInProgress /t REG_DWORD /d 0 /f
)
hidec.exe /w msiexec /i netfx2.msi /qn
reg add HKLM\SYSTEM\Setup /v SystemSetupInProgress /t REG_DWORD /d %SSIP% /f
Last edited by dumpydooby on Mon May 29, 2006 9:45 pm, edited 1 time in total.

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Mon May 29, 2006 2:36 pm

That's better than this script kitten could have written. ;)

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Mon May 29, 2006 2:49 pm

I'll test it out on my VM tomorrow if nobody else does before then. I'm pretty sure it will work, though.

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Mon May 29, 2006 9:51 pm

Oops. I just looked at that code again. I had used the variable interchangeably in all caps or all lowercase. Variables in batch files are case sensitive. So if someone used the code I had before, replace it with my modified code above.

Also, quick question, does this particular installer of .NET Framework 2 only work with Windows XP? If so, are there any precautions taken in the MSI to prevent it from being installed on something other than Windows XP? If not, I can add in something to that effect in my script.



PS-
SETLOCAL ENABLEEXTENSIONS allows for caps-to-lowercase comparisons using the IF /I command. However, I doubt it makes variables, in and of themselves, case insensitive. Perhaps my old code would have worked, but it's generally unorthodox.

User avatar
Aserone
Posts: 306
Joined: Sat Mar 11, 2006 8:46 pm
Location: Opioid dependent head.

Post by Aserone » Tue May 30, 2006 3:56 am

Thanks dumpydooby!

Will most certainly test/use your batch script. But I think its more for Ryan as his installers is installed after setup quite frequently I guess.

Simple = better? Well I don't know, either i'll just have a warning, a little toned down from now but still. I mean the reason for the whole pack is actually to be able to install from svcpack! Can't see no reason using it for something else.

That aside, I see no harm in using your work if it's ok with you?

When I get back i'll look into it.
//Aserone-Foxy | EULA: Everything I say/post is a lie and/or forwarded from swim.

User avatar
dumpydooby
Posts: 530
Joined: Sun Jan 15, 2006 6:09 am

Post by dumpydooby » Tue May 30, 2006 1:43 pm

Of course it's okay with me. That's why I posted it. :)

Camarade_Tux
Posts: 1
Joined: Mon Jun 05, 2006 8:57 am

Post by Camarade_Tux » Mon Jun 05, 2006 9:02 am

RyanVM wrote:Hmm, I was thinking about this today. One HUGE problem I see with making a switchless installer like this is that it'll mean leaving HKLM\SYSTEM\Setup - SystemSetupInProgress=1 once it's done. That's fine during svcpack.inf, but I'm worried about what implications that'll have if someone installs it from a later stage of setup.
Then you will restart your computer and Windows will display a message box with only an OK button telling you setup is in progress and you will have to find a WinUBCD in order to use your computer again.

Anyway, this gave me the occasion to report WinUBCD 3 RC7 not working with Windows 2003 Server SP1. :P

GreenMachine
Posts: 4
Joined: Sat Jun 17, 2006 5:25 am

Post by GreenMachine » Sat Jun 17, 2006 6:21 am

Now I remember seeing that first post from Aaron at Microsoft, where he has half of the solution. I thought then that it would be only a matter of time until he figured it out, and lo and behold! Also mentioned there was a workaround to install Office 2003 from SVCPACK.INF, which I have not yet tried.

In any event ... I incorporated Aaron's ideas in XPCREATE 2006, opting for the IEXPRESS route (surprise surprise ... ). While I did not create an "AddOn", XPCREATE does generate the installer rfom the original Microsoft files. I simply unpack all the .NET 2 files, create the following .CMD script:

Code: Select all

@ECHO OFF
SET REGFILE=%TEMP%\REGFILE.REG
ECHO REGEDIT4 > %REGFILE%
ECHO [HKEY_LOCAL_MACHINE\SYSTEM\Setup] >> %REGFILE%
ECHO "SystemSetupInProgress"=dword:00000000 >> %REGFILE%
ECHO [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting\DW] >> %REGFILE%
REGEDIT /S %REGFILE%
START ".NET Installation" /WAIT INSTALL.EXE /Q
ECHO REGEDIT4 > %REGFILE%
ECHO [HKEY_LOCAL_MACHINE\SYSTEM\Setup] >> %REGFILE%
ECHO "SystemSetupInProgress"=dword:00000001 >> %REGFILE%
REGEDIT /S %REGFILE%
DEL %REGFILE%
I then pack it all together, calling the .CMD script for installation. I use REGEDIT insead of REG for Windows 2000 compatability. I create the .REG files on the fly, to insure that I have the correct location when calling with REGEDIT. This seems to work fine on Windows 2003 Server, Windows XP and Windows 2000, with the exception of one error reported in Windows 2000 setuperr.log:

Code: Select all

Error:
Setup failed to install the .NET Framework Migration Package package (version 2.0) on your system. Software which depends on this package may not function properly.  Contact your system administrator.
Which brings me to the point of this long winded first post ... Has anyone seen this? Does anyone know of any products this effects?

Greetings Ryan! Gotta love that Green on black!

User avatar
RyanVM
Site Admin
Posts: 5187
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Post by RyanVM » Sat Jun 17, 2006 10:59 am

Nice to see you around, don't be a stranger!
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357

Post Reply