Jump to content

Recommended Posts

Posted

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 :graduated:

Any help will be welcome.

Thanks,

Patrice

Posted

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 ---

Posted

  On 11/1/2010 at 2:19 PM, 'MPH said:

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

Indeed 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 :graduated:

Patrice

Posted

  On 11/1/2010 at 3:56 PM, 'wakillon said:

It's a NSIS Installer

So, try the switch /S :graduated:

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

Posted

  On 11/1/2010 at 3:26 PM, 'hessebou said:

maybe its something with the userrights.

try to start your script with

#requireadmin

and 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 :graduated:

Thanks,

Patrice

Posted

Interesting program. I came across this also interesting post there..

  Quote

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.

Posted (edited)

It's normal if you don't find any shorcut after install !

read the faq : http://preyproject.com/faq

  Quote

I 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 ! Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted

  On 11/1/2010 at 4:15 PM, 'wakillon said:

It's normal if you don't find any shorcut after install !

read the faq : http://preyproject.com/faq

use FileCreateShortcut to add a shortcut ! Posted Image

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 :graduated: 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

Posted (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. Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted (edited)

  On 11/1/2010 at 5:23 PM, 'wakillon said:

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. Posted Image

Between french merci beaucoup :graduated: 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 by patlal
  • 3 years later...
Posted (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 by azazelcrack
  • Moderators
Posted

azazelcrack,

While I sympathise with your predicament, there is no way we are going to discuss silently installing Prey. Thread locked. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...