autohotkey


Close duplicate 32 or 64 bit application


I've released a small application to a couple of my friends. Some of them needed a 32-bit version. If you have a 64-bit OS you can run both applications 64 and 32bit. This would create a duplicate.
The question that comes to my mind is, can I prevent the same application from running twice?
--- Solution approach ---
I have tried working with WinExist creating a If-Statement at the very beginning and checking whether or not ahk_exe MyApplicationName.exe exists. This functions fails to succeed whenever the user changes the file name however.
I have also tried creating a .txt file inside the Temp folder, leaving behind the currents application Unique-ID so I could close the duplicate. This does not seem to be sufficient for me however, as this method allows the user to alter the ID and bypass it.
--- Final words ---
Any other ideas on how one could prevent the user from running both versions at the same time?
Try adding this to the auto-execute section of the 32-bit version:
If (A_Is64bitOS)
ExitApp

Related Links

Trying to make a script that takes first word from a txt file, writes it, repeat till all words written
get a pid using a list of handles for a particular process
Combine several hotkeys into hotstring
Autohotkey - Different commands when different programs are active
autohotkey: create a gui window that shows the hotkeys
Basic Autohotkey not evaluating variable
Get AutoHotKey to do keyboard shortcut when mouse in certain position
Autohotkey - 3 keypresses?
Unstoppable script Issue
AutoHotKey FileCopy Error 1
AUTOHOTKEY - How can I get a hotstring to initiate without a preceding space?
How to put a “/” in AutoHotKey?
Autohotkey loop sequence with idle reset
Maximized to Maximum Size
AHK help. Is there anyway to make this more efficient?
how to use Google speech to text api in Auto Hot Key scripting?

Categories

HOME
itunesconnect
domain-driven-design
oracle-sqldeveloper
apache-storm
android-ndk
watson-iot
redhawksdr
esxi
download
uml-designer
pdf-generation
subprocess
jetbrains
xmlhttprequest
webseal
tag-cloud
k-means
android-actionbar
virtuemart
geography
hapijs
indri
civicrm
draw2d
django-rest-auth
hl7-fhir
ampscript
url-parameters
formulas
dev-c++
lotusscript
multipart
bootstrap-accordion
my.cnf
suitescript
symlink
android-cursorloader
ballerinalang
setup-project
dynamic-memory-allocation
windows-10-mobile
custom-fields
recreate
mobile-development
lines
storefront
rtos
minitest
geocomplete
certbot
abide
mapquest
lfe
redbean
aspnetboilerplate
autodesk-data-management
binary-decision-diagram
weld
import.io
e4
cc
overhead
esprima
firebase-polymer
papyrus
kik
avi
page-flipping
cloud-storage
borland-c++
xml-simple
vspackage
nfa
attiny
dirname
indic
im4java
django-tests
image-preloader
connections
html5-filesystem
maven-javadoc-plugin
ardor3d
xcode5.1
scidb
ia-32
violation
maven-webstart-plugin
spawn
architectural-patterns
dnsbl
gssapi
report-viewer2010
derived-class
pdf-reader
idtabs
mcpd
isgl3d
vectorwise
meego-harmattan
memory-consumption

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App