Jump to content

RunOnce Batch File not working proper in Vista!


Recommended Posts

I've tried all sorts of ways to make this work and it just wont work proper in Vista!

I've got a .reg file containing:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]

"RenamePC"="C:\\Windows\\Activation\\joindom.cmd"

That I double click to add to the registry which add fine.

When I reboot the computer, it's trying to launch the script before the desktop completely initializes and before the network is "ready". and so the script bombs because it is Network dependent.

My script queries the Network Card's MAC, but fails because Vista takes it's sweet a## time to initialize the network card. In fact it seems to take longer for the NIC to initialize if the script is running. If I boot up the computer normally without the RunOnce, the system becomes "Network Ready" much quicker.

It seems kind of lame to me that I have to wait for everything to be ready and then manually launch the script, reboot, wait, manually launch script 2, reboot, wait, manually launch script 3.

I've even tried having the script launch through Task Scheduler to trigger when someone logs in, but that doesn't even work. It says the task is running, but it's NOT!

The more and more I play with Vista, the more and more I hate it!

Link to comment
Share on other sites


The more and more I play with Vista, the more and more I hate it!

It doesn't really seem to take much...

The new way is to use FirstLogonCommands instead (in unattended.xml)

There's no reason for a scheduled task not to launch (I've had zero issues with that myself)

Besides, you could have your stuff already all installed and pre-configured in the WIM in the first place.

I haven't tried RunOnce at all, so no idea if it works or not. Vista is known to block some soft from running there (if it needs admin privileges)

Link to comment
Share on other sites

Ended up getting this to work with a work around since NOTHING works properly like it should in Vista.

I put three short cuts on the Administrator desktop to three separate batch scripts located in the Windows folder. Then I manually login as Administrator since AutoLogon doesn't work properly in Vista. I then wait for the network icon to become active (which takes about 1 minute), then double click on the shorcut called STEP1. Then I reboot, login again, wait 1 minute, then run STEP2, reboot, then do the same procedure for STEP3.

It seems to work ok this way, but I gotta go around to each machine and do this. Kinda sucks when you gotta lot of machines, But what sucks more is that the customer went with Vista in the first place!

Link to comment
Share on other sites

Ended up getting this to work with a work around since NOTHING works properly like it should in Vista.

I dunno, I'm not sure what you're referring to here. Everything here works as intended so far, so saying NOTHING works right is ludicrous.

Then I manually login as Administrator since AutoLogon doesn't work properly in Vista.

Eh? Start > run > netplwiz.exe > select user, uncheck "must enter name/password", hit apply, enter password, done! It's exactly like it has been for just about forever (exact same as XP and 2k at least). Nothing's changed at all. Tested, and working just fine.

I then wait for the network icon to become active (which takes about 1 minute)

Did it come across your mind to check into that issue? That's not normal, for any version of windows. You have bad drivers, network problems (problems with DHCP perhaps), or something along those lines. Check with the Windows Performance Tools Kit and/or look at the network traffic with Wireshark. Something's wrong somewhere. I sure wouldn't deliver machines with such a problem to my clients...

Kinda sucks when you gotta lot of machines

Or then again, you could use FirstLogonCommands instead (in unattended.xml), or apply the changes in the WIM image first.

But what sucks more is that the customer went with Vista in the first place!

And more and more customers are going to chose it, so you might as well get used to the new ways.

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