Jochem Posted June 24, 2008 Share Posted June 24, 2008 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 More sharing options...
Triblade Posted June 24, 2008 Share Posted June 24, 2008 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) Link to comment Share on other sites More sharing options...
MHz Posted June 24, 2008 Share Posted June 24, 2008 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. Link to comment Share on other sites More sharing options...
Jochem Posted June 24, 2008 Author Share Posted June 24, 2008 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 More sharing options...
MHz Posted June 24, 2008 Share Posted June 24, 2008 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(). Link to comment Share on other sites More sharing options...
Jochem Posted June 24, 2008 Author Share Posted June 24, 2008 I tried but nothing happens. Is there maybe an option to show the cmd-promt to see exactly wat is happening? Link to comment Share on other sites More sharing options...
MHz Posted June 24, 2008 Share Posted June 24, 2008 (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 June 24, 2008 by MHz Link to comment Share on other sites More sharing options...
Jochem Posted June 24, 2008 Author Share Posted June 24, 2008 (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 June 24, 2008 by Jochem Link to comment Share on other sites More sharing options...
DaveF Posted June 24, 2008 Share Posted June 24, 2008 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 shareRun 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 More sharing options...
LarryDalooza Posted June 25, 2008 Share Posted June 25, 2008 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. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Jochem Posted June 25, 2008 Author Share Posted June 25, 2008 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 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