0

I have a bootable disk from a machine which is mounted on another machine. I need to make the bootable disk ready so that when i create a machine using that mounted bootable disk some of the msi's are installed.

What is the best way to run the msi's at system startup without knowing the instance credentials?

Note : I have tried using RunOnce and AutoAdminLogon, it works but i need to know the credentials for this method.

Also, since i have only the bootable disk i need to use methods which can be performed by making changes in registry hive.

Thanks in advance for your suggestions.

Abinash Kumar
  • 331
  • 1
  • 2
  • 15
  • Are you trying use a boot disc to install Windows plus your app, or to add your app onto a machine that already has Windows? – Michael Urman Feb 01 '17 at 13:11
  • Windows was already installed on the boot disc, so i just want to add the app while the system boots next time. – Abinash Kumar Feb 01 '17 at 13:25
  • What kind of app is it? If it is ultimately launched with a shortcut, then install it advertised for all users. When the user logs on and uses the app shortcut it will all install. See install on demand. Having said that, it's not obvious to me why you can't just install it all on the bootdisc anyway so it's all just automatically there. – PhilDW Feb 01 '17 at 22:33
  • I can't just install on the bootdisk because the bootdisk which i have is the backup of original bootdisk. I am trying to create a machine using only the bootdisk to cloud, so i need to install some installers on system startup and not when the user logs in. – Abinash Kumar Feb 02 '17 at 04:35

1 Answers1

0

I finally got the answer to my question, there are many other methods but i have tested the following two methods.

Method 1 - We can write a bat file to install the msi or any other operation and place it as the startup script. For making it as the startup script, we need to make following entries :

  1. Copy the bat file to the location : %boot_drive_name%\Windows\System32\GroupPolicy\Machine\Scripts\Startup
  2. Load the registry in the boot_drive in registry hive.
  3. Create the registry key and include your bat file name : HKLM\%reg_hive_name%\Microsoft\Windows\CurrentVersion\GroupPolicy\Scripts\Startup\0\0 HKLM\%reg_hive_name%\Microsoft\Windows\CurrentVersion\GroupPolicy\State\Machine\Scripts\Startup\0\0

Method 2 - We can install services with path to srvany.exe before removing the bootable disk then we can use registry hive and change the parameters for the srvany service to run msi's or any other windows application at windows startup.

Method 1 is better if we do not want to change anything on the source machine. We can do everything by using registry to trigger the startup script.

Abinash Kumar
  • 331
  • 1
  • 2
  • 15