Jump to content

Recommended Posts

Posted (edited)

Hi, i was trying my unattended windows 7 and i have noticed that RunOnceEx has been stooped (i don´t know why but this is not the problem), then i reinitiate the computer, the installation has continued. But when i log on i have not seen my registry Tweaks HKCU. So I did not know what is happended. I decided to try the unattended again and breaking the runonceex myself (to see if HKCU will not be applied), then reinitiate the computer to see it it will happen the same. Effectively the registry tweaks HKCU have not been applied.

Here is a sample of my SetupComplete.cmd

@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Instalando Aplicaciones" /f

REG ADD %KEY%\000 /VE /D "VMWAre Tools" /f
IF EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\000 /V 1 /D "msiexec.exe /i "%AppsRoot%\Install\VMware.Tools\VMware.Tools_x64.msi" /qr /norestart" /f
IF NOT EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\000 /V 1 /D "msiexec.exe /i "%AppsRoot%\Install\VMware.Tools\VMware.Tools.msi" /qr /norestart" /f

REG ADD %KEY%\009 /VE /D "Adobe Flash Player 10.2.153.1" /f
REG ADD %KEY%\009 /V 1 /D "msiexec.exe /i "%AppsRoot%\Install\Flash.Player.10.2.153.1\Flash.Player.msi" /qr" /f

REG ADD %KEY%\020 /VE /D "WinRAR 4.00" /f
IF EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\020 /V 1 /D "%AppsRoot%\Install\WinRaR.4.00\SetupWinRAR_x64.exe /S" /f
IF NOT EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\020 /V 1 /D "%AppsRoot%\Install\WinRaR.4.00\SetupWinRAR.exe /S" /f
REG ADD %KEY%\020 /V 2 /D "%AppsRoot%\Install\WinRaR.4.00\CopyFile.vbs" /f
REG ADD %KEY%\020 /V 3 /D "%AppsRoot%\Install\WinRaR.4.00\CopyFolder.vbs" /f

REG ADD %KEY%\054 /VE /D "Windows Automated Kit" /f
IF EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\054 /V 1 /D "msiexec.exe /i "%SystemDrive%\Install\Waik.EN\wAiKAMD64.msi" TRANSFORMS="%SystemDrive%\Install\Waik.EN\wAiKAMD64.mst" /qr /norestart" /f
IF NOT EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\054 /V 1 /D "msiexec.exe /i "%SystemDrive%\Install\Waik.EN\wAiKx86.msi" TRANSFORMS="%SystemDrive%\Install\Waik.EN\wAiKx86.mst" /qr /norestart" /f
REG ADD %KEY%\054 /V 3 /D "%SystemDrive%\Install\Waik.EN\CopyStartMenu.vbs" /f
REG ADD %KEY%\054 /V 4 /D "REGEDIT /S %SystemDrive%\Install\Waik.EN\WAiK.HKLM.reg" /f

REG ADD %KEY%\080 /VE /D "Apply RegTweaks" /f
REG ADD %KEY%\080 /V 1 /D "%AppsRoot%\Install\PermissionFile.cmd" /f
REG ADD %KEY%\080 /V 2 /D "REGEDIT /S %AppsRoot%\Install\RegTweaks.HKLM.reg" /f
REG ADD %KEY%\080 /V 3 /D "%AppsRoot%\Install\TaskSchedule.cmd" /f
REG ADD %KEY%\080 /V 4 /D "%AppsRoot%\Install\RegTweaks.cmd" /f
REG ADD %KEY%\080 /V 5 /D "%AppsRoot%\Install\CleanUp.cmd" /f
REG ADD %KEY%\080 /V 6 /D "CMD /C DEL /F /Q \"%SystemRoot%\Setup\Scripts\SetupComplete.cmd\"" /f

Rundll32.exe iernonce.dll,RunOnceExProcess

Exit

Here is my RegTweaks.cmd where i import the registry tweaks HKCU.

@echo off
REG LOAD "HKU\zzz" "%SystemDrive%\Users\Default\NTUSER.DAT"
Start /wait Regedit /S "%AppsRoot%\Install\RegTweaks.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\Install\WinRAR.4.00\Settings.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\Install\Messenger.14.0.8117.416\Messenger.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\install\Codecs\DivX.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\install\Codecs\ReClock.HKCU.reg"
Start /wait Regedit /S "%AppsRoot%\Install\KMPlayer.3.0.0.1439\KMPlayer.HKCU.reg"
REG UNLOAD "HKU\zzz"
Exit

Edited by Major

Posted

Here is a sample of my SetupComplete.cmd

Since the first script is only a sample and there are errors in it you will need to post up all of it in order to ensure that it will run. The second script has also got more than one error too. It may even be prudent to post up the PermissionFile, TaskSchedule and CleanUp batch files too.

Posted (edited)

I have not explained well, the script setupcomplete.cmd usually works well and the HKCU are applied perfectly. Except that one time i have noticed RunOnceEx has been stopped and after i reinitiate the computer the script has continued installing all the programs well, the problem when i log on, the HKCU have not been applied. So it caught my attention to know why the HKCU have not been applied.

I think i have found the problem.

If i stop the RunOnceEx myself for example reinitiating the computer in the middle of the script, i means before running the batch which loads the HKCU, after the computer startup it loads the user. i write the password and then log on, before it shows the desktop, RunOncex continues installing all the programs correctly, but only the HKCU are not been applied because it has already loaded the user before executing the script (HKCU) which means for that user the HKCU will not be applied but for any new user i create, HKCU will be applied . (I will create a new user when i come back at home to see if HKCU will be applied)

My question: how can i fix that neverthless the RunOnceEx is broken, after it continues installing i want to achieve the HKCU are applied also to that user

EDIT:

Effectively, what i have tought is correct, i have created a new user and the registry tweaks HKCU have been applied to the new user correctly.

So please how can i fix that HKCU are applied to the user where it has broken RunOnceEx?

Thanks

Edited by Major
Posted (edited)

I have found the solution writing this lines in the autounattended in the pass oobesystem, So the system logon in the account of administrator if it is broken the RunOnceEx, then when i logon on the account of the user, the HKCU will be applied.

            <AutoLogon>
<Enabled>true</Enabled>
<LogonCount>2</LogonCount>
<Username>Administrator</Username>
</AutoLogon>

Is there any way that the account administrator does not appear in the screen of logon of the users?

Thanks

Edited by Major
  • 8 months later...
Posted (edited)

In the first post of this thread there is code to silently install WAIK:

IF EXIST %SystemRoot%\SysWOW64 REG ADD %KEY%\054 /V 1 /D "msiexec.exe /i "%SystemDrive%\Install\Waik.EN\wAiKAMD64.msi" TRANSFORMS="%SystemDrive%\Install\Waik.EN\wAiKAMD64.mst" /qr /norestart" /f

It requires a Transform file. I cannot find the wAiKAMD64.mst. I have PMed Major but got no response. I have searched the Internet without success. Hope someone can point me in the correct direction. Thanks much for any help available. Enjoy, John.

EDIT: I have figured out how to create a TRANSFORMS file using OCRA, so don't need one now.

Edited by johnhc

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...