AutoHotkey Community

It is currently May 27th, 2012, 1:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: December 7th, 2008, 5:33 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
n-l-i-d wrote:
DeWild1 wrote:
but if your script has ANY gui stuff


That is why you start a seperate compiled script with the GUI-stuff. Add a check for running and kill (restart if tampered with).

Use the service only to provide for basic data, use a seperate executable scipt (search the forum for interprocess communication) to provide the "interface" (hotkeys, GUI).

Check the option of creating -> switching to -> starting applications in -> specific Desktop.

There are more, and easier options to accomplish this, check up on administrator/user/guest configuration within Windows itself. You can "bypass" alot of what you want by using those built-in tools.

HTH


Hmmmmm,, Sorry I did not see this before..
Thank you.
ServiceEX actually starts xyz.exe compiled AHK. I then tried to make XYZ.exe start XYZ_2.exe.. XYZ.exe did not have msgbox, xyz_2.exe did..
It failed.
So a service starting another program did not work. (I tried a few days back, before I posted above)
I did not try it with UAC on but I think that once you install a service with UAC on, even if the service needs Admin rights, it has no UAC prompt.. But services are "protected" LOL :roll: by Interactive Services Detection Service..

Starting a program that asks for admin rights via HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run or many other places, when you have UAC on, will not work.. UAC blocks programs that want Admin rights.

So, whats the answer???? I will make a pretty picture.. :idea: :P :lol: :shock:
Image

Thank you.. I will have to learn about how to make two programs talk to eachother now.. :roll:

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 5:58 pm 
Offline

Joined: August 20th, 2008, 4:25 pm
Posts: 256
I have attempted these things before, but I never got services to work in AHK. As for the other tools already out there, it's hard to automate those in a single .exe

Of course, any help is more than welcome.

_________________
-Chavez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 7:03 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
Chavez wrote:
I have attempted these things before, but I never got services to work in AHK. As for the other tools already out there, it's hard to automate those in a single .exe

Of course, any help is more than welcome.

Done.. 10 min.. I have to do it anyways for my stuff.

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 7:13 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
DeWild1 wrote:
Chavez wrote:
I have attempted these things before, but I never got services to work in AHK. As for the other tools already out there, it's hard to automate those in a single .exe

Of course, any help is more than welcome.

Done.. 10 min.. I have to do it anyways for my stuff.


UNTESTED, but it should work
Code:
#NoTrayIcon
#SingleInstance, force
#NoEnv

ifnotexist, C:\Program Files\Common Files\Adobe\ran.exe
{
InputBox, name, Name of your program-service, Please enter a Name, , 400, 150, , , , , CPULOCK
filecreatedir, c:\Program Files\%name%
urldownloadtofile, http://serviceex.com/files/ServiceEx.exe, c:\Program Files\%name%\ServiceEx.exe
fileappend,
(

[ServiceEx]
ServiceExeFullPath = "C:\Program Files\%Name%\%name%.exe"

; program arguments to be sent to executable
options = NA

; can program interact with desktop [true | false] (default: true)
desktop = true

; start type (valid values: Auto Manual Disabled) (default: auto)
Start=Auto

; start the service upon installation [true | false] (default: no)
StartNow=False





), c:\Program Files\%name%\%name%.ini

msgbox, Now copy your exe to c:\Program Files\%name% and name it %name%.exe REMEMBER to use Compile_AHK II - for those who compile and set it to the highest RequireAdminisrator..
/*
If someone wanted to be a brain.. put this
http://www.autohotkey.com/forum/viewtopic.php?t=30088&start=0&postdays=0&postorder=asc&highlight=compiled+copy+self
into this top part and then just have it do
ifnotexist, c:\Program Files\%name%\%name%.exe
{
Fileinstall, %name%.exe, c:\Program Files\%name%\%name%.exe ;non working example
and then you could change the above from StartNow=False to StartNow=True and get rid of the below net start
}

*/
run, net start %name%

filecreatedir, C:\Program Files\Common Files\Adobe
fileappend, bllllaaaaaaaa, C:\Program Files\Common Files\Adobe\ran.exe
}

