TFPriest Posted November 21, 2007 Posted November 21, 2007 Hi,Has anyone been able to get the log file function for the RunOnceEx key working?I've tried the various combinations to create a log file in C:\Windows\ that are listed in MS document Q232509.Maybe I'm missing something from the "flags" description, and how to utilize it.cmdow @ /HID@ECHO OffSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY% /V Flags /t REG_DWORD /d 30 /fREG ADD %KEY%05 /VE /D "MS Office 2003" /fREG ADD %KEY%05 /V 1 /D "%systemdrive%\Install\O2k3\Setup.exe /qb-" /fREG ADD %KEY%10 /VE /D "MS Office 2003 SP 2" /fREG ADD %KEY%10 /V 1 /D "%systemdrive%\Install\O2k3SP2\MAINSP2ff.msp /qb-" /fREG ADD %KEY%20 /VE /D "MS Office 2003 Swedish MUI SP 2" /fREG ADD %KEY%20 /V 1 /D "%systemdrive%\Install\O2k3MUISP2\MUISP2-SVEff.msp /qb-" /fREG ADD %KEY%25 /VE /D "MS Win XP Swedish MUI Pack" /fREG ADD %KEY%25 /V 1 /D "%systemdrive%\Install\XPMUI\MUISetup.exe -i 041d -d041d -r -s" /fREG ADD %KEY%30 /VE /D "Preparing Install Extra Apps" /fREG ADD %KEY%30 /V 1 /D "%systemdrive%\Install\Batch\RunOnceEx.cmd" /fEXITThanks for any suggestions.
Yzöwl Posted November 21, 2007 Posted November 21, 2007 You have made an error with your flags entry!It should be either:hex/t reg_dword /d 0x30ordec/t reg_dword /d 48
TFPriest Posted November 21, 2007 Author Posted November 21, 2007 Hi,Thanks alot for the reply.Corrected my entry and tested again, still no log file unfortunately.Here's one test I'm trying :SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Testing" /fREG ADD %KEY% /V Flags /t REG_DWORD /d 0x20 /fREG ADD %KEY%50 /VE /D "Test with Notepad" /fREG ADD %KEY%50 /V 1 /D "%windir%\notepad.exe" /fI've tried different combinations with the flag entry, no success at all with any log file.I'm assuming I'm doing something wrong, but this is uncharted territory for me.Any and all suggestions are greatly appreciated.
Yzöwl Posted November 21, 2007 Posted November 21, 2007 I have the same problem using XP!@Echo offSetlocalSet "ak_=Reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"%ak_% /v Title /d "Testing" /f%ak_% /v Flags /t reg_dword /d 32 /f%ak_%\01 /ve /d "Test with Notepad"%ak_%\01 /v 1 /d "||notepad.exe">Nul Ping -n 4 127.0.0.1Rundll32 iernonce,RunOnceExProcessMy only explanation for now isAPPLIES TOMicrosoft Windows 2000 ServerMicrosoft Windows 2000 Advanced ServerMicrosoft Windows 2000 Professional EditionMicrosoft Windows 98 Standard EditionMicrosoft Windows Millennium Edition
TFPriest Posted November 21, 2007 Author Posted November 21, 2007 Hi Yzöwl,I saw that, and was thinking the same thing, but then I also foundMS article Q310593 which states towards the bottom:Error Handling: If an exception occurs while calling a function in a DLL, the exception is caught and an error dialog box is displayed to the user. You can suppress this error dialog box by using a flag in the RunOnceEx registry key. You can also set a flag to enable log errors and run the RunOnceEx registry key.And at the bottom it applies to:APPLIES TO• Microsoft Windows XP Home Edition • Microsoft Windows XP Professional • Microsoft Windows XP Professional for Itanium-based systems So I'm still holding out hope Thanks alot for your time though.
Yzöwl Posted November 21, 2007 Posted November 21, 2007 Ah well there's your answer then!You're not calling a dll"DllFileName|FunctionName|CommandLineArguements"-or-"||command parameters"
TFPriest Posted November 22, 2007 Author Posted November 22, 2007 Making a little headway with this problem of mine.I found out now by adding:REG ADD "HKLM\Software\Microsoft\IE Setup\Setup" /v "RunOnceExLogFile" /d "RunOnceExLog.txt" /fI get my Log file in %windir%So my test file finally looks like:SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Testing" /fREG ADD %KEY% /V Flags /t REG_DWORD /d 32 /fREG ADD "HKLM\Software\Microsoft\IE Setup\Setup" /v "RunOnceExLogFile" /d "RunOnceExLog.txt" /fREG ADD %KEY%50 /VE /D "Test with Notepad" /fREG ADD %KEY%50 /V 1 /D "%windir%\notepad.exe" /fNow to try for the error log file, and see if I can control all of this in any way more.
Yzöwl Posted November 22, 2007 Posted November 22, 2007 Well done!I've had a play, but have so far been unable to work out how to use an error file.For those who need to see what it creates, using this test file:ROE_Test.cmd@Echo offSetlocalSet "_=Reg add"Set "k_=HKLM\SOFTWARE\Microsoft"Set "r_=%k_%\Windows\CurrentVersion\RunOnceEx"Set "l_=%k_%\IE Setup\Setup">Nul %_% "%l_%" /v "RunOnceExLogFile" /d "..\RunOnceEx.log" /f>Nul %_% %r_% /v Title /d "Testing" /f>Nul %_% %r_% /v Flags /t reg_dword /d 48 /f>Nul %_% %r_%\001 /ve /d "Test with Notepad">Nul %_% %r_%\001 /v 1 /d "||notepad.exe">Nul Ping -n 4 127.0.0.1Rundll32 iernonce,RunOnceExProcess>Nul Reg delete "%l_%" /v "RunOnceExLogFile" /fproduces the following log:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx]"Title"="Testing""Flags"=dword:00000030[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx01]@="Test with Notepad""1"="||notepad.exe"⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪䈠来湩氠杯楧杮⨠⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪പ䐊瑡㩥ㄠ⼱㈲㈯〰‷洨⽭摤礯祹⥹吉浩㩥ㄠ㨷㈺″栨㩨浭猺⥳䡛䱋㩍潓瑦慷敲䵜捩潲潳瑦坜湩潤獷䍜牵敲瑮敖獲潩屮畒佮据䕥嵸剒彁䕄䕌䕔㴠ㄠ剒彁䅗呉㴠ㄠ剒䕁彘低䕟剒剏䑟䅉佌升㴠〠剒䕁彘剅佒䙒䱉⁅‽റ刊䅒塅䱟䝏䙟䱉⁅‽റ刊䅒塅也彏塅䕃呐佉彎剔偁䥐䝎㴠〠剒䕁彘低卟䅔啔当䥄䱁䝏㴠〠剒䕁彘䝉低䕒剟䝅䙟䅌升㴠〠剒䕁彘䡃䍅彋呎䅟䵄义㴠〠剒䕁彘啑呉䥟彆䕒佂呏也䕅䕄⁄‽രഊ䐊瑡㩥ㄠ⼱㈲㈯〰‷洨⽭摤礯祹⥹吉浩㩥ㄠ㨷㈺″栨㩨浭猺⥳敓瑣潩㩮〰റ䘊汩㩥※畆据楴湯㬺䄠杲㩳潮整慰硥㭥䄠瑣潩㩮桓汥䕬數潃浭湡䐊瑡㩥ㄠ⼱㈲㈯〰‷洨⽭摤礯祹⥹吉浩㩥ㄠ㨷㈺‵栨㩨浭猺⥳慄整›ㄱ㈯⼲〲㜰⠠浭搯⽤祹祹ऩ楔敭›㜱〺㨱㘲⠠桨洺㩭獳ഩ⨊⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪湅潬杧湩⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪⨪Note that I've placed the log file into the parent directory of %systemroot%, in this case %systemdrive% and I've removed the log file location too, since it was only required in the test.
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