home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,287 of 68,980   
   yelw0rc@gmx.net to All   
   reg query Suche als Variable speichern   
   13 Sep 18 02:48:54   
   
   Hallo,   
      
   ich verzweifel gerade etwas an folgendem Problem.   
      
   Ich möchte einen Registrierungseintrag auslesen und diesen in einer   
   Variable speichern.   
      
   Der Eintrag befindet sich in HKEY_CURRENT_USER\Software\Microsoft\Windows   
   NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted   
      
   und sieht wie folgt aus   
      
   C:\Users\xxx\Desktop\InstallationAssistant\InstallationAssistant.exe   
      
   Ich möchte jetzt nun den Pfad C:\Users\xxx\Desktop\InstallationsAssistant in   
   einer Variable haben.   
      
   Das Auslesen über reg query funktioniert soweit:   
      
   reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Curre   
   tVersion\AppCompatFlags\Compatibility Assistant\Persisted" | findstr   
   InstallationAssistant   
      
   Ausgabe ist dann:   
      
   C:\Users\xxx\Desktop\InstallationAssistant\InstallationAssistant.exe REG_DWORD   
   0x1   
      
   Ich habe es mal unter anderem so versucht:   
      
   for /f "tokens=*" %a in ('reg query HKCU\Software\Microsoft\Windows   
   NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted ^| findstr   
   InstallationAssistant') do set "var=%b"   
      
   Wollte aber nicht so wirklich funktionieren.   
      
   Könnte mir bitte jemand behilflich sein?   
   Vielen Dank im Voraus.   
      
   Christian   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca