general trend in responstime indicating? - memory-leaks

I have a simple VUGen navigation script recorded using URL mode and pasted in below.
I have two questions:
Is it not possible to use web_reg_find() in URL mode recorded scripts?
When placing a verification (web_reg_find) before a step in the script where I know that i.e. a text is to appear. The Generation log only inform me that web_reg_find was succesfull (not the way I am used to with HTML mode and when the Generation log typically exposes the value itself also).
When running the below script as a sceanrio in the Controller With 2 users, after 10 minutes of running the transaction time peaks, the CPU usage in JVM peaks (99,9%) and Memory is also "maxed-out". It is typical to think that this has to do with heap and GC settings ++.
But is it possible that the script itself is making this happen. More details that can lead to the script being the reason for the peak in responstime/memeory/cpu usage is that the application I am testing is not integrated with any services at all, all being mocked around it. I also just use one user to log in for all mye requests, due to this being mocked and I am getting the same response everytime. But it does throw error on any transactions. There is also no logout/cleanup logic implemented wich could lead to accumulated sessions on the webserver so that may be the case.
My next step is to use JVisualVM to dig into the high CPU usage after some time when the peaking happens.
So my general question is: Could this phenomen, as in after 10 mins responsetime peakes, and memory/CPU consumption peaks on the WAS (actually a JBoss), be due to something with the script itself? Anyone having experienced that their script is the source of this?
Action()
{
//Saving sessionID i in parameter for further manual correlation during the script
web_reg_save_param_ex("ParamName=SessionID",
"LB=jsessionid=",
"RB=?",
SEARCH_FILTERS,
"Scope=Headers",
LAST);
//lr_output_message("Sesjons ID: %s", lr_eval_string ("+{SessionID}"));
web_url("something",
"URL={url}/something/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_concurrent_start(NULL);
web_url("modig-ver-1359533772000.css",
"URL={url}/something/css/modig-ver-1359533772000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t2.inf",
LAST);
web_url("bootstrap-transition-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-transition-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t3.inf",
LAST);
web_url("bootstrap-alert-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-alert-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t4.inf",
LAST);
web_url("datepicker-ver-1360590665000.css",
"URL={url}/something/css/datepicker-ver-1360590665000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t5.inf",
LAST);
web_url("ViseForslagTilSomethingPage-ver-1360590665000.css",
"URL={url}/something/css/ViseForslagTilSomethingPage-ver-1360590665000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t6.inf",
LAST);
web_url("bootstrap-carousel-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-carousel-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t7.inf",
LAST);
web_url("bootstrap-button-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-button-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t8.inf",
LAST);
web_url("GettingreadyForSomethingPage-ver-1360590665000.css",
"URL={url}/something/css/GettingreadyForSomethingPage-ver-1360590665000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t9.inf",
LAST);
web_url("bootstrap-collapse-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-collapse-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t10.inf",
LAST);
web_url("bootstrap-tooltip-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-tooltip-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t11.inf",
LAST);
web_url("bootstrap-dropdown-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-dropdown-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t12.inf",
LAST);
web_url("bootstrap-modal-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-modal-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t13.inf",
LAST);
web_url("VurderePiceofshitListePanel-ver-1360590665000.css",
"URL={url}/something/css/VurderePiceofshitListePanel-ver-1360590665000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t14.inf",
LAST);
web_url("bootstrap-popover-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-popover-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t15.inf",
LAST);
web_url("bootstrap-scrollspy-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-scrollspy-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t16.inf",
LAST);
web_url("bootstrap-tab-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-tab-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t17.inf",
LAST);
web_url("bootstrap-affix-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-affix-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t18.inf",
LAST);
web_url("bootstrap-datepicker-ver-1360590665000.js",
"URL={url}/something/js/bootstrap-datepicker-ver-1360590665000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t19.inf",
LAST);
web_url("BasePage-ver-1360590665000.css",
"URL={url}/something/css/BasePage-ver-1360590665000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t20.inf",
LAST);
web_url("jquery.placeholder-local-modernisering-version-ver-1360590665000.js",
"URL={url}/something/js/jquery.placeholder-local-modernisering-version-ver-1360590665000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t21.inf",
LAST);
web_url("bootstrap-typeahead-ver-1359533772000.js",
"URL={url}/something/js/bootstrap/bootstrap-typeahead-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t22.inf",
LAST);
web_url("BasePage-ver-1360590665000.js",
"URL={url}/something/js/BasePage-ver-1360590665000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t23.inf",
LAST);
web_url("GettingreadyForSomethingPage-ver-1360590665000.js",
"URL={url}/something/js/GettingreadyForSomethingPage-ver-1360590665000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t24.inf",
LAST);
web_url("BstreetPanel-ver-1360590665000.js",
"URL={url}/something/js/BstreetPanel-ver-1360590665000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t25.inf",
LAST);
web_url("wicket-debugbar-ver-1355500350000.css",
"URL={url}/something/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-1355500350000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t26.inf",
LAST);
web_url("BstreetPanel-ver-1360590665000.css",
"URL={url}/something/css/BstreetPanel-ver-1360590665000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t27.inf",
LAST);
web_url("wicket-debugbar-ver-1355500350000.js",
"URL={url}/something/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-1355500350000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t28.inf",
LAST);
web_url("FatteSomethingPage-ver-1360590665000.css",
"URL={url}/something/css/FatteSomethingPage-ver-1360590665000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t29.inf",
LAST);
web_url("PiceofshitPanel-ver-1360590665000.js",
"URL={url}/something/js/PiceofshitPanel-ver-1360590665000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t30.inf",
LAST);
web_url("wicket-ver-1355500350000.png",
"URL={url}/something/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-ver-1355500350000.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t31.inf",
LAST);
web_url("bug-ver-1355500350000.png",
"URL={url}/something/wicket/resource/org.apache.wicket.devutils.inspector.InspectorPage/bug-ver-1355500350000.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t32.inf",
LAST);
web_url("remove-ver-1355500350000.png",
"URL={url}/something/wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/remove-ver-1355500350000.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t33.inf",
LAST);
web_url("jquery-1.8.2-ver-1359533772000.js",
"URL={url}/something/js/jquery/jquery-1.8.2-ver-1359533772000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t34.inf",
LAST);
web_url("harddrive-ver-1355500350000.png",
"URL={url}/something/wicket/resource/org.apache.wicket.devutils.debugbar.SessionSizeDebugPanel/harddrive-ver-1355500350000.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t35.inf",
LAST);
web_concurrent_end(NULL);
web_concurrent_start(NULL);
web_url("prosessteg_gettingready.png",
"URL={url}/something/css/images/prosessteg_gettingready.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t36.inf",
LAST);
web_url("somelogo.jpg",
"URL={url}/something/css/images/somelogo.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t37.inf",
LAST);
web_url("glyphicons-halflings-white.png",
"URL={url}/something/img/glyphicons-halflings-white.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t38.inf",
LAST);
web_concurrent_end(NULL);
web_reg_save_param_ex(
"ParamName=someOtherThingsId",
"LB=something/someOtherThing/",
"RB=/gettingready",
SEARCH_FILTERS,
"Scope=Headers",
LAST);
//lr_output_message("SomeOtherThings ID:", lr_eval_string ("{someOtherThingsId}"));
lr_think_time(3);
lr_start_transaction("Logg inn");
web_submit_data("create;jsessionid=+{SessionID}",
"Action={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0-1.IFormSubmitListener-createeSomeOtherThingForm",
"Method=POST",
"RecContentType=text/html",
"Referer={url}/something/someOtherThing/create;jsessionid=+{SessionID}?0",
"Snapshot=t39.inf",
"Mode=HTTP",
ITEMDATA,
"Name=neste", "Value=x", ENDITEM,
"Name=fnr", "Value={fnr}", ENDITEM,
"Name=someOtherThingsidbuse", "Value=", ENDITEM,
"Name=userId", "Value=P114818", ENDITEM,
"Name=authenticationLevel", "Value=3", ENDITEM,
"Name=identType", "Value=internal", ENDITEM,
"Name=consumerId", "Value=something", ENDITEM,
LAST);
web_concurrent_start(NULL);
web_url("modal-ver-1355500286000.js",
"URL={url}/something/wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-1355500286000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t40.inf",
LAST);
web_url("wicket-ajax-jquery-ver-1355500070000.js",
"URL={url}/something/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-1355500070000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t41.inf",
LAST);
web_url("wicket-event-jquery-ver-1355500070000.js",
"URL={url}/something/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1355500070000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t42.inf",
LAST);
web_url("modal-ver-1355500286000.css",
"URL={url}/something/wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-1355500286000.css",
"Resource=1",
"RecContentType=text/css",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t43.inf",
LAST);
web_url("wicket-ajax-jquery-debug-ver-1355500070000.js",
"URL={url}/something/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug-ver-1355500070000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t44.inf",
LAST);
web_concurrent_end(NULL);
web_url("glyphicons-halflings.png",
"URL={url}/something/img/glyphicons-halflings.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t45.inf",
LAST);
lr_end_transaction("Logg inn",LR_AUTO);
lr_think_time(5);
lr_start_transaction("Neste Gettingready something");
web_url("gettingready",
"URL={url}/something/someOtherThing/{someOtherThingsId}/gettingready?2-1.IBehaviorListener.0-neste&_=1361189220848",
"Resource=0",
"RecContentType=text/xml",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t46.inf",
"Mode=HTTP",
LAST);
web_url("vurderepiceofshit",
"URL={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit",
"Resource=0",
"RecContentType=text/html",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/gettingready?3",
"Snapshot=t47.inf",
"Mode=HTTP",
LAST);
web_url("AjaxFormChoiceComponentUpdatingBehavior-ver-1355500070000.js",
"URL={url}/something/wicket/resource/org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior/AjaxFormChoiceComponentUpdatingBehavior-ver-1355500070000.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?5",
"Snapshot=t48.inf",
LAST);
web_concurrent_start(NULL);
web_url("icon_ikke_ok.png",
"URL={url}/something/css/images/icon_ikke_ok.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?5",
"Snapshot=t49.inf",
LAST);
web_url("icon_ok.png",
"URL={url}/something/css/images/icon_ok.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?5",
"Snapshot=t50.inf",
LAST);
web_url("Prosessteg_vurdere_piceofshit.png",
"URL={url}/something/css/images/Prosessteg_vurdere_piceofshit.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?5",
"Snapshot=t51.inf",
LAST);
web_url("icon_vurderes.png",
"URL={url}/something/css/images/icon_vurderes.png",
"Resource=1",
"RecContentType=image/png",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?5",
"Snapshot=t52.inf",
LAST);
web_concurrent_end(NULL);
lr_end_transaction("Neste Gettingready something",LR_AUTO);
lr_think_time(5);
lr_start_transaction("Velg Oppfyllt og trykk lagre");
web_submit_data("vurderepiceofshit_2",
"Action={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?3-1.IBehaviorListener.0-vurderePiceofshitListe-vurderePiceofshitRepeater-4-vurderePiceofshitListItem-piceofshitHoved-innerPanel-piceofshitDetaljer-piceofshitForm-piceofshitsregelValg",
"Method=POST",
"RecContentType=text/xml",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?5",
"Snapshot=t53.inf",
"Mode=HTTP",
ITEMDATA,
"Name=piceofshitsregelValg", "Value=OPPFYLT", ENDITEM,
LAST);
web_submit_data("vurderepiceofshit_3",
"Action={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?4-1.IFormSubmitListener-vurderePiceofshitListe-vurderePiceofshitRepeater-4-vurderePiceofshitListItem-piceofshitHoved-innerPanel-piceofshitDetaljer-piceofshitForm",
"Method=POST",
"RecContentType=text/html",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?5",
"Snapshot=t54.inf",
"Mode=HTTP",
ITEMDATA,
"Name=piceofshitForm33_hf_0", "Value=", ENDITEM,
"Name=piceofshitsregelValg", "Value=OPPFYLT", ENDITEM,
LAST);
lr_end_transaction("Velg Oppfyllt og trykk lagre",LR_AUTO);
lr_think_time(5);
lr_start_transaction("Velg neste etter Oppfyllt Uttak av pensjon");
web_url("Neste",
"URL={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?7-1.ILinkListener-neste",
"Resource=0",
"RecContentType=text/html",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/vurderepiceofshit?7",
"Snapshot=t55.inf",
"Mode=HTTP",
LAST);
lr_end_transaction("Velg neste etter Oppfyllt Uttak av pensjon",LR_AUTO);
lr_think_time(5);
lr_start_transaction("Send til beslutning");
web_url("Send til beslutning",
"URL={url}/something/someOtherThing/{someOtherThingsId}/forslagsomething?8-1.ILinkListener-neste",
"Resource=0",
"RecContentType=text/html",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/forslagsomething?8",
"Snapshot=t56.inf",
"Mode=HTTP",
LAST);
lr_end_transaction("Send til beslutning",LR_AUTO);
lr_think_time(5);
lr_start_transaction("Huk av for godkjent beslutning");
web_submit_data("fattesomething",
"Action={url}/something/someOtherThing/{someOtherThingsId}/fattesomething?9-1.IBehaviorListener.0-tabbedPanel-content-panels-0-panel-tableBody-kontrollpunkter-0-kontrollpunkt-beslutningForm-valgtBeslutning",
"Method=POST",
"RecContentType=text/xml",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/fattesomething?9",
"Snapshot=t57.inf",
"Mode=HTTP",
ITEMDATA,
"Name=valgtBeslutning", "Value=0", ENDITEM,
LAST);
lr_end_transaction("Huk av for godkjent beslutning",LR_AUTO);
lr_think_time(5);
lr_start_transaction("Godkjenn og iverksett");
web_url("fattesomething_2",
"URL={url}/something/someOtherThing/{someOtherThingsId}/fattesomething?9-1.ILinkListener-godkjenn",
"Resource=0",
"RecContentType=text/html",
"Referer={url}/something/someOtherThing/{someOtherThingsId}/fattesomething?9",
"Snapshot=t58.inf",
"Mode=HTTP",
LAST);
web_url("thatsallfolks.jpg",
"URL={url}/something/css/images/thatsallfolks.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer={url}/something/wicket/bookmarkable/no.nav.something.web.pages.terminus.TerminusPage?someOtherThingId={someOtherThingsId}",
"Snapshot=t59.inf",
LAST);
lr_end_transaction("Godkjenn og iverksett",LR_AUTO);
return 0;

web_reg_find() context is the next call. With HTML mode that call made include subcalls. You need to be very careful on placement of web_reg_*() calls in URL mode to ensure that you have the proper context. And yes, web_reg_find() will execute successfully every single time even if it does not find the value. You will need to manually check in your code for how many instances of the text were found in the call.
As you your larger question, can a script cause an error. In general, yes it can. If you are exercising an interface in an out of spec fashion from its intended use then the likelihood is high for false errors to be generated. What are some of the common causes, using the same login credentials for multiple users where all users would be distinct in production, users operating against the same set of data causing locking and blocking issues where in production each of the datasets would be distinct, having no think time or iteration time (essentially blasting the interface), etc...
If you exercise the interface in question in an in-spec manner, the same way in which a user will be exercising the interface, and you find errors then the errors are directly related to the code in use on the server. I would recommend leveraging any number of commercial or open source JVM diagnostic utilities to see where the resources are being consumed and pass that information back to the developers.

Related

How to uninstall a program mistakenly installed in the "Program Files(x86)" folder and install it anew in the 64-bit "Program Files" folder

I am using innoSetup to create a software installer.
However, by default, innoSetup installs to "Program Files(x86)", which I have mistakenly distributed to my users.
And many users install the software in the x86 directory using a 64-bit Windows environment.
I created an installer for the new version of the software with innoSetup and designed it to install correctly in "Program Files" for 64-bit.
However, the programs already installed in "Program Files(x86)" are not uninstalled and remain.
How can I uninstall them?
A similar question exists in the past on stack overflow, but it did not solve my problem.
I had initially written the following code.
This was installed in the "Program Files(x86)" folder, even when used in a Windows 64-bit environment
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "testApp"
#define MyAppVersion "1.00"
#define MyAppPublisher "taichi"
#define MyAppURL "https://testApp.com/"
#define MyAppExeName "testApp.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{xxx-xxxx-xxxxx-xxx}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=C:\Users\taichi\Desktop
OutputBaseFilename=testAppSetup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Code]
/////////////////////////////////////////////////////////////////////
function GetUninstallString(): String;
var
sUnInstPath: String;
sUnInstallString: String;
begin
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
sUnInstallString := '';
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
Result := sUnInstallString;
end;
/////////////////////////////////////////////////////////////////////
function IsUpgrade(): Boolean;
begin
Result := (GetUninstallString() <> '');
end;
/////////////////////////////////////////////////////////////////////
function UnInstallOldVersion(): Integer;
var
sUnInstallString: String;
iResultCode: Integer;
begin
// Return Values:
// 1 - uninstall string is empty
// 2 - error executing the UnInstallString
// 3 - successfully executed the UnInstallString
// default return value
Result := 0;
// get the uninstall string of the old app
sUnInstallString := GetUninstallString();
if sUnInstallString <> '' then begin
sUnInstallString := RemoveQuotes(sUnInstallString);
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
Result := 3
else
Result := 2;
end else
Result := 1;
end;
/////////////////////////////////////////////////////////////////////
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep=ssInstall) then
begin
if (IsUpgrade()) then
begin
UnInstallOldVersion();
end;
end;
end;
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Users\taichi\Documents\hold\testAppDevelop\dist\testApp\testApp.exe"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: runasoriginaluser nowait postinstall skipifsilent
After modifying the code as follows, the software was installed in Program Files. However, the files in Program Files(x86) were not uninstalled.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "testApp"
#define MyAppVersion "1.00"
#define MyAppPublisher "taichi"
#define MyAppURL "https://testApp.com/"
#define MyAppExeName "testApp.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{xxx-xxxx-xxxxx-xxx}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=C:\Users\taichi\Desktop
OutputBaseFilename=testAppSetup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
[Code]
/////////////////////////////////////////////////////////////////////
function GetUninstallString(): String;
var
sUnInstPath: String;
sUnInstallString: String;
begin
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
sUnInstallString := '';
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
Result := sUnInstallString;
end;
function GetUninstallString32: string;
var
sUnInstPath: string;
sUnInstallString: String;
begin
Result := '';
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{{A227028A-40D7-4695-8BA9-41DF6A3895C7}_is1'); { Your App GUID/ID }
sUnInstallString := '';
if not RegQueryStringValue(HKLM32, sUnInstPath, 'UninstallString', sUnInstallString) then
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
Result := sUnInstallString;
end;
/////////////////////////////////////////////////////////////////////
function IsUpgrade(): Boolean;
begin
Result := (GetUninstallString() <> '');
end;
function IsUpgrade32(): Boolean;
begin
Result := (GetUninstallString32() <> '');
end;
/////////////////////////////////////////////////////////////////////
function UnInstallOldVersion(): Integer;
var
sUnInstallString: String;
iResultCode: Integer;
begin
// Return Values:
// 1 - uninstall string is empty
// 2 - error executing the UnInstallString
// 3 - successfully executed the UnInstallString
// default return value
Result := 0;
// get the uninstall string of the old app
sUnInstallString := GetUninstallString();
if sUnInstallString <> '' then begin
sUnInstallString := RemoveQuotes(sUnInstallString);
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
Result := 3
else
Result := 2;
end else
Result := 1;
end;
function UnInstallOldVersion32(): Integer;
var
sUnInstallString: String;
iResultCode: Integer;
begin
// Return Values:
// 1 - uninstall string is empty
// 2 - error executing the UnInstallString
// 3 - successfully executed the UnInstallString
// default return value
Result := 0;
sUnInstallString := GetUninstallString32();
if sUnInstallString <> '' then begin
sUnInstallString := RemoveQuotes(sUnInstallString);
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
Result := 3
else
Result := 2;
end else
Result := 1;
end;
/////////////////////////////////////////////////////////////////////
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep=ssInstall) then
begin
if (IsUpgrade()) then
begin
UnInstallOldVersion();
end;
end;
begin
UnInstallOldVersion32();
end;
end;
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Users\taichi\Documents\hold\testAppDevelop\dist\testApp\testApp.exe"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: runasoriginaluser nowait postinstall skipifsilent

