Sign in to follow this  
Followers 0
matthewst

can't get function to work (i think)

7 posts in this topic

I get an error when running this script

; Hide the tray icon
;Opt("TrayIconHide", 1)
Opt("TrayIconDebug", 1)

; Check to see if Login.exe is already running
If ProcessExists("Login.exe") Then
    End()
EndIf

; Set the RunAs parameters to use adminstrator account
RunAsSet("user.name", "domain", "password")
Sleep(2000)

; Map a network drive
DriveMapAdd("R:", "\\server\scripts$")
Sleep(2000)

; If Roxio is already installed then skip istallation
If FileExists("C:\Program Files\Roxio\Easy Media Creator 8") Then
   done()
Else
   copy()
EndIf

; Copy Roxio to local machine
Func copy()
   DirCopy("R:\Roxio", "C:\Roxio", 1)
   Sleep(600000)
EndFunc

; After Copying files begin install
Runwait("C:\Roxio\roxinst.bat") 

; Remove install directory to save space
DirRemove("C:\Roxio", 1)
Func done()
EndFunc

; Delete mapped drive
DriveMapDel("R:")

the error says

Runwait("C:\Roxio\roxinst.bat")

Error: Unable to execute the external program

the parameter is incorrect

Share this post


Link to post
Share on other sites



Maybe this can help?

Runwait("C:\Roxio\roxinst.bat","C:\Roxio\")

Share this post


Link to post
Share on other sites

nope same error but with Runwait("C:\Roxio\roxinst.bat","C:\Roxio\") instead of

Runwait("C:\Roxio\roxinst.bat")

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

try to use @comspec & " /c "

Also, Just an FYI

Func done()

EndFunc

doesnt mean you can just "GoTo" there using

If FileExists("C:\Program Files\Roxio\Easy Media Creator 8") Then

done()

Else

copy()

EndIf

that will check if the file exists, if it does it just continues after the endif

you probly want an Unmap & Exit in done()

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites

a step in the right direction!!

now i get a different error

'\\server\scripts$'
cmd.exe was started with the above path as the current directory
UNC paths are not supported. defaulting to windows directory

it then runs the bat file but doesn't actually execute the setup specified in the batch file

contents of batch file

@echo off
Echo Installing Roxio Easy CD and DVD Burning 8
Echo This will only take a few minutes
Echo To continue working minimize this window
C:\Roxio\setup.exe ADDLOCAL=ALL RX_EULA_ACCEPTED=1 D2D_ON_DESKTOP=1 REBOOT=ReallySuppress ROX_KEYTEXT=key-code /qn
exit

I also get a popup that says

please go to the control panel to install and configure system components

any ideas??

Share this post


Link to post
Share on other sites

SWEEEEEEEEEEEEEET!!!!!!!!!!!!!

it works!!

Thanks for all the help

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