Script – EX

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1426
    Avatarmikev
    Member
    • Total Post: 157
    • Jacked into The Matrix
    • ★★★★★★

    Hi,

    I have got a small script as below to copy a file to the c drive and then execute it –

    XC “File_exe*” “C:”
    EX “C:change.exe”

    The above command does copy the files to the c drive but does not run the executable “change.exe” not sure why.

    There is no error message recorded as well. I also tried adding “user” after the EX command (EX “C:change.exe” “user”) – but still does not work.

    Can someone pls help?

    Thanks.

    #13781
    ConfGenConfGen
    Keymaster
    • Total Post: 11109
    • Jedi Master
    • ★★★★★★★

    Can you run the “Change.exe” manually after the script finishes?
    Does it finish at all or does it error out?

    CG

    #13787
    Avatarthinkthin
    Member
    • Total Post: 1707
    • Jacked into The Matrix
    • ★★★★★★

    Also, remember that WDM runs as “System” so change.exe will run as the system context. This means if you are trying to load settings for the logged in use change.exe will be modifying the wrong user hive,

    Cheers,
    -TT

    #13788
    Avatarmikev
    Member
    • Total Post: 157
    • Jacked into The Matrix
    • ★★★★★★

    I can manually run the script – no issues. I have experienced the same problem before as well. When i try to run any exe from within a script with the logged in user it does not work.

    I am not sure how do i fix this problem. My aim is to run a small exe with the help of a script – i can try running the file by copying it into the registry runonce and this will work only once. But i want to know if there is some other way to fix this problem so that i can execute the file directly from script when i push it from rapport rather then doing a two step process.

    Thanks.

    #13794
    ConfGenConfGen
    Keymaster
    • Total Post: 11109
    • Jedi Master
    • ★★★★★★★

    You should copy the file to drive Z: instead of C: as a user is restricted in accessing drive C:
    Z: is a ramdisk so the copied files are beeing lost after reboot.

    CG

    #13797
    Avatarthinkthin
    Member
    • Total Post: 1707
    • Jacked into The Matrix
    • ★★★★★★

    When i try to run any exe from within a script with the logged in user it does not work.

    Can you not get any exe to run or just ones that need to interact with the “User” account? What is it that the exe’s need to do?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.