Sign in to follow this  
Followers 0
PerpetualSmile

Running script from remote system - external program error

4 posts in this topic

Ok - here's my problem - this works when I run it locally. When I try to run it remotely on different machines via the compiled exe, I get the error 'Unable to execute the external program'.

I looked at the postings and have tried using the @comspec as well as the @TempDir - but when i do that, it will run w/ no errors, but the code won't execute so I'm thinking there's a syntax error somewhere...?

I looked at the FAQ that talked about running msi files which i think the subinacl is....so I tried using

RunWait ("msiexec 'subinacl.msi /keyreg......) but again - bombs due to syntax. And the same applies to the RunWait(@Comspec " /c Start subinacl.msi").

For those wondering this is the official command that works in DOS:

(Subinacl /keyreg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg /grant="LOCAL SERVICE"=AQEY)

Any ideas? Thanks much!

Original w/out @

WinMinimizeAll()

BlockInput(1)

RunAsSet("Administrator", @computername, "xxxxx")

FileCopy("\\servername\public\temp\subinacl.*", "C:\")

RunWait('subinacl /keyreg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg /grant="LOCAL SERVICE"=AQEY')

FileDelete("C:\subinacl.*")

RunAsSet()

BlockInput(0)

WinMinimizeAllUndo()

Code with @

WinMinimizeAll()

BlockInput(1)

RunAsSet("Administrator", @computername, "xxxxx")

FileCopy("\\servername\public\temp\subinacl.*", "C:\")

RunWait(@Comspec & ' /c ' & 'subinacl /keyreg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg /grant="LOCAL SERVICE"=AQEY', @TempDir)

FileDelete("C:\subinacl.*")

RunAsSet()

BlockInput(0)

WinMinimizeAllUndo()

Share this post


Link to post
Share on other sites



you copy the file subinacl.* (hopefully *.exe) to c:\, but you don't specify the full path with RunWait! Try this:

RunWait('c:\subinacl /keyreg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg /grant="LOCAL SERVICE"=AQEY')

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Unfortunately that didn't work even locally - I verified that it is an MSI file...is that part of my problem?

I also tried doing this line

RunWait("msiexec /i " & 'C:\subinacl.msi /keyreg HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg /grant="LOCAL SERVICE"=AQEY')

When that happens - it pulls up the msiexec installation switches dialog box....PULING HAIR OUT!!

Edited by PerpetualSmile

Share this post


Link to post
Share on other sites

Ok - where are you people? Am I asking a question that has already been answered? If so direct me to the location PLEASE!

I rewrote the script to call a bat file - but getting same error..Unable to execute the external program.

WinMinimizeAll()

BlockInput(1)

;Create Temp Drive if doesn't exist

If FileExists("C:\Temp\") Then

FileCopy("\\servername\public\temp\subinacl.exe", "C:\Temp")

FileCopy("\\servername\public\temp\reg.bat", "C:\Temp")

Else

DirCreate("C:\Temp\")

FileCopy("\\servername\public\temp\subinacl.exe", "C:\Temp")

FileCopy("\\servername\public\temp\reg.bat", "C:\Temp")

EndIf

RunAsSet("Administrator", @computername, "xxxxx")

Run("C:\Temp\Reg.bat")

FileDelete("C:\Temp\subinacl.exe")

RunAsSet()

BlockInput(0)

WinMinimizeAllUndo()

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