Sign in to follow this  
Followers 0
MePHiTiC

PSinfo and ComSpec Troubles

4 posts in this topic

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

Share this post


Link to post
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]

Share this post


Link to post
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

Share this post


Link to post
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

@WorkingDir seems to have worked ... Any idea why @TempDir or @ScriptDir wouldn't have?

MePH

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