Sign in to follow this  
Followers 0
UltraFine

creating a installer in autoit but don't know how to show it in Control Panel and StartMenu

9 posts in this topic

hi, i want to create my own installer in Autoit instead of using a freeware/commercial software for this purpose.

but my problem is that i don't know how to show a program in Control Panel (Add remove programs) and it's files in StartMenu Folder. can any of you help me to know about it and how to do it?

thanks for reading and reply in advance!

Share this post


Link to post
Share on other sites



u have to play around with the register of the system

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I made this for my program , it has a lot of comments , copy and paste w.e you need, you will have to change some things tho :P

for the full thing go here!

regWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My Diary!", 'UninstallString', 'REG_SZ', $change_dir & "/" & $name & "/Uninstaller.exe") ; Where is the uninstaller?? ---- For Add and Remove Programs
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My Diary!", 'DisplayName', 'REG_SZ', "My Diary!") ;Name To show on Add and Remove Programs
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My Diary!", 'DisplayIcon', 'REG_SZ', $change_dir & "/" & $name & "/Diary.ico") ; icon For Add and Remove Programs
RegWrite('HKEY_CLASSES_ROOT\.dd', '', 'REG_SZ', 'Diary_Document_File') ; File Accosiation
RegWrite('HKEY_CLASSES_ROOT\Diary_Document_File', '', 'REG_SZ', 'Diary Document'); File Accosiation
RegWrite('HKEY_CLASSES_ROOT\Diary_Document_File\shell\Open', '', 'REG_SZ', '&Open'); File Accosiation
RegWrite('HKEY_CLASSES_ROOT\Diary_Document_File\shell\Open\command', '', 'REG_SZ', $change_dir & "/" & $name & "/My Diary!.exe %1 %*"); File Accosiation
RegWrite('HKEY_CLASSES_ROOT\Diary_Document_File\DefaultIcon', '', 'REG_SZ', $change_dir & "/" & $name & "/Diary.ico"); File Accosiation
FileCreateShortcut($change_dir & "/" & $name & "/My Diary!.exe", @DesktopDir & "\My Diary.lnk") ;Shortcuts
FileCreateShortcut($change_dir & "/" & $name & "/My Diary!.exe", @StartMenuCommonDir & "/" & $name & "/My Diary!.ink");Shortcuts
FileCreateShortcut($change_dir & "/" & $name & "/Uninstaller.exe", @StartMenuCommonDir & "/" & $name & "/Uninstaller.ink");Shortcuts
Sleep(1000) ; Add a little sleep , Remove if you want it to go faster
Edited by DexterMorgan

code

Share this post


Link to post
Share on other sites

what is "Accosiation" ?

Share this post


Link to post
Share on other sites

what is "Accosiation" ?

like a .doc is associated with Microsoft word, in this case .dd is associated with my program :P

code

Share this post


Link to post
Share on other sites

i could not get it in my mind can you tell me more and explain how it works and what is the whole procedure?

Also

how can i delete a folder in which exe itself is running?

the following was not successful

$File = "C:\App\L0ve_UK.exe"
DirRemove($File)
FileDelete($File)

Thanks for the help mate,

Share this post


Link to post
Share on other sites

hi, i want to create my own installer in Autoit instead of using a freeware/commercial software for this purpose.

but my problem is that i don't know how to show a program in Control Panel (Add remove programs)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram]
"DisplayName"="MyProgram v1.0"
"UninstallString"="C:\\Program Files\\MyProgram\\Uninstall.exe"
"DisplayIcon"="C:\\Program Files\\MyProgram\\MyProgram.exe,0"
"URLInfoAbout"="http://www.mysite.com/MyProgram"
"Publisher"="Banana soft"
"NoModify"=dword:00000001
"NoRepair"=dword:00000001

and it's files in StartMenu Folder. can any of you help me to know about it and how to do it?

C:\Documents and Settings\All Users\Main menu\Programs\

Share this post


Link to post
Share on other sites

how can i delete a folder in which exe itself is running?

:P Only after closing this exe.

Share this post


Link to post
Share on other sites

how can i delete a folder in which exe itself is running?

1) sorry for a bump (its only on the second page :P)

you can first use the selfdelete function which will delete the exe that is running then use dirremove() to remove the folder


code

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0