• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
JFX

WinNTSetup v3.8.6 / 3.8.7 Beta 3

1,525 posts in this topic

Is there a readable version of the regtweaks and how they are applied by V2?

tweaks.au3

IF you want RunOnceEx method similar to http://unattended.msfn.org/unattended.xp/view/web/31/ then try following:

After Winntsetup finished create a folder on the installtion drive called install

Add your software to that folder.

create a cmd file inside this folder, like the following and run it.

@echo off

Reg Load HKLM\OFFLINE_SOFTWARE %~d0\Windows\system32\config\software
SET KEY=HKLM\OFFLINE_SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /F /D "Installing Applications"

REG ADD %KEY%\005 /VE /F /D "Java Runtime 6"
REG ADD %KEY%\005 /V 1 /F /D "%systemdrive%\install\jre-6u24-windows-i586-s.exe /s /qb /norestart"

REG ADD %KEY%\010 /VE /F /D ".NetFX 4.0"
REG ADD %KEY%\010 /V 1 /F /D "%systemdrive%\install\dotNetFx40_Full_x86_x64.exe /norestart /passive"

REG ADD %KEY%\015 /VE /F /D "AutoIt v3"
REG ADD %KEY%\015 /V 1 /F /D "%systemdrive%\install\Autoit3\autoit-v3-setup.exe /s"
REG ADD %KEY%\015 /V 2 /F /D "%systemdrive%\install\Autoit3\SciTE4AutoIt3.exe /s"

reg unload HKLM\OFFLINE_SOFTWARE

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

Thank you very much JFX for posting the reg file and the sample RunOnceEx tip. I am currently doing something similar using a SetupComplete.cmd that I copy to \Windows\Setup\Scripts\. This gets run immediately after Windows Setup completes before the Logon screen appears. Now, all I need to do is to figure out how to convert my winnt.sif to something I can use for Win7 to make the install less interactive. Thanks again ...

0

Share this post


Link to post
Share on other sites

I ran a test installing Win7 with SP1 integrated and applied the majority of tweaks supplied by V2.

The following tweaks did not seem to work for me:

Show Take Ownership to context menu -> do not see this on any of the context menus

Show Cmd.exe Icon on context menu -> only shows with shift Right-Click

Disable Language Bar -> Still appears on taskbar (did not see this tweak in tweaks.au3 file)

Disable System Restore -> Still enabled for drive C: (DisableSR entry not present in registry. Tried adding this entry and made no difference)

I did not apply the following tweaks:

Show all tray icons

XP-like taskbar icons

Disable Aero Transparency

Disable Automatic Restart on WU

Force XP Partition Mode for new partitions

Disable Pagefile

The rest looks good. One tweak in the tweaks.au3 (NoSecurityWarning4DownloadedFiles) is not selectable in the GUI for Win7

Thanks...

0

Share this post


Link to post
Share on other sites

You use an old version, these 4 tweaks were changed with version 2.0.3.37.

the DisableSR doesn't not completely disable system restore, but at least it set the reserved space to 0%, what should have the same effect.

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

Is there any plan to add support for boot drives that are FAT16? I tried to install Win2k onto a NTFS, but my boot drive is a DOS disk, which is a fat16 partition?

The program looks quite good elsewise.

0

Share this post


Link to post
Share on other sites

Hi Wendy :)

FAT16 will be selectable for boot drive in next version.

cheers.gif

0

Share this post


Link to post
Share on other sites

OK, something is wrong... i've this modded W7 OS (Tiny7, which you can search at the usual place) and your app failed to install that OS (but OS installs fine from CD boot) :unsure:

Edited by lama
0

Share this post


Link to post
Share on other sites

OK, something is wrong... i've this modded W7 OS (Tiny7, which you can search at the usual place) and your app failed to install that OS (but OS installs fine from CD boot) :unsure:

hmm, what could be wrong here? :whistle:

However, I will not add support for any Warez release. Use a clean, preferable unmodded Windows version. ;)

cheers.gif

0

Share this post


Link to post
Share on other sites

I am trying to use WinNTSetup V2 to setup Win7 on a VMware virtual disk. I had a bootable Win7 already installed on that vmdk which booted fine. When I mounted that vmdk and formatted it and then ran WinNTSetup and selected that drive as the boot drive + installation drive, all three boot flags were red. Bootsect threw an error after the WinNTSetup was finished with the install.wim and the setup would not boot in the VM. I am doing all this from an XP machine and don't have any problems when using a native disk.

I can prep XP on a VMware virtual disk and it boots fine, but not Win 7. If I select the left tab with the W7 vmdk as the target, I see a green NTLDR PBR If I use the right tab, the BOOTMGR PBR is red. Any ideas?

Thanks

Edited by click-click
0

Share this post


Link to post
Share on other sites

I could reproduce your problem.

