Jump to content

startup script on first logon


Recommended Posts


Do you want the folder that runs the same script for every single start-up.

C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup

Or are you talking about a one-time use script running during installation. I usually run these scripts from SetupComplete.cmd, but you may want to use a first login script, depending on your needs.

$OEM$\$$\Setup\Scripts

Which is the same as mounting the WIM and editing the files here.

Mount\Windows\Setup\Scripts

Edited by MrJinje
Link to comment
Share on other sites

I mounted my install.wim but I don't have an Scripts folder in "mount\windows\setup". Should I just create a folder and a .cmd in the Scripts folder?

Edited by cluberti
Removed quote - only quote a large block of text (or images, etc) if it actually will mean something in the reply. It did not in this case, so quote removed - be consideriate of our members who have slow 'net connections please.
Link to comment
Share on other sites

Please do not quote the entire post, it makes the thread look :wacko: next time use the Add Reply or Fast Reply buttons.

The SetupComplete.cmd runs in an administrative capacity before the first user account is created. It runs with full permissions by design so you should have no problems (except with editing HKCU settings, ask if you need the method).

Link to comment
Share on other sites

I added the program files to the root of install.wim and putted SetupComplete.cmd in Mount\Windows\Setup\Scripts. unmounted the install.wim and mounted again to see if the files were there.

Pointed in the script to C:\filetoinstall but nothing is installed when setup is complete and I can't see the files in the system root folder.

I use pxe to my wds server to install.

Can't find anything about SetupComplete.cmd in my Setupact.log file.

Isn't it easier to put all files in RemoteInstall\Images\win7\install\$OEM$ on the server, then I don't have to modify the wim file?

Edited by zeezam
Link to comment
Share on other sites

Isn't it easier to put all files in RemoteInstall\Images\win7\install\$OEM$ on the server, then I don't have to modify the wim file?
I can't get $OEM$ to work from PXE boot either. Maybe PXE/WDS/$OEM$ does not play nicely. Instead of OEM method, you should just install your software normally and capture a configured/sysprep machine. PXE can handle pushing customized wim images that way.

Or you will need to do some trial and error and report back the correct way to $OEM$ a PXE install (didn't mention PXE in first post, so you got some misguided advice). But I think capturing an image will be the easier method.

Link to comment
Share on other sites

Instead of OEM method, you should just install your software normally and capture a configured/sysprep machine. PXE can handle pushing customized wim images that way.

Thanks for the info!

Is the best way to make a capture boot image?

Edit;

Found a good demo -> http://technet.microsoft.com/en-us/windows/ee530017.aspx

I'll try this out tomorrow.

Edited by zeezam
Link to comment
Share on other sites

Is the best way to make a capture boot image?

Try the internal method. Open WDS drill down to "Boot Images" right click, select "Create Capture Image" and follow the prompts. When I PXE booted, I picked my new Capture image and here is the screen I get.

78404691.png

It was 100% wizard driven, so maybe not the "best" method, but certainly the easiest/quickest as opposed to manually creating your own PE image and fully scripting IMAGEX by hand. It can only capture "sysprep" machines, so if you are not sysprepping, an alternative would be needed.

Link to comment
Share on other sites

Try the internal method. Open WDS drill down to "Boot Images" right click, select "Create Capture Image" and follow the prompts. When I PXE booted, I picked my new Capture image and here is the screen I get.

I have created an Capture Image but when I choose to boot from it with PXE I come to the installation process.

If I choose to sysprep, what can I boot with to use ImageX?

Edit

Worked great when I created a new boot image with the boot.wim I got when I created a capture image. Syspreped the machine, PXE booted and came to the wizard.

Now I have two *.wim files added under Install Images in WDS but I can't choose image now when I boot, it takes the install.wim I have specified in unattended.xml.

Is it possible to choose which wim to install via the boot image, so I can use which image I want to install from the boot menu?

Edited by zeezam
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...