Deactivating the layer when application is closed
This issue has been solved. See solution.
HI,
I am using SVS for most of my applications. there are some applications which i use for FTP connection, download manager and when i close the application it should deactivate the layer.
I don't want this for every layer, so the setting should be per layer not global.
I believe we can do this, but i don't know how...
can any one help me on this...
Thanks...
You cannot set this in a normal way but would have to use some kind of script based flow to deactive the layer when the application process ends.
Have a look at Activate and Launch in a Single Step
if you know the apps process name (like acro32.exe or winword.exe) that's running in the layer you can write a VB script to kill those process upon a layer deactivate using the OnEvent onPostDeactivate.
If a forum post solves your problem please flag is as the solution
I you like an article, blog post or download vote it up
Thanks AngelD and Spriggan
i tried the script but i think i need to look deep to work it in Vista
Spriggan can u provide more info regarding OnEvent and PostDeactivate; it will be gr8 if you can provide some link for same.
Regards,
arjain
www.syspanacea.com
Have a look at
Getting More from SVS's onEvent Functionality
Where Do Changes Made by an onEvent Action Go?
You can also type in search terms such as "OnPostDeActivate" in the search field on the Juice and get access to previous discussions on related topics.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
actually thinking about it on post deactivate wouldn't work because you're wanting the layer to deactivate when the app is closed and post deactivate won't work unless you deactivate the layer.
Sorry, was thining something different when I replied last time.
If a forum post solves your problem please flag is as the solution
I you like an article, blog post or download vote it up
Looks like what is needed is a "launcher" shortcut, which would have to be in the base layer. This shortcut would activate the layer, then start the application, and wait until the application closes, then deactivate the layer again, before terminating.
I don't think this can be done within a layer as a layer cannot activate itself or deactivate itself.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
i believe its not possible with OnPOstDeactivate,
i tried a different approach by creating a batch file
svscmd orca activate
start "c:\Program Files\Orca\Orca.exe" /wait
svscmd orca d -f
here orca is layer i want to activate
but the problem is start is opening a cmd prompt window.
Regards,
arjain
www.syspanacea.com
So, did you try to "solution" (link) I provided at my first reply?
HI AngelD
i checked on Xp machine, its working good but it can not handle the layer which require Deactivate with force.
i need to check its functionality for Vista too.
Regards,
arjain
www.syspanacea.com
The script should deactive the layer even if any virtual process is currently running as "True" is defined in the DeactivateLayer function.
Hey, you can use a simple AutoIt Script.
;-------------------------------
If $CmdLine[0] > 0 Then
$Layer = $CmdLine[1]
Run(@ComSpec & " /c " & 'svscmd.exe ' & $Layer & ' d -f', "", @SW_HIDE)
EndIf
;-------------------------------
e.g. compile to End.exe
End.exe orca
don´t forget Space e.g.
End.exe "Test Layer"
greeting Thunder-man
svsload.com
Google English…
SVSLoad.com
hi Thunder-man,
i created the exe, it works well for deactivating the layer
but i am trying
1. activate the layer
2. work on the layer
3. on closing the application, layer should get closed....
AngelD has provided the link but it does not work well when deactivating with force....
Regards,
arjain
www.syspanacea.com
Hey HHH, that is also easy.
Compile the Script to wait.exe
Make a Desktop Icon e.g.
wait "LayerName" "Path to run the exe from Layer"
e.g.
Path... wait "IconFX" "C:\Programme\IcoFX 1.6\IcoFX.exe" (By me)
The wait.exe activate the Layer, become the PID (Process ID) and waitclose.
Greeting
Thunder-man
(Rename wait.txt to wait.au3)
Google English…
SVSLoad.com
Hy, I have write "Layer - Shortcut"
This Tool created a Shortcut for SVS Layer.
Activate the layer, start Program from Layer, wait for close and deactivate the Layer ...
http://svsload.com/wd/layer-shortcut/
Google English…
SVSLoad.com
thanks Thunder man, this is what i am exactly looking for.
in data folder there is ini file can we edit this ini to customize the icon of shorcut.
or by default if the tool can pic the icon from selected exe...
this is just an enhancement, once again thanks a lot.
Regards,
arjain
www.syspanacea.com
Hey Thunder man i got how to change icon
actually because of my very less German language knowledge i could not under stand the page information, after using google translator i got the point to use ICOFx.
Thanks again.
Regards,
arjain
www.syspanacea.com
Hi HHH,
the Tool can not pic the icon from exe, because there is no exe File, when the Layer is not active.
The desktop icon can be as normal as any other icon also be amended. (Activate the Layer before)
Click the icon and press [Alt] + [Enter]
(or right mouse button / Properties)
(With "ICOFx" you can extract the Icon from a exe File, e.g. Firefox)
Greeting
Thunder-man
Google English…
SVSLoad.com
Downloaded 'layer-shortcut'
Downloaded 'layer-shortcut' and got a bunch of virus alerts for the 'autorun worm' virus when I tried to unzip.
i am using Symantec Internet
i am using Symantec Internet security 2009, it has never alerted me on my system
Regards,
arjain
www.syspanacea.com
No Virus
I write the Tool with AutoIT.
Some virus programs, unfortunately, incorrectly reported a virus
Greeting
Thunder-man
Google English…
SVSLoad.com
Would you like to reply?
Login or Register to post your comment.