furso Posted September 23, 2006 Share Posted September 23, 2006 Ive recently made a script to install a few programs that works when its in .au3 format but does not install the programs when compiled to exe, it runs thru the script without errors, except at the end when it needs to run the installed program, im a bit new to this so my script is a bit messy: expandcollapse popup#include <file.au3> #include-once "D:\Sam's Folder\Sam's Tool kit\Sam's tool kit BETA 1.5.exe" #include-once "D:\Sam's Folder\Sam's Tool kit\registration.exe" #include-once "D:\Sam's Folder\Sam's Tool kit\uninstaller.exe" $renistall = "0" $installed = regread("HKEY_LOCAL_MACHINE\SOFTWARE\Sam's tool kit beta\installdir", "installed") if $installed = "1" Then $renistall = msgbox(4, "already installed", "Sam's Toolkit is already installed on your system, would you like to reinstal or repair an old installation?") endif if $renistall = 7 Then exit endif $msg1 = 2 $while = 0 $instal = msgbox(4, "Installation", "welcome to the Sam's toolkit beta instalation wizard would you like to install sam's toolkit now?") if $instal = 7 then Exit EndIf while $while = 0 $installdir = FileSelectFolder("Please specify the destination folder, thankyou.", "", "1") if @error = 1 then $msg1 = msgbox(4,"error", "you have not selected a destination, would you like to quit the intstalation?") else $while = 1 endif if $msg1 = 6 Then exit elseif $msg1 = 7 then $while = 0 endif Wend DirCreate ( $installdir ) FileInstall ("D:\Sam's Folder\Sam's Tool kit\Sam's tool kit BETA 1.5.exe", $installdir, 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\registration.exe", $installdir, 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\uninstaller.exe", $installdir, 1) regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Sam's tool kit beta\installdir", "installed", "REG_SZ", "1") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Sam's tool kit beta\installdir", "install directory", "REG_SZ", $installdir) msgbox(0, "instalation complete", "thankyou for installing sam's tool kit") $msg2 = msgbox(4, "please register", "would you like to run the registration program, this is required to use sam's toolkit") if $msg2 = 6 Then run($installdir&"\registration.exe") exit endif could sum1 please help, thanks Link to comment Share on other sites More sharing options...
The Kandie Man Posted September 23, 2006 Share Posted September 23, 2006 (edited) Does it install all the files correctly and just not run the program at the end or does it not install all the files correctly in addition to not running the program at the end? Edited September 23, 2006 by The Kandie Man "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 24, 2006 Share Posted September 24, 2006 Ive recently made a script to install a few programs that works when its in .au3 format but does not install the programs when compiled to exe, it runs thru the script without errors, except at the end when it needs to run the installed program, im a bit new to this so my script is a bit messy: CODE #include <file.au3> #include-once "D:\Sam's Folder\Sam's Tool kit\Sam's tool kit BETA 1.5.exe" #include-once "D:\Sam's Folder\Sam's Tool kit\registration.exe" #include-once "D:\Sam's Folder\Sam's Tool kit\uninstaller.exe" $renistall = "0" $installed = regread("HKEY_LOCAL_MACHINE\SOFTWARE\Sam's tool kit beta\installdir", "installed") if $installed = "1" Then $renistall = msgbox(4, "already installed", "Sam's Toolkit is already installed on your system, would you like to reinstal or repair an old installation?") endif if $renistall = 7 Then exit endif $msg1 = 2 $while = 0 $instal = msgbox(4, "Installation", "welcome to the Sam's toolkit beta instalation wizard would you like to install sam's toolkit now?") if $instal = 7 then Exit EndIf while $while = 0 $installdir = FileSelectFolder("Please specify the destination folder, thankyou.", "", "1") if @error = 1 then $msg1 = msgbox(4,"error", "you have not selected a destination, would you like to quit the intstalation?") else $while = 1 endif if $msg1 = 6 Then exit elseif $msg1 = 7 then $while = 0 endif Wend DirCreate ( $installdir ) FileInstall ("D:\Sam's Folder\Sam's Tool kit\Sam's tool kit BETA 1.5.exe", $installdir, 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\registration.exe", $installdir, 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\uninstaller.exe", $installdir, 1) regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\Sam's tool kit beta\installdir", "installed", "REG_SZ", "1") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Sam's tool kit beta\installdir", "install directory", "REG_SZ", $installdir) msgbox(0, "instalation complete", "thankyou for installing sam's tool kit") $msg2 = msgbox(4, "please register", "would you like to run the registration program, this is required to use sam's toolkit") if $msg2 = 6 Then run($installdir&"\registration.exe") exit endif could sum1 please help, thanks You've got some helpfile reading to do... First, your use of #include-once with a file parameter: That doesn't do anything. The #include-once keyword accepts no parameters and only need be listed once. All it does is prevent multiple declaration of functions. It has nothing to do with FileInstall() functioning. I'm not on a Windows box, so can't test the theory, but I think you need the full file path, not just the folder, for the destination. Perhaps: FileInstall ("D:\Sam's Folder\Sam's Tool kit\Sam's tool kit BETA 1.5.exe", $installdir & "\Sam's tool kit BETA 1.5.exe", 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\registration.exe", $installdir & "\registration.exe", 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\uninstaller.exe", $installdir & "\uninstaller.exe", 1) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
MHz Posted September 24, 2006 Share Posted September 24, 2006 The destination path with trailing backslash. This can be a variable.Some examplesInvalid: C:\TempValid: C:\Temp\Valid: C:\Temp\MyFile.txt Link to comment Share on other sites More sharing options...
furso Posted September 24, 2006 Author Share Posted September 24, 2006 You've got some helpfile reading to do... First, your use of #include-once with a file parameter: That doesn't do anything. The #include-once keyword accepts no parameters and only need be listed once. All it does is prevent multiple declaration of functions. It has nothing to do with FileInstall() functioning. I'm not on a Windows box, so can't test the theory, but I think you need the full file path, not just the folder, for the destination. Perhaps: FileInstall ("D:\Sam's Folder\Sam's Tool kit\Sam's tool kit BETA 1.5.exe", $installdir & "\Sam's tool kit BETA 1.5.exe", 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\registration.exe", $installdir & "\registration.exe", 1) FileInstall ("D:\Sam's Folder\Sam's Tool kit\uninstaller.exe", $installdir & "\uninstaller.exe", 1) Thanks heaps, its workin now, as for the include once things, it was a desperate attempt to get things 2 work, i new it probly wouldn't help. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 25, 2006 Share Posted September 25, 2006 Thanks heaps, its workin now, as for the include once things, it was a desperate attempt to get things 2 work, i new it probly wouldn't help. You're welcome, glad it works! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now