[PATCH] misc/registry.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok, here is the needed patch to get Blizzard's
installers to not complain _ever_ about not being able
to find program start menu...  this also adds in a reg
key for HARDWARE\\DEVICEMAP\\SerialComm
"Serial0"=""COM1"

I think that the code to write to HKLM may be slightly
broken though, as I couldn't get any of the hklm
entries in misc/registry.c to be written, except for
the ComputerName one...  I dunno, someone wanna have a
look at it?  I'm creating a bug for it soon as i send
this out...


-Dustin




__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
Author: Dustin Navea
ChangeLog: adds in keys for installers, to fix blizzard's weird installers
           complaining about not being able to find the start menu...
           adds in a key to display the first serial port on com1 (some apps use it)
License: ALL
Permissions: may be used only to teach yourself c.
Notes: I think that RegCreateKeyA(HKEY_LOCAL_MACHINE, blah blah blah) may be broken
       it never once wrote the keys in this registry.c except the ComputerName one
       May also be the case for HKEY_DYN_DATA
       Backtrace (trace+reg) shows that it is writing the keys, but they dont ever
       appear in the registry files....... :/  I'm gonna submit it as a bug...
====================================================================================
--- misc/registry.c	Thu May  9 14:38:06 2002
+++ misc/registry.c.new	Sun May 19 00:51:49 2002
@@ -1074,12 +1074,38 @@
 
 	TRACE("(void)\n");
 
+	RegCreateKeyA(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",&hkey);
+	RegSetValueExA(hkey,"Start Menu",0,REG_SZ,"C:\\WINDOWS\\Start Menu",strlen("C:\\WINDOWS\\Start Menu"));
+	RegSetValueExA(hkey,"Programs",0,REG_SZ,"C:\\WINDOWS\\Start Menu\\Programs",strlen("C:\\WINDOWS\\Start Menu\\Programs"));
+	RegSetValueExA(hkey,"StartUp",0,REG_SZ,"C:\\WINDOWS\\Start Menu\\Programs\\Startup",strlen("C:\\WINDOWS\\Start Menu\\Programs\\Startup"));
+	RegSetValueExA(hkey,"Desktop",0,REG_SZ,"C:\\WINDOWS\\Desktop",strlen("C:\\WINDOWS\\Desktop"));
+	RegSetValueExA(hkey,"Fonts",0,REG_SZ,"C:\\WINDOWS\\Fonts",strlen("C:\\WINDOWS\\Fonts"));
+	RegSetValueExA(hkey,"Favorites",0,REG_SZ,"C:\\WINDOWS\\Favorites",strlen("C:\\WINDOWS\\Favorites"));
+	RegSetValueExA(hkey,"NetHood",0,REG_SZ,"C:\\WINDOWS\\NetHood",strlen("C:\\WINDOWS\\NetHood"));
+	RegSetValueExA(hkey,"Personal",0,REG_SZ,"C:\\My Documents",strlen("C:\\My Documents"));
+	RegSetValueExA(hkey,"Recent",0,REG_SZ,"C:\\WINDOWS\\Recent",strlen("C:\\WINDOWS\\Recent"));
+	RegSetValueExA(hkey,"SendTo",0,REG_SZ,"C:\\WINDOWS\\SendTo",strlen("C:\\WINDOWS\\SendTo"));
+	RegSetValueExA(hkey,"Templates",0,REG_SZ,"C:\\WINDOWS\\ShellNew",strlen("C:\\WINDOWS\\ShellNew"));
+	RegCloseKey(hkey);
+
+	RegCreateKeyA(HKEY_LOCAL_MACHINE,"Hardware\\Devicemap\\Serialcomm",&hkey);
+	RegSetValueExA(hkey,"Serial0",0,REG_SZ,"Com1",strlen("Com1"));
+	RegCloseKey(hkey);
+
+	RegCreateKeyA(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\UserShellFolders",&hkey);
+	RegSetValueExA(hkey,"Favorites",0,REG_SZ,"C:\\WINDOWS\\Favorites",strlen("C:\\WINDOWS\\Favorites"));
+	RegSetValueExA(hkey,"Personal",0,REG_SZ,"C:\\My Documents",strlen("C:\\My Documents"));
+	RegCloseKey(hkey);
+
+	RegCreateKeyA(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall",&hkey);
+	RegCloseKey(hkey);
+
 	RegCreateKeyA(HKEY_DYN_DATA,"PerfStats\\StatData",&hkey);
 	RegCloseKey(hkey);
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux