runret() bug?

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

runret() bug?

Post by highend »

v15.00.0409

Please execute:

Code: Select all

 text runret("cmd /c vol C:");
This should deliver an output like this (at least it does if you use vol C: on the command line):
C:\Windows\System32>vol C:
Datenträger in Laufwerk C: ist Server 2012 R2 U1
Volumeseriennummer: AE42-95EB
But in XY I get this:
Unbenannt.png
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: runret() bug?

Post by bdeshi »

all right here. What does the error say?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: runret() bug?

Post by admin »

Works fine here.

(@Sammay: The error says: Directory name invalid.)

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: runret() bug?

Post by highend »

Works fine here.
Go to "Computer". Click on your DVD-Drive. Make sure there is no CD/DVD in.

You have to get the
"Location currently not available.
<drive letter:>"

message.

Execute

Code: Select all

text runret("cmd /c vol C:");
again...
One of my scripts helped you out? Please donate via Paypal

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: runret() bug?

Post by TheQwerty »

Not really a bug... you're not specifying the working directory so it uses <curpath> which is not valid.

Code: Select all

::text runret("cmd /c vol C:", <xydrive>);
Though I imagine if you run XY from a removable drive/disc and then remove the media while XY is running this too will fail. Might be better using %winsysdir% or another env. variable.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: runret() bug?

Post by highend »

Thank you, TheQuerty!

Using %windir% now and it works fine :)
One of my scripts helped you out? Please donate via Paypal

Post Reply