DoctorDeploy.com - Das unabhängige Forum für Installation und Softwareverteilung Conflict Explorer    
Doctor Deploy: software deployment, - distribution, repackaging, msi, windows installer, client management, installation, setup : forum - discussion boards 
  Search   •  RSS/Newsletter   •  Shop   •  Register  •  Profile  •  Log in to check your private messages  •  Log in
 netinstall datenbank nid extractor View next topic
View previous topic
Post new topicReply to topic
Author Message
bingen
Melchisedech
Melchisedech


Joined: 04 Jun 2004
Posts: 257
Location: 48°42' n.Br./09°09' ö.L.

PostPosted: Fri, 23.Jan.2009, 10:44 Back to top

eine variation des nid importers, nur diesmal als csv output. vielleicht kanns einer von euch mal gebrauchen:
Code:

// nid extractor
// based on flatbyte's nid importer (c)2004
// autor: ingo bieneck (www.flatbyte.com)
// version: 1.090121 (c)01/2009


var fso = new ActiveXObject("Scripting.FileSystemObject");
sNiDatabaseGUID="";
sNiDatabaseVersion="";

ReadNiDb("nidb.nid");

function ReadNiDb(sNidFile) {
   oFile = new ActiveXObject("Scripting.FileSystemObject");

   if(!fso.FileExists(sNidFile)) {
      WScript.Echo(sNidFile+"\nIn diesem Verzeichnis existiert keine NetInstall Datenbank.");
      return;
      }
   sNiDatabaseGUID="";

   try {
      oStream = oFile.OpenTextFile(sNidFile);
      }
   catch(e) {
      WScript.Echo(e.description); // keine arme, keine kekse.
      return;
      }

   iCnt=0;
   sFolder="";

   do {
      sToParse=oStream.ReadLine();

      // "database"
      if(sToParse.substr(0,13)=="$NIRT_VERSION") {
         sNiDatabaseVersion=sToParse.substr(14);
         }
      if(sToParse.substr(0,4)=="GUID" && sNiDatabaseGUID=="") {
         sNiDatabaseGUID=sToParse.substr(5);
         }

      // "folder"
      if(sToParse.substr(0,1)=="&") {
         sFolder="";
         do {
            sToParse2=oStream.ReadLine();
            if(sToParse2.substr(0,4)=="GUID") sFolder=sToParse2.substr(5);
            } while (!sToParse2=="")
         sFolder+=sToParse.substr(1);
         }

      // "project"
      if(sToParse.substr(0,1)=="~") {
         sText=sToParse.substr(1);
         sValue="";

         do {
            sToParse2=oStream.ReadLine();
            if(sToParse2.substr(0,4)=="GUID") sValue+=sToParse2.substr(5);
            // nur fuer den nid importer
            //if(sToParse2.substr(0,5)=="FLAGS") sValue+="|"+sToParse2.substr(6)+"|"+sFolder;
            //if(sToParse2.substr(0,4)=="0b32") sValue+="|"+sToParse2.substr(6);
            } while (!sToParse2=="")

         //dump, umleiten in datei mit: cscript.exe nidextractor.js > datei.txt
         WScript.Echo(sValue+","+sText+","+sFolder);
         iCnt++;
         }

   } while(!oStream.AtEndOfStream)
   oStream.Close();

   WScript.Echo(iCnt+" Projekte in Datenbank"); // just info.
}

View user's profileSend private message
AddThis Social Bookmark Button
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum






Service provided by flatbyte.com :: Powered by phpBB :: FI Theme :: Imprint :: All times are GMT + 1 Hour