Jump to content

RunOnceEx from DVD?


Recommended Posts

Hello,

Could someone explain me how I can install programs from the DVD of Windows 7?

In Windows XP:

- Create Folder @ CD (root\Software\..)

- Create a RunOncEx.cmd and call it from CMDlines

.cmd contains:

@echo off

SetLocal EnableExtensions
SET CDROM=%~d0

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing blabla.." /f

REG ADD %KEY%\001 /VE /D "Installing blabla." /f
REG ADD %KEY%\001 /V 1 /D "%~d0\SOFTWARE\Setup.exe /SP- /VERYSILENT /NORESTART" /f

EndLocal

EXIT

But with Windows 7 this doesnt work?

What is the easiest way to install some applications from the DVD (without using $OEM$ folder)?

Someone that can tell me how to? Thank you! :thumbup

Link to comment
Share on other sites


There are really two options - either in the specialize settings pass, via component "Microsoft-Windows-Deployment" as a RunSynchronous section's RunSynchronousCommand command, or in the oobeSystem settings pass, via component "Microsoft-Windows-Shell-Setup" as a FirstLogonCommands section's SynchronousCommand. Here's a snippet from one of my unattend files, showing the relevant passes and sections only:

	<settings pass="specialize">
...
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Description>EnableAdmin</Description>
<Order>1</Order>
<Path>cmd /c net user Administrator /active:yes</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Description>EnableAdmin_ploc</Description>
<Order>2</Order>
<Path>cmd /c net user Administrator_ploc /active:yes</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Description>UnfilterAdministratorToken</Description>
<Order>3</Order>
<Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
...
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
...
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>cscript.exe C:\Scripts\MyFirstScript.wsf /start</CommandLine>
<Description>Run first WSF script from C: drive</Description>
<Order>1</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cscript.exe D:\Scripts\MyFirstScript.wsf /start</CommandLine>
<Description>Run first WSF script from D: drive</Description>
<Order>2</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cscript.exe E:\Scripts\MyFirstScript.wsf /start</CommandLine>
<Description>Run first WSF script from E: drive</Description>
<Order>3</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cscript.exe F:\Scripts\MyFirstScript.wsf /start</CommandLine>
<Description>Run first WSF script from F: drive</Description>
<Order>4</Order>
</SynchronousCommand>
</FirstLogonCommands>
</component>
...
</settings>

Obviously this is just a snippet of these sections - use the WSIM or MDT+WAIK if you need a GUI to try and configure this.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks, I am using firstlogoncommands now, but is there a way to install the executables from the DVD, so without using the $OEM$ folder to copy the files to the harddrive, just start them from the Windows 7 DVD.

Link to comment
Share on other sites

Hello,

Could someone explain me how I can install programs from the DVD of Windows 7?

In Windows XP:

- Create Folder @ CD (root\Software\..)

- Create a RunOncEx.cmd and call it from CMDlines

.cmd contains:

@echo off

SetLocal EnableExtensions
SET CDROM=%~d0

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing blabla.." /f

REG ADD %KEY%\001 /VE /D "Installing blabla." /f
REG ADD %KEY%\001 /V 1 /D "%~d0\SOFTWARE\Setup.exe /SP- /VERYSILENT /NORESTART" /f

EndLocal

EXIT

But with Windows 7 this doesnt work?

What is the easiest way to install some applications from the DVD (without using $OEM$ folder)?

Someone that can tell me how to? Thank you! :thumbup

There is a easier way.

I have found after long searching a tool where you can do everything with such as:

*intregating updates from windows;

*intregating software into install.wim file ( does it all by him self)

*driver intregation.

no and its not vlite or nlite, its i a better one special for windows 7.

I'm trying it out but i love it at the moment.

Link to comment
Share on other sites

hi, i found it a right in the a** trying 2 add some silent installs 2 vista & win7.

what i did was was copy the file over in the setup [$OEM$] u could just put the files in a folder on the disc.

when i made a CMD that saves 2 the desktop when the setup is runnin [$OEM$], so when the desktop coms up i just click on the CMD and the silent installs start the last command deletes the folder.

i found this the best way coz when i was try with SETUPCOMPLETE.CMD [basically RunOncEx.cmd in vista/win7] thing where bein installed but icons and start menu entries were not showin up i found out it was something 2 do with somethings bein install 2 the pubic user & others to the main user.

i know this is not the way u want 2 do it but it is an option & it works great.

good luck!

cheers james

Edited by jamesbebby
Link to comment
Share on other sites

I use FirstLogonCommands.

Just make sure to include a variable (such as the one being used in the Unattended Guide of MSFN) so that you can put your folder/setups wverywhere you want, including DVD.

Link to comment
Share on other sites

I use FirstLogonCommands.

Just make sure to include a variable (such as the one being used in the Unattended Guide of MSFN) so that you can put your folder/setups wverywhere you want, including DVD.

Yes I know, but where should i put it and what to put there.

I assume something like:

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\bootmgr SET CDROM=%%

But where should I put it?

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