Jump to content

Ask your Seven xml ? here


Recommended Posts

Yes description is not good. You must set it or get the popup. I have always used <ProtectYourPC>3</ProtectYourPC> so it may be also for defender and Security essentials if you have nothing else.

I also use reg to make sure at Firstlogoncommands it checks but let me decide.

;62 Microsoft Update settings

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]

"AUOptions"=dword:00000002

"IncludeRecommendedUpdates"=dword:00000001

Link to comment
Share on other sites


Yeah I am doing more or less the same thing and it works like a charm.

I absolutely hate how by default WU installs those screwed up drivers for everything before you remember to check what's going on in the background. Usually the bloody thing gladly overwrites drivers you install during unattended setup!

I am a bit lost with something else atm though. I am playing around with some cosmetic nonsenses. Right now I am trying to set an icon for the standard windows.delete shell command, but there's permissions problem of some sort. I've always sucked at understanding this part of Windows, unfortunately.

What I want to do is mount an image, load registry, and change some values. 99% of things work well, but for (I assume) security reasons some keys are kind of protected or locked.

This is what I'm trying to import into the mounted registry:

[HKEY_LOCAL_MACHINE\Wim_Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.delete]

"Icon"="imageres.dll,-89"

I just can't change this value at all. Digging into it a little I realized the local administrator account I am running under only has read permissions! Wth! I eventually managed to take ownership and change it, but it's pain in the a**, and naturally this is supposed to be part of what a batch file does. How should I go around this specific thing?

Edited by TheWalrus
Link to comment
Share on other sites

Do you mean it is ONLY related to Windows Update? The description is bloody confusing!

It certainly is. And the worst part is there is no setting you can use to pick the "Check for updates but let me choose whether to download and install them" setting. :(

I just can't change this value at all. Digging into it a little I realized the local administrator account I am running under only has read permissions! Wth! I eventually managed to take ownership and change it, but it's pain in the a**, and naturally this is supposed to be part of what a batch file does. How should I go around this specific thing?

What had the permission before? Was it TrustedInstaller?

Link to comment
Share on other sites

About Trustedinstaller:

Windows Resource Protection

The "Trusted Installer" account is used to secure core operating system files and registry keys. Protected files and registry keys have an access control list applied that prevents other user accounts and programs that execute under any other user account except the TrustedInstaller account from making changes.

You need takeownership to change a file protected with owner trustedinstaller !

About Auto Update, I use this reg file, like shown by maxXPsoft:

AutoUpdate.reg


Windows Registry Editor Version 5.00

;-------------------------------------------------------------------
; - Configuring Automatic Updates: Options Updates Windows Updates -
;-------------------------------------------------------------------
; AUOptions:1|2|3|4
; 1 = Never check for updates (not recommended)
; 2 = Search for updates but let me choose whether to download and install
; 3 = Download updates but let me choose whether to install them
; 4 = Install updates automatically
; ScheduledInstallDay
; Range = 0|1|2|3|4|5|6|7. 0 = Each day; 1 to 7 = days of the week from Sunday (1) to Saturday (7)
; Recommendation = 0
; ScheduledInstallTime
; Range = n; where n = Time of day in 24-hour format (0-23). Recommendation = 1

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]
"ConfigVer"=dword:00000001
"ElevateNonAdmins"=dword:00000001
"AUOptions"=dword:00000004
"ScheduledInstallDay"=dword:00000000
"ScheduledInstallTime"=dword:00000003
"IncludeRecommendedUpdates"=dword:00000001
"EnableFeaturedSoftware"=dword:00000001

Edited by myselfidem
Link to comment
Share on other sites

Hey Walrus, if you want to try editing the registry as trustedinstaller without changing permissions, might be easier with the dvexexec.exe tool

devxexec.exe /user:TrustedInstaller regedit.exe

Or maybe you can edit this snip to reg add as TrustedInstaller at the command line. Keeps it simple and stupid, compared to batch scripting SetACL take ownership. EDIT: It cannot pass a variable to the command line, but it can run a batch file directly, so that's a start.

devxexec.exe /user:TrustedInstaller mybatch.cmd

reg add HKLM\Wim_Software\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.delete /v "Icon" /t REG_EXPAND_SZ /d "C:\pathto\myicon.ico"

Edited by MrJinje
Link to comment
Share on other sites

  • 4 weeks later...

Hi,

I've got an annoying problem with my current autounattend.xml (generated and successfully checked by SIM).