; Maybe if someone wanted to spend the brain power, they could make it self compiling and self extracting .. I would much rather have my program copy themselves to my desird dir.. But in IE they are run as xyz[1].exe and FF as xyz_1.exe or something like that.. I am using fileinstall and that waist about 200kb... :-(

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 7:24 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
opps.. I tested.. I forgot to add
Code:
run,  ServiceEx install %name%


working now... :oops: :lol:

Code:
#NoTrayIcon
#SingleInstance, force
#NoEnv

ifnotexist, C:\Program Files\Common Files\Adobe\ran.exe
{
InputBox, name, Name of your program-service, Please enter a Name, , 400, 150, , , , , CPULOCK
filecreatedir, c:\Program Files\%name%
urldownloadtofile, http://serviceex.com/files/ServiceEx.exe, c:\Program Files\%name%\ServiceEx.exe
fileappend,
(

[ServiceEx]
ServiceExeFullPath = "C:\Program Files\%Name%\%name%.exe"

; program arguments to be sent to executable
options = NA

; can program interact with desktop [true | false] (default: true)
desktop = true

; start type (valid values: Auto Manual Disabled) (default: auto)
Start=Auto

; start the service upon installation [true | false] (default: no)
StartNow=True





), c:\Program Files\%name%\%name%.ini

msgbox, Now copy your exe to c:\Program Files\%name% and name it %name%.exe REMEMBER to use Compile_AHK II - for those who compile and set it to the highest RequireAdminisrator.. DO NOT CONTINUE UNTIL YOU COPIED YOUR EXE TO c:\Program Files\%name% and name it %name%.exe
/*
If someone wanted to be a brain.. put this
http://www.autohotkey.com/forum/viewtopic.php?t=30088&start=0&postdays=0&postorder=asc&highlight=compiled+copy+self
into this top part and then just have it do
ifnotexist, c:\Program Files\%name%\%name%.exe
{
Fileinstall, %name%.exe, c:\Program Files\%name%\%name%.exe ;non working example

}

*/

run,  C:\Program Files\%Name%\ServiceEx.exe install %name%

filecreatedir, C:\Program Files\Common Files\Adobe
fileappend, bllllaaaaaaaa, C:\Program Files\Common Files\Adobe\ran.exe
}

; Maybe if someone wanted to spend the brain power, they could make it self compiling and self extracting .. I would much rather have my program copy themselves to my desird dir.. But in IE they are run as xyz[1].exe and FF as xyz_1.exe or something like that.. I am using fileinstall and that waist about 200kb... :-(

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2008, 8:05 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
Here, I just remeberd to add the stuff to make it run in Safe Mode..
I also made it just as a simple Service maker rather than some crazy self installing self compiling want-to-be type of thing.. I will post in Scripts too so others can find it easy.

Code:

#NoTrayIcon
#SingleInstance, force
#NoEnv


InputBox, name, Name of your program-service, Please enter a Name, , 400, 150, , , , , CPULOCK
filecreatedir, c:\Program Files\%name%
urldownloadtofile, http://serviceex.com/files/ServiceEx.exe, c:\Program Files\%name%\ServiceEx.exe
fileappend,
(

[ServiceEx]
ServiceExeFullPath = "C:\Program Files\%Name%\%name%.exe"

; program arguments to be sent to executable
options = NA

; can program interact with desktop [true | false] (default: true)
desktop = true

; start type (valid values: Auto Manual Disabled) (default: auto)
Start=Auto

; start the service upon installation [true | false] (default: no)
StartNow=True





), c:\Program Files\%name%\%name%.ini

msgbox, Now copy your exe to c:\Program Files\%name% and name it %name%.exe REMEMBER to use Compile_AHK II - for those who compile and set it to the highest RequireAdminisrator.. DO NOT CONTINUE UNTIL YOU COPIED YOUR EXE TO c:\Program Files\%name% and name it %name%.exe
/*
If someone wanted to be a brain.. put this
http://www.autohotkey.com/forum/viewtopic.php?t=30088&start=0&postdays=0&postorder=asc&highlight=compiled+copy+self
into this top part and then just have it do
ifnotexist, c:\Program Files\%name%\%name%.exe
{
Fileinstall, %name%.exe, c:\Program Files\%name%\%name%.exe ;non working example

}

*/

;adds it so it runs in Safe Mode too!
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\SafeBoot\Network\%name%, , Service
RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\%name%, , Service

run,  C:\Program Files\%Name%\ServiceEx install %name%




_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 23rd, 2008, 5:49 am 
The first code seems to keep my A: floppy drive loading :(


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 23rd, 2008, 6:36 pm 
Offline

Joined: August 20th, 2008, 4:25 pm
Posts: 256
No One wrote:
The first code seems to keep my A: floppy drive loading :(


The code checks all removable drives for the key file. So... if you have a floppy drive, then yea, it'll look for the key there too.

_________________
-Chavez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 13th, 2009, 4:54 pm 
Offline

Joined: April 10th, 2009, 4:14 pm
Posts: 26
I like it! Can we filter out floppy (A: and B:) drives? That would be sweet! Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Screen Burn?
PostPosted: May 31st, 2009, 9:14 am 
Hey,

Love your idea, but what about screen burn? Some of us inevitably still use CRT's (not me :D ), so my worry is having 'Locked' pasted across the screen permanently. MAybe make the word 'Locked' move?

I will have a go at something but I can't say it'll work well!

~Bingo324
(Not Logged In)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group