Error instantiating chaincode in Hyperledger Fabric 1.1.0

I am trying to instantiate chaincode in Hyperledger Fabric peer 1.1.0. I have downloaded 1.1.0 version fabric samples and docker containers. The fabcar application got instantiated successfully.
However when I instantiate my chaincode, the peer quits with the following error.
2019-06-29 12:01:47.916 UTC [kvledger] CommitWithPvtData -> INFO 042 Channel [mychannel]: Committed block [3] with 1 transaction(s)
panic: assignment to entry in nil map
goroutine 569 [running]:
github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.createCouchdbDocJSON(0xc422170890, 0x6, 0x0, 0x0, 0xc422170898, 0x4, 0x4, 0xc422170ae0, 0xc42001e000, 0xc42001e070, ...)
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:984 +0x1d8
github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*VersionedDB).processUpdateBatch(0xc4215691d0, 0xc4217c7df0, 0x0, 0x0, 0x0, 0xc422170898, 0x4)
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:669 +0x550
github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*VersionedDB).ApplyUpdates.func1(0xc422170eb0, 0xc42000eb68, 0xc4215691d0, 0xc422197140, 0xc422170870, 0x7)
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:577 +0x8a5
created by github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*VersionedDB).ApplyUpdates
/opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:509 +0x11d
As I can see above, it is not taking go code from $GOPATH which is /home/ubuntu/software/golang.
I have installed the fabric and samples using the command.
as mentioned in
https://hyperledger-fabric.readthedocs.io/en/release-1.4/install.html
passing arguments "1.1.0 1.1.0 0.4.15"
I could see that the chaincode init method gets executed from the application logs.
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {
fmt.Println("Init firing.")
// Initialize the collection of commercial paper keys
fmt.Println("Initializing user accounts")
//t.createUser(stub, []string{"importerBank", "importerBank", "Importer Bank"})
//t.createUser(stub, []string{"customs", "customs", "Customs"})
//t.createUser(stub, []string{"exporterBank", "exporterBank", "Exporter Bank"})
//t.createUser(stub, []string{"exporter", "exporter", "Exporter"})
fmt.Println("Initializing LC keys collection if not present")
valAsbytes, err := stub.GetState("LCKeys")
if err == nil {
var keys []string
err = json.Unmarshal(valAsbytes, &keys)
fmt.Println("Existing LC : %v", keys);
if len(keys) > 0 {
for _, key := range keys {
valAsbytes, err := stub.GetState(key)
if err == nil {
var lc LC
err = json.Unmarshal(valAsbytes, &lc)
if err == nil {
if lc.CurrentStatus == "" {
lc.CurrentStatus = "Created"
keysBytesToWrite, _ := json.Marshal(lc)
if err == nil {
err = stub.PutState(key, keysBytesToWrite)
if err != nil {
fmt.Println("Error writing LC to chain" + err.Error())
}
}
}
}
}
}
}
}
fmt.Println("Initialization complete")
I would like to know why the peer quits?
orderer.example.com:
container_name: orderer.example.com
image: hyperledger/fabric-orderer
environment:
ORDERER_GENERAL_LOGLEVEL=debug
ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
ORDERER_GENERAL_GENESISMETHOD=file
ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
ORDERER_GENERAL_LOCALMSPID=OrdererMSP
ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
GODEBUG=netdns=go
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
7050:7050
volumes:
./config/:/etc/hyperledger/configtx
./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer
./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1
networks:
basic
Try adding - GODEBUG=netdns=go in the environment section of the docker compose file for every peer and orderer.

Unable to push metrics in prometheus

I am trying to push metrics in Prometheus using Pushgateway but not able to complete the task.
This is the code:
var client = require('prom-client');
var gateway = new client.Pushgateway('http://localhost:9091');
gateway.pushAdd({ jobName: 'test', group : "production" }, function(err, resp, body){
});
Prometheus config:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'codelab-monitor'
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
scrape_configs:
- job_name: 'example-random'
scrape_interval: 5s
static_configs:
- targets: ['localhost:8080', 'localhost:8081']
labels:
group: 'production'
- targets: ['localhost:8082']
labels:
group: 'canary'
scrape_configs:
- job_name: 'test '
static_configs:
- targets: ['localhost:9091']
You've a few problems with your prometheus config - check out the Prometheus github repo example and the docs for future reference.
One issue is that you have multiple scrape_configs.
You can only have one scrape_configs in your configuration for Prometheus.
Another issue is that each job can only have one static_configs.
The rest is mainly due to incorrect formatting.
The edited config below should work for you now:
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'codelab-monitor'
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'production'
static_configs:
- targets: ['localhost:8080', 'localhost:8081']
labels:
group: 'production'
- job_name: 'canary'
static_configs:
- targets: ['localhost:8082']
labels:
group: 'canary'
- job_name: 'test'
static_configs:
- targets: ['localhost:9091']
It's also important to note that the metrics from the Pushgateway are not pushed to Prometheus. Prometheus is pull based and will pull the metrics from the Pushgateway itself. The metrics the Pushgateway collects are pushed to it by ephemeral and batch jobs.

How to add a scheduled task on network connection/disconnection event with Inno Setup

I want to use Inno Setup for my program installation and I need Inno Setup to create a task in Windows Task Scheduler to launch my program.exe every time the internet connects.
I can do this manually, but I want Inno Setup do this by Schtasks command.
This is my inno setup code(here):
#define MyAppName "Desktop"
#define MyAppVersion "2"
#define MyAppPublisher "MH"
#define MyAppExeName "Desktop.exe"
[Setup]
AppId={{EFBBA2D3-C6F0-4D3D-BBD5-5AF126C3E8E9}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup 2
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "E:\IdeaProjects\Desktop\Desktop.exe"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "schtasks.exe"; \
Parameters: "/Create /TN MyTask /XML ""{tmp}\Task.xml"""; \
StatusMsg: "Scheduling task..."; BeforeInstall: CreateTaskXml
;Flags: runhidden;
[Code]
procedure CreateTaskXml;
var
TaskXml: string;
begin
TaskXml :=
'<?xml version="1.0"?>' + #13#10 +
'<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">'
+ #13#10 +
' <Triggers>' + #13#10 +
{ The EventTrigger here }
' <EventTrigger>' +
' <Enabled>true</Enabled>' +
' <Subscription><QueryList><Query Id="0" Path="Microsoft-Windows-NetworkProfile/Operational"><Select Path="Microsoft-Windows-NetworkProfile/Operational">*[System[Provider[#Name='Microsoft-Windows-NetworkProfile'] and EventID=10000]]</Select></Query></QueryList></Subscription>' +
' </EventTrigger>' +
' </Triggers>' + #13#10 +
{ ... }
' <Actions Context="Author">' + #13#10 +
' <Exec>' + #13#10 +
' <Command>' + ExpandConstant('{app}\{#MyAppExeName}') + '</Command>' + #13#10 +
' </Exec>' + #13#10 +
' </Actions>' + #13#10 +
'</Task>' + #13#10;
if SaveStringToFile(ExpandConstant('{tmp}\Task.xml'), TaskXml, False) then
begin
Log('Task XML successfully created');
end
else
begin
Log('Failed to create task XML');
end;
end;
Can you help me? Thanks.
As with any other obscure scheduling settings, you have to use XML definition of the task.
The easiest is to configure the task in Windows Task Scheduler GUI, select the created task and choose Export command.
It will create an XML definition of the task, which will contain something like:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<!-- ... -->
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
<Subscription><QueryList><Query Id="0" Path="Microsoft-Windows-NetworkProfile/Operational"><Select Path="Microsoft-Windows-NetworkProfile/Operational">*[System[Provider[#Name='NetworkProfile'] and EventID=10000]]</Select></Query></QueryList></Subscription>
</EventTrigger>
</Triggers>
<!-- ... -->
</Task>
Edit the XML to remove everything, what is specific to your computer.
And then use the exported XML as a template for a file, that you will create on the fly in the installer with an actual path to your installed application:
[Run]
Filename: "schtasks.exe"; \
Parameters: "/Create /TN MyTask /XML ""{tmp}\Task.xml"""; \
StatusMsg: "Scheduling task..."; Flags: runhidden; BeforeInstall: CreateTaskXml
[Code]
procedure CreateTaskXml;
var
TaskXml: string;
begin
TaskXml :=
'<?xml version="1.0"?>' + #13#10 +
'<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">'
+ #13#10 +
' <Triggers>' + #13#10 +
{ The EventTrigger here }
' </Triggers>' + #13#10 +
{ ... }
' <Actions Context="Author">' + #13#10 +
' <Exec>' + #13#10 +
' <Command>' + ExpandConstant('{app}\MyProg.exe') + '</Command>' + #13#10 +
' </Exec>' + #13#10 +
' </Actions>' + #13#10 +
'</Task>' + #13#10;
if SaveStringToFile(ExpandConstant('{tmp}\Task.xml'), TaskXml, False) then
begin
Log('Task XML successfully created');
end
else
begin
Log('Failed to create task XML');
end;
end;
The SaveStringToFile function in CreateTaskXml creates the XML in Ansi encoding. If you need Unicode, you have to create the XML in UTF-16 encoding (schtasks does not support UTF-8).

Inno Setup Compiler: How to auto start the default browser with given url?

I am trying to start my default browser (chrome) with a given url:
http://localhost/folder
by using the inno setup compiler for windows
after the installer finishes, i run the wamp manager
what do I have to write in the run section to achive this?
ps:
this app should install a wamp portable collection (apache web server, mysql, php, phpmyadmin)
when the installer finishes, it should start the wamp manager, wait for max 5 seconds, and then it should open de default browser with a given URL
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define WM "Wamp Manager"
#define Exewampmanager "wampmanager.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0BA2F7BC-1EFD-4BF5-A06B-28E003B02760}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\cow1
DefaultGroupName=My Program1
AllowNoIcons=yes
LicenseFile=D:\New Text Document.txt
InfoBeforeFile=D:\New Text Document.txt
InfoAfterFile=D:\New Text Document.txt
OutputDir=D:\inno
OutputBaseFilename=setup2
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "C:\wamp\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Run]
Filename: "{app}\{#Exewampmanager}"; Description: "{cm:LaunchProgram,{#StringChange(WM, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
after hours of research, this is what i have:
and this is not the best version, but this is what i want
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "cow1"
#define MyAppVersion "1.5"
#define MyAppPublisher "my cow, Inc."
#define MyAppURL "http://www.example.com/"
#define WM "Wamp Manager"
#define Exewampmanager "wampmanager.exe"
#define Chrome "Chrome"
#define ExeChrome "chrome.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0BA2F7BC-1EFD-4BF5-A06B-28E003B02760}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\cow1
DefaultGroupName=My Program1
AllowNoIcons=yes
LicenseFile=D:\New Text Document.txt
InfoBeforeFile=D:\New Text Document.txt
InfoAfterFile=D:\New Text Document.txt
OutputDir=D:\inno
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[code]
#IFDEF UNICODE
#DEFINE AW "W"
#ELSE
#DEFINE AW "A"
#ENDIF
const
WAIT_TIMEOUT = $00000102;
SEE_MASK_NOCLOSEPROCESS = $00000040;
type
TShellExecuteInfo = record
cbSize: DWORD;
fMask: Cardinal;
Wnd: HWND;
lpVerb: string;
lpFile: string;
lpParameters: string;
lpDirectory: string;
nShow: Integer;
hInstApp: THandle;
lpIDList: DWORD;
lpClass: string;
hkeyClass: THandle;
dwHotKey: DWORD;
hMonitor: THandle;
hProcess: THandle;
end;
function ShellExecuteEx(var lpExecInfo: TShellExecuteInfo): BOOL;
external 'ShellExecuteEx{#AW}#shell32.dll stdcall';
function WaitForSingleObject(hHandle: THandle; dwMilliseconds: DWORD): DWORD;
external 'WaitForSingleObject#kernel32.dll stdcall';
function TerminateProcess(hProcess: THandle; uExitCode: UINT): BOOL;
external 'TerminateProcess#kernel32.dll stdcall';
function NextButtonClick(CurPageID: Integer): Boolean;
var
ExecInfo: TShellExecuteInfo;
ExecInfoBrowser: TShellExecuteInfo;
begin
Result := True;
if CurPageID = wpFinished then
begin
ExecInfo.cbSize := SizeOf(ExecInfo);
ExecInfo.fMask := SEE_MASK_NOCLOSEPROCESS;
ExecInfo.Wnd := 0;
ExecInfo.lpFile := ExpandConstant('{app}') + '\{#Exewampmanager}';
ExecInfo.nShow := SW_HIDE;
if ShellExecuteEx(ExecInfo) then
begin
if WaitForSingleObject(ExecInfo.hProcess, 7000) = WAIT_TIMEOUT then
begin
ExecInfoBrowser.cbSize := SizeOf(ExecInfo);
ExecInfoBrowser.fMask := SEE_MASK_NOCLOSEPROCESS;
ExecInfoBrowser.Wnd := 0;
ExecInfoBrowser.lpFile := 'http://localhost/cow';
ExecInfoBrowser.nShow := SW_HIDE;
ShellExecuteEx(ExecInfoBrowser);
end;
end;
end;
end;
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
;[Files]
;Source: "C:\wamp\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[Run]
;Filename: "{app}\{#Exewampmanager}"; Description: "{cm:LaunchProgram,{#StringChange(WM, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
To load an URL at the end of the installation in the user's default browser, simply do this:
[Run]
Filename: http://whatever.com/something; Description: "Visit website"; Flags: postinstall shellexec
If you want it to be unticked by default, also add the unchecked flag.

Resources