Jump to content

Recommended Posts

Posted

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 Off
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f
REG ADD %KEY% /V Flags /t REG_DWORD /d 30 /f

REG ADD %KEY%05 /VE /D "MS Office 2003" /f
REG ADD %KEY%05 /V 1 /D "%systemdrive%\Install\O2k3\Setup.exe /qb-" /f

REG ADD %KEY%10 /VE /D "MS Office 2003 SP 2" /f
REG ADD %KEY%10 /V 1 /D "%systemdrive%\Install\O2k3SP2\MAINSP2ff.msp /qb-" /f

REG ADD %KEY%20 /VE /D "MS Office 2003 Swedish MUI SP 2" /f
REG ADD %KEY%20 /V 1 /D "%systemdrive%\Install\O2k3MUISP2\MUISP2-SVEff.msp /qb-" /f

REG ADD %KEY%25 /VE /D "MS Win XP Swedish MUI Pack" /f
REG ADD %KEY%25 /V 1 /D "%systemdrive%\Install\XPMUI\MUISetup.exe -i 041d -d041d -r -s" /f

REG ADD %KEY%30 /VE /D "Preparing Install Extra Apps" /f
REG ADD %KEY%30 /V 1 /D "%systemdrive%\Install\Batch\RunOnceEx.cmd" /f

EXIT

Thanks for any suggestions.


Posted

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\RunOnceEx

REG ADD %KEY% /V TITLE /D "Testing" /f
REG ADD %KEY% /V Flags /t REG_DWORD /d 0x20 /f

REG ADD %KEY%50 /VE /D "Test with Notepad" /f
REG ADD %KEY%50 /V 1 /D "%windir%\notepad.exe" /f

I'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. :thumbup

Posted

I have the same problem using XP!

@Echo off
Setlocal
Set "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.1
Rundll32 iernonce,RunOnceExProcess

My only explanation for now is

APPLIES TO
  • Microsoft Windows 2000 Server

  • Microsoft Windows 2000 Advanced Server

  • Microsoft Windows 2000 Professional Edition

  • Microsoft Windows 98 Standard Edition

  • Microsoft Windows Millennium Edition

Posted

Hi Yzöwl,

I saw that, and was thinking the same thing, but then I also found

MS 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 :hello:

Thanks alot for your time though.

Posted

Ah well there's your answer then!

You're not calling a dll

"DllFileName|FunctionName|CommandLineArguements"

-or-

"||command parameters"

Posted

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" /f

I get my Log file in %windir%

So my test file finally looks like:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Testing" /f
REG ADD %KEY% /V Flags /t REG_DWORD /d 32 /f
REG ADD "HKLM\Software\Microsoft\IE Setup\Setup" /v "RunOnceExLogFile" /d "RunOnceExLog.txt" /f

REG ADD %KEY%50 /VE /D "Test with Notepad" /f
REG ADD %KEY%50 /V 1 /D "%windir%\notepad.exe" /f

Now to try for the error log file, and see if I can control all of this in any way more.

Posted

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 off
Setlocal
Set "_=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.1
Rundll32 iernonce,RunOnceExProcess
>Nul Reg delete "%l_%" /v "RunOnceExLogFile" /f

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

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