I want to flexibly install Windows 7 x86 SP1 (and x64 later on) for any edition (at start selected by the user).

Unfortunately, while processing the xml file Windows setup throws an error, saying that the settings for unattended setup couldn't be applied [offlineServicing].

Edit: A screenshot of this error has been posted here.

I tried commenting out the offlineServicing part, that didn't fix it. I verified version="6.1.7601.17514" and stuff, but no chance.

Now, I've got no clue what's wrong as I cannot check for logs in the virtual machine for the (failed) installation (some MSCE guy advised that).

See below what I've got so far.

Any tips, tweaks and additions are highly welcome! :yes:

Autounattend.xml

Edited by Mikka
Link to comment
Share on other sites

Try your install without using the <servicing> object you have at the top.

There seems to be some issues with how those are setup anyways. For example, you have "FreeCell" but the help says "InboxGames\FreeCell" instead.

Is every install to be disabling these packages? Did you try using DISM to disable these features in the install.wim?

WSIM validating is not a 100% check on everything, because it has rules for the objects, and checks the XML syntax but it doesn't actually compare it against a live setup. So there are still ways to have a valid (as per WSIM) xml and still generate an error, such as you have seen here.

Link to comment
Share on other sites

<servicing> is most likely the answer as Tripredacus said.

I have Win 7 Pro and from the feature export Dism /image:C:\zMountDir /Format:Table /Get-Features > %userprofile%\Desktop\zFeatures.txt

on a mounted image there is this which means it is removing it anyway which might cause errors.

Feature Name : Hearts
State : Disable Pending

Feature Name : FreeCell
State : Disable Pending

There is a way to capture the log files. Look here

Link to comment
Share on other sites

Try your install without using the <servicing> object you have at the top.

There seems to be some issues with how those are setup anyways. For example, you have "FreeCell" but the help says "InboxGames\FreeCell" instead.

You were right, after removing <servicing> the setup doesn't complain any more.

Good idea checking for "InboxGames\...", however it doesn't work. It's a tedious task to check which line is the culprit.

(Nice Microsoft ****-up by the way, thank SatanGod I'm no "regular" Windows admin.)

I have Win 7 Pro and from the feature export Dism /image:C:\zMountDir /Format:Table /Get-Features > %userprofile%\Desktop\zFeatures.txt

on a mounted image there is this which means it is removing it anyway which might cause errors.

Hm, I'd played around with dism 2 years ago, there were quite a few glitches giving me a rough time.

Maybe I'll revert to WinToolkit 1.5.0.1 to sort out some components.

There is a way to capture the log files. Look here

Thanks for the hint, I'll have a look at it. :)

Unfortunately, my Autounattend.xml still has got some flaws...

I'd like to install whatever w7 edition was selected at start, without pasting keys from \sources\product.ini.

That's why I manually changed the <ProduKey><Key /> part and also the file ei.cfg to read:

[EditionID]

[Channel]

OEM

[VL]

0

Now the following window pops up:

post-89609-0-42676100-1351194648_thumb.j

I need to unset the tick and click on Skip / Überspringen to continue. That's bad.

After that another window appears to activate some default settings, in short: my unattended setup is gone!

Edited by Tripredacus
Link to comment
Share on other sites

  • 1 month later...

I could use some help with some batch files basics.

I am installing various software during FirstLogonCommands. It is done with two different commands actually, one is basic installation package for anything, and the other are some additions for specific machines. The last command starts the WinSAT index "recount" or however is it called.

I am not very educated about batch scripting, and I could use some help explaning a few things.

What exactly is the difference between simply putting "somefile.cmd" in the command and using "cmd /c" and "start /wait"? I read some documentation on ss64 but it's very unclear to me.

I also don't want the commands to run in parallel, I need them to be executed one after each other.

edit: Let me elaborate further.

            <FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>cmd /c start /wait %SystemRoot%\setup\scripts\install-basic.cmd</CommandLine>
<Description>ruzne instalace</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>cmd /c start /wait %SystemRoot%\setup\scripts\install-extra.cmd</CommandLine>
<Description>ruzne instalace</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>3</Order>
<CommandLine>cmd /c start /min winsat formal</CommandLine>
<Description>WinSAT</Description>
</SynchronousCommand>
</FirstLogonCommands>

Why does the above open command prompt, run the script, BUT doesn't close the window when finished installing what it should? If I type exit it moves onto the next one. I don't get it.

Edited by TheWalrus
Link to comment
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.
×
×
  • Create New...