Jump to content

zandztrom

Members
  • Posts

    14
  • Joined

  • Last visited

zandztrom's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi, Can somone please help me with this XML code problem I'm having. I'm trying to add XML entrys to an existing XML file structure, this shoud be done by an installation I built. Have been trying with _XMLCreateChildWAttr, _XMLCreateChildNode, _XMLCreateAttrib and so on for hours but I seem to be to stupid to understand how this works. This file is created and filled automatically by the companys installation system but in some special cases I need to do it manually(with the installation). Below is a short example of the XML file structure, the entrys is repeated for evry application installed. The bold part is an example of the section I need to add. <?xml version="1.0" encoding="utf-8"?> <Packages xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Package name="App1" displayName="App1" version="100" computerPart="true" userPart="true" packageSource="%Applications%\App1\4.0.0\"> <Conditions /> <PreProcess /> <PostProcess /> <Install> <Command filename="%PACKAGE_SOURCE%\setup.EXE" validExitCodes="0" hidden="true" useShellExecute="false" /> </Install> <Uninstall /> <Repair /> <Run /> <PatchDependencies /> <Dependencies /> </Package> <Package name="App2" displayName="App2" version="100" computerPart="true" userPart="true" packageSource="%Applications%\App2\3.0.0\"> <Conditions /> <PreProcess /> <PostProcess /> <Install> <Command filename="%PACKAGE_SOURCE%\setup.EXE" validExitCodes="0" hidden="true" useShellExecute="false" /> </Install> <Uninstall /> <Repair /> <Run /> <PatchDependencies /> <Dependencies /> </Package> <Package name="NewApp" displayName="NewApp" version="100" computerPart="true" userPart="true" packageSource="%Applications%\NewApp\1.0.0\"> <Conditions /> <PreProcess /> <PostProcess /> <Install> <Command filename="%PACKAGE_SOURCE%\setup.EXE" validExitCodes="0" hidden="true" useShellExecute="false" /> </Install> <Uninstall /> <Repair /> <Run /> <PatchDependencies /> <Dependencies /> </Package> </Packages>
  2. Hehe, well as you can see from my former question I'm not really a code wizard.
  3. @DjDeep00! Thanks for your quick help I'll try that... @ PsaltyDS. I manage services by using the includes: NTServices.au3 http://www.autoitscript.com/forum/index.php?showtopic=22165 or ServiceControl.au3 http://www.autoitscript.com/forum/index.php?showtopic=6487 Would be great to have a equivalence to RunWait() for services ex _StartSvcWait() etc.
  4. Hi, I'm totally new to loops and iterations and stuff so I need some help. I use _NTservices to stop and start SQLServer and want to check that it's properly stopped before it is started again and if it takes too long it should time out. How can I do this in an easy way? Should I use a while loop? In that case how is it used to check against a string such as "stopped".
  5. Great, worked like a charm... So easy when you know how; ) Thank you so much for your help!
  6. Hi, I have been searchin for info about how to delete XML nodes but I can't find any. I'm trying to delete a node(with sub nodes) identfied by an attribute (name=SQLExpress). But I may be a bit thick because I just dont understand how to do this. The xml file from wich I try to delete is containing several nodes with de same name (Package) but different names in the attribute "name". XML files is new for me so I'm well confused about all this with node and atrributes andso on. Attached an example of the xml file below, the part I want to delete is in bold text. <?xml version="1.0" encoding="utf-8"?> <Packages xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Package name="SQLExpress" displayName="SQLExpress" version="1.0.0.00" displayVersion="2.0.0.00" category="Applications" description="" <Conditions /> <PreProcess /> <PostProcess /> <Install> <Command groupCondition="" accountid=""/> </Install> <Uninstall /> <Repair /> <Run /> <PatchDependencies /> <Dependencies /> </Package> <Package name="AcroRead" displayName="Acrobat Reader" version="100"> <Conditions/> <PreProcess/> <PostProcess/> <Install> <Command groupCondition=""/> </Install> <Uninstall> </Uninstall> <Repair> <Command groupCondition="" accountid="" filename="MsiExec.exe" arguments="/FOMUS &quot;%PACKAGE_SOURCE% </Package> </Packages> I tried: _XMLDeleteAttrNode('/Packages/Package', 'name=SQLExpress') but this must be wrong? Please help
  7. The code above didn't work but i managed to solve it anyway. Funny enough i had to put a Send("{TAB 2}") before the Send("!n") to tab between the buttons! How strange is that??? Thank's so much for the tips anyway
  8. tnx so much for your fast replys i will try them asap...
  9. Hi, I'm trying to script the installation of a GIS program suite with some patches for my company but sometimes the scripts stucks on dialogues for no reason(that I can see). I have tried lots of things, with and without "block input", with winactivate() before winwaitactive(), to send {enter} instead of "!n"(next) but for some dialogues nothing seems to help. Does anyone have a soloution to these problems?
  10. Thank's a lot... It worked just fine when I put @systemdir just as you said. But how could it work before? Best regards
  11. The strange thing is that the previous unc paths works fine and so did this one to until recently. It's also just like the RunAsSet() lost it's "RunAs capabilities".
  12. Trying to run the following script wich used to work without a problem. RunAsSet("account", "domain", "password") RunWait('msiexec /x {A149DEA2-1D5B-11D5-9F76-00C04F6BC7A1} /qb', @SystemDir) FileCopy("\\servername\Program\office\Program\ARC\8.3.0.00\autosetup.cfg", "D:\autosetup.cfg") RunWait('msiexec /i "\\servername\Program\office\Program\ARC\8.3.0.00\LicensFix\ArcViewLic.msi" /qb', @SystemDir) Run('\\servername\Program\office\Program\ARC\8.3.0.00\Reboot.EXE /s') RunAsSet() Now i get an error dialogue saying: Line 0 (File "\\servername\Program\office\Program\ARC\8.3.0.00\ArcView.exe"): Run('\\servername\Program\office\Program\ARC\8.3.0.00\Reboot.EXE /s') Error: Unable to execute the external program. The Folder name is incorrect. <--- (this line is in swedish so i translated it as close as possible, there is nothing wrong with the path since I can run it on cmd line). Does anyone have a clue about what can be wrong?
  13. Thank's a lot for the reply, I will try that asap... Best Regards /Fred
  14. Hi I'm curious about how i should write the code for checking for the unique applicationkey in uninstall, and if it exist remove it by running msiexec /x. Does someone know how to do this? I was thinkig something like the simplified example below (I understand I have to use RegRead() or something but I don't know how to practically do the whole thing) If exsist (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E32FC3D8-D106-425E-9F9E-8BE6E2E79AC9}) then RunWait('msiexec.exe /i "{E32FC3D8-D106-425E-9F9E-8BE6E2E79AC9}" /qb', @SystemDir) End If RunWait('msiexec.exe /i "Appl.msi" transforms="appl.mst" /qb', @SystemDir) And son
×
×
  • Create New...