Jump to content

iss setup


Recommended Posts

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?

Link to comment
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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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.

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

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