MePHiTiC Posted February 23, 2007 Share Posted February 23, 2007 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 More sharing options...
arcker Posted February 23, 2007 Share Posted February 23, 2007 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, MePHinstead 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 More sharing options...
MePHiTiC Posted February 23, 2007 Author Share Posted February 23, 2007 instead of @TempDir try @scriptdir or @workingdiryour script seems too complex for a little goal, please post you entire code to figure outI'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 More sharing options...
MePHiTiC Posted February 23, 2007 Author Share Posted February 23, 2007 instead of @TempDir try @scriptdir or @workingdiryour 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now