Announcement

Collapse
No announcement yet.

Regestries???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Regestries???

    does someone have an example or how to video to do a programs regestries correctly?

    i cannot figure out how to do it.... i want the regestries to be whereever the person installs the program

  • #2
    when i use the import .reg

    i get this


    --Imported from REG file: C:\Users\77\Documents\uordefault.reg
    Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online");
    Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online\\Ultima Online");
    Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","ExePath","C:\\Program Files\\Ultima Online\\client.exe",REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","InstCDPath","D:\",REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","StartExePath","C:\\Program Files\\Ultima Online\\uo.exe",REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","PatchExePath","C:\\Program Files\\Ultima Online\\uopatch.exe",REG_SZ);
    Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","Upgraded","Yes",REG_SZ);


    but instead of C:\Program Files\Ultima Online i want it to be where ever the user installs the program

    Comment


    • #3
      so POST install i have...

      Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online");
      Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online\\Ultima Online");
      Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","ExePath","C:\\Program Files\\Ultima Online\\client.exe",REG_SZ);
      Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","InstCDPath","D:",REG_SZ);
      Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","StartExePath","C:\\Program Files\\Ultima Online\\uo.exe",REG_SZ);
      Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","PatchExePath","C:\\Program Files\\Ultima Online\\uopatch.exe",REG_SZ);
      Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","Upgraded","Yes",REG_SZ)


      but like i said i want the above bold to be the install path instead

      "installpath" ?
      %installpath% ?
      "%installpath% //client.exe" ?

      Comment


      • #4
        to answer myself.... hey uocg, try this...


        Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online");
        Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online\\Ultima Online");
        Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","ExePath",SessionVar.Expand("%AppFold er%\\client.exe"),REG_SZ);
        Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","InstCDPath","D:\",REG_SZ);
        Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","StartExePath",SessionVar.Expand("%Ap pFolder%\\uo.exe"),REG_SZ);
        Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","PatchExePath",SessionVar.Expand("%Ap pFolder%\\uopatch.exe"),REG_SZ);
        Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","Upgraded","Yes",REG_SZ);



        Comment


        • #5
          now im wondering why this doesnt work...


          Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\O rigin Worlds Online");
          Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\O rigin Worlds Online\\Ultima Online");
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Or igin Worlds Online\\Ultima Online\\1.0","ExePath",SessionVar.Expand("%AppFold er%\\client.exe"),REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Or igin Worlds Online\\Ultima Online\\1.0","InstCDPath","D:\",REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Or igin Worlds Online\\Ultima Online\\1.0","StartExePath",SessionVar.Expand("%Ap pFolder%\\uo.exe"),REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Or igin Worlds Online\\Ultima Online\\1.0","PatchExePath",SessionVar.Expand("%Ap pFolder%\\uopatch.exe"),REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Or igin Worlds Online\\Ultima Online\\1.0","Upgraded","Yes",REG_SZ);
          Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online");
          Registry.CreateKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\W ow6432Node\\Origin Worlds Online\\Ultima Online");
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","ExePath",SessionVar.Expand("%AppFold er%\\client.exe"),REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","InstCDPath","D:\",REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","StartExePath",SessionVar.Expand("%Ap pFolder%\\uo.exe"),REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","PatchExePath",SessionVar.Expand("%Ap pFolder%\\uopatch.exe"),REG_SZ);
          Registry.SetValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Wo w6432Node\\Origin Worlds Online\\Ultima Online\\1.0","Upgraded","Yes",REG_SZ);


          the NON wow6432Node ones dont work, i want it to do both places... ideas?

          Comment

          Working...
          X