After formating the drive under Windows XP, the Partition will have a NTLDR loading PBR.

The MBR of the mounted disk is not visible to the Host OS. So MBR and Boot Flag will be red.

Main problem is that tools like bootsect or bootice can not change the PBR of a VMware mounted partition.

I'm not sure how i solve this in future versions, but you can try following:

After Winntsetup has finished make a copy of bootmgr in the selected bootdrive and rename it to NTLDR.

cheers.gif

0

Share this post


Link to post
Share on other sites

Okay, I formatted a newly created vmdk with a Win 7 VM and mounted that for WinNTSetup and now I see a green check mark for the BOOTMGR PBR. I will try your suggestion (formatted in XP) later. Did I understand you correctly that I should select "Do Not update the boot configuration" whenever using a mounted virtual disk?

Edited by click-click
0

Share this post


Link to post
Share on other sites

Yes use "Do Not update the boot configuration", but this will only avoid the error message.

I have found a way to detect a mounted Vmware partition, so next version should not show this error.

And hopefully make it boot able somehow.

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

I ran WinNTSetup using the virtual disk that I formatted from a Win 7 VM. I still got a WinNTSetup bootsect error message even after selecting "Do Not update the boot Configuration". Now when I try to boot, I get Operating System not found. I'm still not there yet.

0

Share this post


Link to post
Share on other sites

I'm sorry, but i can not add support for vmware mounted disk. :(

Even after updating the PBR and create a correct BCD store, bootmgr will at least try to boot the OS, but fail in a black screen.

There is a good reason why the checkbox for read-only mounting is always set, the driver corrupts data. :ph34r:

VMware is very immune against bug reports, so i don't think this will be fixed anytime.

There maybe is a solution, the vmlite guy's have written their own driver which can mount vdi/vhd and vmdk images.

It's in the current version of VBoot

works very good so far:

vbootctl.exe mount "VMware.vmdk"
vbootctl.exe umount Z:

cheers.gif

Edited by JFX
0

Share this post


Link to post
Share on other sites

Update: Version 2.0.4.41

- automatic decompression of ntldr/setupldr/bootmgr on NTFS compressed drives

- drive selection will not accept read only drives for boot- and installation drive

- improved VHD creation and installation*

- added option for instant creation of fixed VHD's

- added support for FAT16 and exFat boot drives

*VHD creation now uses diskpart script like this

create vdisk file="C:\Windows7.vhd" maximum=25600 type=(fixed|expandable)
select vdisk file="C:\Windows7.vhd"
attach vdisk
create partition primary align=(32|64|128|256|512|1024|2048)
active
format quick fs=ntfs label="Win7 VHD" uint=(512|1024|2048|4096|8192|16K|32K|64K)
assign letter=X:

In rare cases without setting fs=ntfs, diskpart will format the partition with FAT32.

Partition now active and the installation to a VHD will now create boot files inside the Vdisk too. (So you can boot this VHD also in VirtualBox)

Further due to the long time required by creating big fixed VHD's, there a new option: instant creation of fixed VHD's ;)

Also added Alignment and Allocation option to GUI.

cheers.gif

0

Share this post


Link to post
Share on other sites

I'm sorry, but i can not add support for vmware mounted disk. :(

.

.

There maybe is a solution, the vmlite guy's have written their own driver which can mount vdi/vhd and vmdk images.

It's in the current version of VBoot

works very good so far:

vbootctl.exe mount "VMware.vmdk"
vbootctl.exe umount Z:

cheers.gif

Okay, I will figure out another way of doing this. I tried vboot and also ended up with 'Operating System not found' on booting after WinNTSetup. I also tried to fix this with the W7 recovery disk.

Bootrec /fixmbr (okay),

Bootrec /fixboot (element not found message)

Bootrec /rebuildBCD (finds windows system then message element not found).

The only thing that works with a .vmdk is using WinNTSetup V1 to install XP. I have not tried that with V2 though.

BTW, VBootctl.exe will install drivers on 1st use and all worked fine until I rebooted. My XP system hung during the boot process and I had to to revert to my last good config. Mount/Umount and reboot worked okay on Vista though. Thanks for taking the time.

Edited by click-click
0

Share this post


Link to post
Share on other sites

oh, sorry to hear you had problem with vboot driver.

If you find any way to get this work with vmware, let me know. I have mostly given up Vmware since i switched to windows 7.

cheers.gif

0

Share this post


Link to post
Share on other sites

JFX, nice tool, thanks :thumbup

0

Share this post


Link to post
Share on other sites

After running WinNTSetup for WIndows 7 , I have some additional changes that I would like to

automate. I have a question about a few problems that I encountered. Maybe someone can help

resolve them.

I have 5 modified *.msc files (ie. eventvwr.msc etc.) that I want to replace in system32. When I copy

the files, I get Access is denied. It looks like I am missing full control to do this. I can manually change

the security attributes, but would like my setup cmd to be automatic without intervention. I have a similar

problem when I try to modify one of the power schemes with a .reg file. How can I elevate my privileges

to avoid these errors?

0

Share this post


Link to post
Share on other sites

@ilko_t & BlueLife,

happy you like it :)

@ click-click

with windows vista and later most system files belong the "Trusted Installer", no sure why this is so.

At least this is no real security feature, since every elevated process can simply change the ownership.

Windows 7 have takeown.exe and icacls.exe to change the rights, but if you also need to do this under Windows XP, SetACL is a better option.

Here a batch file example to change the permission of 3 files, so everyone with admin rights can use them, as he like.


@echo off
for %%c in ("D:\Windows\System32\eventvwr.msc"
"D:\Windows\System32\compmgmt.msc"
"D:\Windows\System32\gpedit.msc"
) do (

SetACL.exe -ot file -on "%%c" -actn setowner -ownr "n:S-1-5-32-544;s:y"
SetACL.exe -ot file -on "%%c" -actn ace -ace "n:S-1-5-32-544;p:full;s:y"
)

Not sure what the problem with power schemes and the reg file is, can you give more details?

Also there is powercfg.exe that can export and import power settings.

cheers.gif

0

Share this post


Link to post
Share on other sites

This looks interesting. I believe the the power reg entries that I am trying to change are also protected. I need to start an install for Win7 to get the security attributes for the keys, but your idea about export/import sounds good.

SetACL looks very promising and your sample does the trick. What I would like to do is restore the original permissions after replacing the .msc files. I did a list with the -bckp option, but it won''t restore the original settings.

SetACL.exe -on w:\windows\system32\eventvwr.msc -ot file -actn list -bckp evwrACL

"\\?\w:\windows\system32\eventvwr.msc",1,"DACL(protected+auto_inherited):S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464,full,allow,no_inheritance:Administrators,read_execute,allow,no_inheritance:SYSTEM,read_execute,allow,no_inheritance:Users,read_execute,allow,no_inheritance"

I can't change the owner back to S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 and if I try to change the Administrators permission back to read_ex, it still shows full.

C:\>SetACL.exe -ot file -on "c:\Windows\System32\eventvwr.msc" -actn ace -ace "n:S-1-5-32-544;p:read_ex;s:y"
INFORMATION: Processing ACL of: <\\?\c:\Windows\System32\eventvwr.msc>
SetACL finished successfully.

C:\>SetACL.exe -ot file -on "c:\Windows\System32\eventvwr.msc" -actn setowner -ownr "n:S-1-5-80;s:y"
INFORMATION: Processing ACL of: <\\?\c:\Windows\System32\eventvwr.msc>
SetACL finished successfully.

C:\>SetACL.exe -ot file -on "c:\Windows\System32\eventvwr.msc" -actn setowner -ownr "n:S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464;s:y"
INFORMATION: Processing ACL of: <\\?\c:\Windows\System32\eventvwr.msc>
SetACL finished successfully.

SetACL.exe -on w:\windows\system32\eventvwr.msc -ot file -actn list

"\\?\w:\windows\system32\eventvwr.msc",1,"DACL(protected+auto_inherited):Administrators,full,allow,no_inheritance:S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464,full,allow,no_inheritance:SYSTEM,read_execute,allow,no_inheritance:Users,read_execute,allow,no_inheritance"
SetACL finished successfully.

I guess I haven't caught on how to correctly use SetACL yet. Thanks for any help. :blushing:

Edited by click-click
0

Share this post


Link to post
Share on other sites

:blink: I use it to install windows 7 from pe(XP based) and select both the boot drive and installation drive as C(first and primary partition of hdd)

:w00t: OK everything goes well...

:wacko: Then after installation finished,I go to "my computer" and I found my OS partition becomes the letter D ..... :wacko: and it's unchangeable ...

I tried again with other option such as change the instdrive to D or mount installation drive as D,but still have some letter errors: in my computer there comes a virtual partition B,it is the same as C(now C is the OS partition)....

0

Share this post


Link to post
Share on other sites

hi zomk777,

that interesting, someone else already report me that the "drive letter preassignment" option can assign 2 letter for a partition.

I could never reproduce this, but mountvol.exe should be able to removed the wrong drive letters. :unsure:

The assignment of the system drive letter always works well for me.

One think that maybe help finding the problem:

- after winntsetup finished load the the offline system hive and save the MountedDevices key:

reg load HKLM\SYS C:\Windows\system32\config 
reg export HKLM\SYS\MountedDevices C:\MountedDevices_before_Reboot.reg
reg unload HKLM\SYS

reboot and let installation continue, after new windows has booted to desktop

export the new MountedDevices key

reg export HKLM\System\MountedDevices C:\MountedDevices_after_Setup.reg

please send me both reg files

cheers.gif

0

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.