Trolleule Posted October 7, 2015 Share Posted October 7, 2015 (edited) Hi,i wrote a reg file:Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]"Test"="cmd /K REG ADD \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Associations\" /f /v DefaultFileTypeRisk /t REG_DWORD /d 1808 & REG ADD \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Associations\" /f /v LowRiskFileTypes /t REG_SZ /d \".vbs;.reg;.msi;.cmd;.bat;.msp\""Only 2 REG ADD commands which i have merged together with a "&". But on log on nothing happens! When i write (i changed only the last few chars):Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]"Test"="cmd /K REG ADD \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Associations\" /f /v DefaultFileTypeRisk /t REG_DWORD /d 1808 & REG ADD \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Associations\" /f /v LowRiskFileTypes /t REG_SZ /d \".vbs;.\""it works... i got the cmd window on log on and the entries are added to registry too.It seems as all combinations, which look like ".reg;.test;.lol" or similar doesn't work. What is f***ing windows doing here? Has someone an idea? Edited October 7, 2015 by Trolleule Link to comment Share on other sites More sharing options...
Tripredacus Posted October 7, 2015 Share Posted October 7, 2015 Your second one ends like this: .\""but your first one doesn't. Link to comment Share on other sites More sharing options...
Trolleule Posted October 7, 2015 Author Share Posted October 7, 2015 Solution:http://stackoverflow.com/questions/11128342/limitations-of-runonce-in-windows Link to comment Share on other sites More sharing options...
Tripredacus Posted October 8, 2015 Share Posted October 8, 2015 Well specifically: " Windows has a 256 character limit on commands ran from the RunOnce registry in HKLU or HKLM" 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