Jump to content

Accessing files from temp directory


Recommended Posts

I have run into a puzzling issue.  I am trying to download (or at least in this case "fileinstall") a file into the temp directory of the computer running the script and then run the file after it is in the temp directory.  Here is the code:


FileInstall ( "C:\Users\demon\Downloads\Windows6.1-KB2819745-x86-MultiPkg.msu", @TempDir & "\powershellx86.msu" )
    RunWait ( @ComSpec & " /c wusa.exe " & '"' & @TempDir & '\powershellx86.msu" /quiet /norestart', @SystemDir, @SW_SHOW )

However, when the code actually runs, the command prompt appears and then abruptly disappears without running the command.  To investigate this, I navigate to the temp folder (C:\user\demon\appdata\temp) the file is there and ready to be used.  Something seems to be wrong with the command, but if I were to change the macro from @tempdir to, say, @DesktopDir, then the command would run fine.

 any advice?

Edited by MattHiggs
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

  • Recently Browsing   0 members

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