inserting Runonce key from a batch file run by Runonce command



Hello All

I want my PC to start 3 times and each time an administrator is logged it should run different batch file

I am having a batch file (a.bat) called from Runonce command in registry ( HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce) and this a.bat batch file inserts command (c:\b.bat) into Runonce key by running regedit /s xyz.reg file. I observed that b.bat file is executed immediately after a.bat file runs regedit command. I want this NOT to happen. B.bat file should be executed only on next reboot

How to achieve this ? Is there a way to do it by Runonce keys or is there any trick or turn around this problem



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question