bergx Posted July 22, 2004 Share Posted July 22, 2004 I was looking for a way to capture in a logfile the activities whenh RunOnceEx executes. I came across the following topic:http://www.jsiinc.com/subb/tip0500/rh0501.htmSo I used this and it works great, here's an example:set log=%logdir%\install.logSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V FLAGS /D 0x00000030 /t REG_DWORD /fREG ADD %KEY% /V TITLE /D "post Install Script" /fREG ADD %KEY%\020 /VE /D "Adjusting Windows boot-menu" /fREG ADD %KEY%\020 /V 1 /D "%comspec% /c echo --- Adjusting Windows boot-menu>>%log% 2>&1" /fREG ADD %KEY%\020 /V 2 /D "bootcfg /timeout 5" /fREG ADD %KEY%\020 /V 3 /D "bootcfg /delete /ID 2" /fREG ADD %KEY%\030 /VE /D "Change 'My Computer' " /fREG ADD %KEY%\030 /V 1 /D "%comspec% /c echo --- Change 'My Computer' >>%log% 2>&1" /fREG ADD %KEY%\030 /V 2 /D "regedit -s %SystemDrive%\$oem$\MyComp.reg" /fREG ADD %KEY%\040 /VE /D "Allocate reserve-file of 256 Mb" /fREG ADD %KEY%\040 /V 1 /D "%comspec% /c echo --- Allocate reserve-file of 256 Mb >>%log% 2>&1" /fREG ADD %KEY%\040 /V 2 /D "fsutil file createnew c:\reserve.donotdelete 256000000" /f Link to comment Share on other sites More sharing options...
sleepnmojo Posted July 22, 2004 Share Posted July 22, 2004 I have yet to try this, but you can change the flags0x00000020 Create Execution Log File Create a C:\Windows\RunOnceEx.log file with status of commandsREG ADD %KEY% /V FLAGS /D 0x00000020 /t REG_DWORD /f Link to comment Share on other sites More sharing options...
Bâshrat the Sneaky Posted July 22, 2004 Share Posted July 22, 2004 I have yet to try this, but you can change the flags0x00000020 Create Execution Log File Create a C:\Windows\RunOnceEx.log file with status of commandsREG ADD %KEY% /V FLAGS /D 0x00000020 /t REG_DWORD /f I've tried to use an equal command to prevent error dialog boxes. It didn't work... Link to comment Share on other sites More sharing options...
bergx Posted July 22, 2004 Author Share Posted July 22, 2004 Me too, as you can see I still had the flags=30 in; never got any result; errors or not.And if you follow the URL you can capture the whole bachtfile like this in a logfile. Link to comment Share on other sites More sharing options...
maxXPsoft Posted July 23, 2004 Share Posted July 23, 2004 wrong - removed Link to comment Share on other sites More sharing options...
sleepnmojo Posted July 24, 2004 Share Posted July 24, 2004 Perhaps try this I notice instead I have /t which comes first which work's hereREG ADD %KEY% /v Flags /t REG_DWORD /d "30" /fHeres syntaxREG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]Do you get the C:\Windows\RunOnceEx.log log file? I have the /T first in my reg command, and I don't seem to get it either. I am using 0x00000030 though, not the "30" as you have it. Your's should be interpreted as the decimal 30, not the hex as I have it. From the website I grabbed it from, it uses hex. Link to comment Share on other sites More sharing options...
maxXPsoft Posted July 24, 2004 Share Posted July 24, 2004 sleepnmojoYou right thought i was getting them but I'm not, trying to figure out why Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now