Jump to content

PSinfo and ComSpec Troubles


MePHiTiC
 Share

Recommended Posts

I can't figure out why the following script won't run.

If I replace $PSInfoFile in the RunWait command with a hard path of c:\PSInfo.txt everything seems to run without problems.

Could anyone shed some light on the problem?

$PSInfoFile = @ProgramFilesDir & "\Updater\Logs\PSInfo_" &  @ComputerName & "_" & @YEAR & "-" & @MON & "-" & @MDAY & "-" & @HOUR & "-" & @MIN & "-" & @SEC & ".log"
$PSInfoCmd = "psinfo.exe -accepteula -h -s -d > "

RunWait(@ComSpec & " /c " & $PSInfoCmd & $PSInfoFile, @TempDir, @SW_HIDE)

Thanks,

MePH

Link to comment
Share on other sites

I can't figure out why the following script won't run.

If I replace $PSInfoFile in the RunWait command with a hard path of c:\PSInfo.txt everything seems to run without problems.

Could anyone shed some light on the problem?

$PSInfoFile = @ProgramFilesDir & "\Updater\Logs\PSInfo_" &  @ComputerName & "_" & @YEAR & "-" & @MON & "-" & @MDAY & "-" & @HOUR & "-" & @MIN & "-" & @SEC & ".log"
$PSInfoCmd = "psinfo.exe -accepteula -h -s -d > "

RunWait(@ComSpec & " /c " & $PSInfoCmd & $PSInfoFile, @TempDir, @SW_HIDE)

Thanks,

MePH

instead of @TempDir try @scriptdir or @workingdir

your script seems too complex for a little goal, please post you entire code to figure out

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

instead of @TempDir try @scriptdir or @workingdir

your script seems too complex for a little goal, please post you entire code to figure out

I've tried @ScriptDir with no luck. I'll give @WorkingDir a try. This snippet is part of a much larger update/tweak script. Those three lines are really the only ones for this psinfo problem. Eventually this log will be emailed which is why it's a little more complex then need be.

MePH

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
 Share

  • Recently Browsing   0 members

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