Sign in to follow this  
Followers 0
Jochem

iss setup

11 posts in this topic

I made this script but it doesn`t seem too work:

#include <File.au3>
$prog = "Google SketchUp"
$user = "blabla"
$pw = "blabla"
$line1 = "start /wait \\server1\files\sketchup.exe /a /s /sms /f1\\server1\software\files\sketchup.iss"
$logfile = "c:\logs\sketchup"
If $CmdLine[0] < 1 Then
    Switch FileExists($logfile)
        Case False
            $MB = MsgBox(4, $prog , "This will install " & $prog & " on your system?")
            If $MB = 6 Then
                If Not IsAdmin() Then
                RunAsSet($user, @LogonDomain, $pw)
                RunWait('"' & @ComSpec & '" /c '& $line1 &'', '', @SW_HIDE)
                _FileWriteLog($logfile, @ComputerName)
                EndIf
            EndIf
        Case True
            $MB = MsgBox(0, $prog , $prog & " is allready installed on your system")
            If $MB = 6 Then
            EndIf
    EndSwitch
    Exit
EndIf

if i use

$line1 = "\\server1\files\sketchup.exe"

it is working but without the iss.

how can I solve this?

Share this post


Link to post
Share on other sites



I thougth you had to isolate the \\server1\software\files\sketchup.iss in quotes.

Something like: /f1'\\server1\software\files\sketchup.iss'

I am not sure if it has to be double or single quotes. But you get the idea.


My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites

I normally use /s /a /s /sms f1"..." f2"...". Notice the /s to tell the installer to go silent, then the setup exe packaged to go silent after extraction. /s /a /s /sms at least from a HDD. :)

Share this post


Link to post
Share on other sites

hi I saw that the runasset isn`t supported anymore so i changed it in:

RunAsWait($user, @LogonDomain, $pw, "",$line1, '', @SW_HIDE)

while compiling I don`t get any error anymore, but is still not working. Is it possible to use dos-commando`s like this within the runasset?

Share this post


Link to post
Share on other sites

I notice that you are not setting a working directory. Perhaps a rights issue with the working directory. Try using @SystemDir or @tempDir for the working directory parameter of RunAsWait(). :)

Share this post


Link to post
Share on other sites

I tried but nothing happens.

Is there maybe an option to show the cmd-promt to see exactly wat is happening?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Try using the /k switch a long with the @sw_show flag.

#include <File.au3>
$prog = "Google SketchUp"
$user = "blabla"
$pw = "blabla"
$line1 = "\\server1\files\sketchup.exe /a /s /sms /f1\\server1\software\files\sketchup.iss"
$logfile = "c:\logs\sketchup"
If $CmdLine[0] < 1 Then
    Switch FileExists($logfile)
        Case False
            $MB = MsgBox(4, $prog , "This will install " & $prog & " on your system?")
            If $MB = 6 Then
                If Not IsAdmin() Then
                RunAsWait($user, @LogonDomain, $pw, '"' & @ComSpec & '" /k ' & $line1, @SystemDir, @SW_SHOW)
                _FileWriteLog($logfile, @ComputerName)
                EndIf
            EndIf
        Case True
            $MB = MsgBox(0, $prog , $prog & " is already installed on your system")
            If $MB = 6 Then
                ; ?
            EndIf
    EndSwitch
    Exit
EndIf

If you do not see the command prompt window then perhaps the log exists or some other thing blocking the execution.

Edited by MHz

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I can see the command promt, but so quickly that I can`t read it.

if I use this variable it is working:

$line1 = '"\\server1\files\sketchup1.exe"'

so my idea is that is should be in the variable I use

Edited by Jochem

Share this post


Link to post
Share on other sites

A RunAs/RunAsWait process doesn't inherit any network connections from the parent process, so the UNC path to the ISS file wouldn't be available to your setup EXE. In cases like this I've used RunAs to call an AutoIt "wrapper" that would:

  • Run DriveMapAdd to establish a network connection so I could access my share
  • Run my setup EXE.

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

You may want to research InstallShield and UNC ... there may be inherent problems with running certain types of InstallShield packages from a network share. Try mapping the drive first.

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites

YEAH!! thanks it solved my problem.

I used fileinstall to include the exe file:

FileInstall("sketchup1.exe", @tempdir & "sketchup1.exe")

like this I can run it localy.

the drivemap add is indeed a good idea too

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