patlal Posted November 1, 2010 Share Posted November 1, 2010 Hi, I would like to know if there a way to run an autoit script silently. Let me explain. I created a script for installing an application automatically (unattended install). That's work fine, but I still see the windows during the install process. I would like to have something really silent. I tried some macros like @SW_HIDE or @SW_SHOWMINIMIZED but it doesn't work. I am sure that's possible but I can't find how Any help will be welcome. Thanks, Patrice Link to comment Share on other sites More sharing options...
hessebou Posted November 1, 2010 Share Posted November 1, 2010 maybe you can try winmove to some coordinates "outside" the real screen. Link to comment Share on other sites More sharing options...
patlal Posted November 1, 2010 Author Share Posted November 1, 2010 I have not test winmove but following a post on this forum I tried this (see code below) It works well but I still windows despite the @SW_HIDE. What did I miss ? #region ---Au3Recorder generated code Start --- Opt("WinWaitDelay",100) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Run('C:\Users\pat\Downloads\prey-0.4.4-win.exe') WinWait("Prey 0.4.4 Installer","Welcome to the Prey ") WinSetState("Prey 0.4.4 Installer","Welcome to the Prey ", @SW_HIDE) ControlClick("Prey 0.4.4 Installer","Welcome to the Prey ","Button2") ControlClick("Prey 0.4.4 Installer ","Prey 0.4.4 Installer","Button2") ControlClick("Prey 0.4.4 Installer ","Prey 0.4.4 Installer","Button2") ControlClick("Prey 0.4.4 Installer ","Prey 0.4.4 Installer","Button2") While ControlGetText("Prey 0.4.4 Installer ","Completing the Prey ", "Button2") <> "&Finish" Sleep(10) WEnd ControlClick("Prey 0.4.4 Installer ","Completing the Prey ","Button4") ControlClick("Prey 0.4.4 Installer ","Completing the Prey ","Button2") #endregion --- Au3Recorder generated code End --- Link to comment Share on other sites More sharing options...
Bert Posted November 1, 2010 Share Posted November 1, 2010 You can easily do a silent install if your app supports command line switches. On many installers, using the /q switch will do a silent install The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
hessebou Posted November 1, 2010 Share Posted November 1, 2010 maybe its something with the userrights. try to start your script with #requireadmin and see if now the sw_hide works correctly. Link to comment Share on other sites More sharing options...
wakillon Posted November 1, 2010 Share Posted November 1, 2010 It's a NSIS Installer So, try the switch /S AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
patlal Posted November 1, 2010 Author Share Posted November 1, 2010 You can easily do a silent install if your app supports command line switches. On many installers, using the /q switch will do a silent installIndeed and I can say I know pretty well the different silent switches from all the installers (msi, NSIS, Nullsoft etc.) but some softwares doesn't allow silent install or some others doesn't react well, as for Prey where the silent switch works not so good.Thanks anyway Patrice Link to comment Share on other sites More sharing options...
patlal Posted November 1, 2010 Author Share Posted November 1, 2010 It's a NSIS InstallerSo, try the switch /S As I said in a precedent post the ilent switch /S for Prey doesn't work well.It install Prey silently but after that you've got nothing (no shortcuts) to start the config except going in Program Files\Prey\... etc and lauching manually the config.Thanks anyway.Patrice Link to comment Share on other sites More sharing options...
patlal Posted November 1, 2010 Author Share Posted November 1, 2010 maybe its something with the userrights.try to start your script with#requireadminand see if now the sw_hide works correctly.Seems to be a good idea, but it doesn't change the fact that I can see the windows during the installation process.Good try Thanks,Patrice Link to comment Share on other sites More sharing options...
somdcomputerguy Posted November 1, 2010 Share Posted November 1, 2010 Interesting program. I came across this also interesting post there.. mmm interesting, to spy without using a trojan, I'll put it in the notebook of a friend q is good to see if he takes pictures when you change the thong XD - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
wakillon Posted November 1, 2010 Share Posted November 1, 2010 (edited) It's normal if you don't find any shorcut after install !read the faq : http://preyproject.com/faqI installed Prey but I can’t find any icon to launch it. Is something wrong? The reason you’re not seeing anything is because Prey is made that way, so that the thief won’t be able to detect it. The best way to check if everything is fine is to log into your Control Panel (through the link sent to your email) and make sure your device’s status is OK. You can also mark it as missing and enable some of the report modules to see how it will work in real action.Once you get a report, you can safely delete it and set back the status from missing to OK.use FileCreateShortcut to add a shortcut ! Edited November 1, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
patlal Posted November 1, 2010 Author Share Posted November 1, 2010 It's normal if you don't find any shorcut after install !read the faq : http://preyproject.com/faquse FileCreateShortcut to add a shortcut ! Yes, I saw that. But when you make a normal install (without using the silent switch /S), once the install is finished you can find a folder Prey if you click on the "Windows Start" button, then click on "AllPrograms" and then scroll down to the Prey Folder (where you find 2 entries, one for config the other for uninstalling Prey). If you make a silent install, you've got ... nada Actually, I was not clear when I was talking about shortcuts. As you certainly noticed, english is not my first language.Anyway, I would like to find a way with autoIt because it will be very useful for some others programs. I know that I am very close, but I just don't understand what's wrong.Thanks for your help,Patrice Link to comment Share on other sites More sharing options...
wakillon Posted November 1, 2010 Share Posted November 1, 2010 (edited) Don't worry about shortcut, try like this :$_PreySetupPath = @DesktopDir & '\prey-0.4.4-win.exe' RunWait ( $_PreySetupPath & ' /S' ) _CreateShortcut ( @ProgramsDir, 'Configure Prey', @HomeDrive & '\Prey\platform\windows\prey-config.exe', 'Prey by Pat' ) _CreateShortcut ( @ProgramsDir, 'Uninstall', @HomeDrive & '\Prey\platform\windows\Uninstall.exe', 'Prey by Pat' ) Func _CreateShortcut ( $_ShortcutDir, $_LnkTitle, $_FilePath, $_FolderName='', $_Parameters='', $_IconPath='', $_IconNumber='' ) If $_FolderName <> '' Then DirCreate ( $_ShortcutDir & "\" & $_FolderName ) $_FolderName = $_FolderName & "\" EndIf $_LnkPath = $_ShortcutDir & "\" & $_FolderName & $_LnkTitle If Not FileExists ( $_IconPath ) Or $_IconNumber ='' Then $_IconPath = $_FilePath $_WorkingPath = StringLeft ( $_FilePath, StringInStr ( $_FilePath, "\", 0, -1 ) - 1 ) If @error Then $_WorkingPath = '' FileCreateShortcut ( $_FilePath, $_LnkPath, $_WorkingPath, $_Parameters, "", $_IconPath, "n", $_IconNumber, @SW_SHOWNORMAL ) EndFunc ;==> _CreateShortcut ( )moi non plus, english is not my first language. Edited November 1, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
patlal Posted November 1, 2010 Author Share Posted November 1, 2010 (edited) Don't worry about shortcut, try like this : $_PreySetupPath = @DesktopDir & '\prey-0.4.4-win.exe' RunWait ( $_PreySetupPath & ' /S' ) _CreateShortcut ( @ProgramsDir, 'Configure Prey', @HomeDrive & '\Prey\platform\windows\prey-config.exe', 'Prey by Pat' ) _CreateShortcut ( @ProgramsDir, 'Uninstall', @HomeDrive & '\Prey\platform\windows\Uninstall.exe', 'Prey by Pat' ) Func _CreateShortcut ( $_ShortcutDir, $_LnkTitle, $_FilePath, $_FolderName='', $_Parameters='', $_IconPath='', $_IconNumber='' ) If $_FolderName <> '' Then DirCreate ( $_ShortcutDir & "\" & $_FolderName ) $_FolderName = $_FolderName & "\" EndIf $_LnkPath = $_ShortcutDir & "\" & $_FolderName & $_LnkTitle If Not FileExists ( $_IconPath ) Or $_IconNumber ='' Then $_IconPath = $_FilePath $_WorkingPath = StringLeft ( $_FilePath, StringInStr ( $_FilePath, "\", 0, -1 ) - 1 ) If @error Then $_WorkingPath = '' FileCreateShortcut ( $_FilePath, $_LnkPath, $_WorkingPath, $_Parameters, "", $_IconPath, "n", $_IconNumber, @SW_SHOWNORMAL ) EndFunc ;==> _CreateShortcut ( ) moi non plus, english is not my first language. Between french merci beaucoup I won't have anymore time today but I will test that tomorrow for sure. That's very kind of you. Bon, finalement, je n'ai pas pu m'empêcher de tester... It works perfectly Thank you so much. Patrice Edited November 1, 2010 by patlal Link to comment Share on other sites More sharing options...
azazelcrack Posted November 2, 2013 Share Posted November 2, 2013 (edited) Hi patlaland wakillon, my laptop was stolen but I have access by logmein and I need to run a scritp like you told above. Please could you let me know the whole scritp to install and register silently Prey project? One more thing, if UAC is enabled, is there a way to install Prey script without any prompt from UAC? Salut Seeker et Tiny Outils Coder, mon portable a été volé mais je n'ai accès par LogMeIn et j'ai besoin d'exécuter un scritp comme vous avez dit ci-dessus. Pourriez-vous m'indiquer l'ensemble scritp pour installer et enregistrer silencieusement projet Prey? Une dernière chose, si l'UAC est activé, est-il un moyen d'installer le script de Prey sans aucune demande de confirmation de l'UAC? English and French are not my 1st language too. Thanks so much!! Edited November 2, 2013 by azazelcrack Link to comment Share on other sites More sharing options...
MHz Posted November 2, 2013 Share Posted November 2, 2013 Good one. Got a laugh from me. You have to be joking? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 2, 2013 Moderators Share Posted November 2, 2013 azazelcrack,While I sympathise with your predicament, there is no way we are going to discuss silently installing Prey. Thread locked. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts