Page 1 of 1

Get free space and Insert values into registry

Posted: 24 Apr 2012 00:36
by tiago
1. can get() obtain a drive's free space?

2. i can

Code: Select all

text get("regcmd", "mp3");
but how do i change a registry value using xy scripting?

Re: Get free space and Insert values into registry

Posted: 24 Apr 2012 06:31
by Twisten
You need to use an external tool for that, look into the 'REG' (Console Registry Tool for Windows) usage.

Re: Get free space and Insert values into registry

Posted: 24 Apr 2012 08:49
by highend
1. report() in conjunction with get("drives", x) can do that.

Re: Get free space and Insert values into registry

Posted: 24 Apr 2012 16:31
by tiago
After fighting a good couple of minutes against quotes i finally made it, Twisten, so thanks.

highend, I just can't. I tried
text report('The item "{name}" has {free space}.' . "<crlf>", "1");
and it works fine, but I have to "goto %computer%;" first. It fails if I specify "d:\" "d:" instead of "1".
What am I doing wrong?

@admin: Under POM, if I specify a "open <curitem>" after using the reg tool XY gives a warning on recursion. That will not happen if I use run() instead. Anything broken?

Re: Get free space and Insert values into registry

Posted: 24 Apr 2012 16:40
by highend
It seems to be a limitation of the report command. A path (only) instead of an item with full path isn't supported. So opening a new tab at %computer% and closing it after afterwards seems to be the only viable option atm.

Re: Get free space and Insert values into registry

Posted: 24 Apr 2012 16:45
by tiago
highend wrote:It seems to be a limitation of the report command. A path (only) instead of an item with full path isn't supported. So opening a new tab at %computer% and closing it after afterwards seems to be the only viable option atm.
Thanks. Can you please comment on the issue I posted to admin in my edit of previous post?

Re: Get free space and Insert values into registry

Posted: 24 Apr 2012 19:18
by Stefan
tiago wrote:1. can get() obtain a drive's free space?
Remembers me at > http://www.xyplorer.com/xyfc/viewtopic. ... 807#p67807
serendipity wrote:Some of it is already possible using SC "Report" in Drives Mode.

Re: Get free space and Insert values into registry

Posted: 24 Apr 2012 19:30
by tiago
Thanks for the heads up Stefan but it's far from elegant in the context of a script which must monitor the amount of free drive space.
If the problem is lack of or broken support of report() I hope admin blesses us with a solution.

Re: Get free space and Insert values into registry

Posted: 01 May 2012 19:50
by tiago
highend wrote:It seems to be a limitation of the report command. A path (only) instead of an item with full path isn't supported. So opening a new tab at %computer% and closing it after afterwards seems to be the only viable option atm.
Admin: can you do something about this, please?