
Quote from rcohen on June 26, 2021, 8:46 pmI have been away from NB/VNWin for a long time, and am just getting back to it.
A recent software I coded for a team of us to use on a project, had some sound prompts embedded, in the usual way, using the "playsoundfile" command. And both win10 users reported an error with playing said prompts... so they had to turn prompts off.
Did windows ten change the way this works?
Thanks
I have been away from NB/VNWin for a long time, and am just getting back to it.
A recent software I coded for a team of us to use on a project, had some sound prompts embedded, in the usual way, using the "playsoundfile" command. And both win10 users reported an error with playing said prompts... so they had to turn prompts off.
Did windows ten change the way this works?
Thanks

Quote from Darbdenral on June 26, 2021, 9:23 pmI'm not sure if they changed something with the playsound command. Here's an alternative for you if you like. I play mp3 sounds in an old software that I built over 8 years ago. It still works today using the built in media player.. I hide the controls in the options..
https://winhelp.visualneo.com/MediaPlayerTool.html
hope it helps..
SetVar "[mp3file]" "[TempDir]\talk.mp3" FileExists "[mp3file]" "[ExistResult]" If "[ExistResult]" "=" "True" MediaPlayerPlay "MediaPlayer1" EndIf
I'm not sure if they changed something with the playsound command. Here's an alternative for you if you like. I play mp3 sounds in an old software that I built over 8 years ago. It still works today using the built in media player.. I hide the controls in the options..
https://winhelp.visualneo.com/MediaPlayerTool.html
hope it helps..
SetVar "[mp3file]" "[TempDir]\talk.mp3" FileExists "[mp3file]" "[ExistResult]" If "[ExistResult]" "=" "True" MediaPlayerPlay "MediaPlayer1" EndIf

Quote from rcohen on June 27, 2021, 2:13 amHi Darbdenral,
That's a good idea, thank you. I could also use extractfile too I guess and put it in pubdir for a short period. It's just a prompt anyway, but I would still like someone who has windows 10 confirm my finding, so that I can look into perhaps other things that have changed as well. It's always good to know what doesn't work on newer platforms...
Thanks for the response.
Hi Darbdenral,
That's a good idea, thank you. I could also use extractfile too I guess and put it in pubdir for a short period. It's just a prompt anyway, but I would still like someone who has windows 10 confirm my finding, so that I can look into perhaps other things that have changed as well. It's always good to know what doesn't work on newer platforms...
Thanks for the response.

Quote from Darbdenral on June 27, 2021, 3:11 amOk, I'm using Windows 10 here and just made a small test app and it worked fine ..
Ok, I'm using Windows 10 here and just made a small test app and it worked fine ..

Quote from rcohen on July 8, 2021, 8:31 amThanks for the test. I have no clue what is going on then. Two people told me the same thing, that the playsound command I was using couldn't find the file.... I'll have to dig a bit more.
Thanks Darbdenral
rcohen
Thanks for the test. I have no clue what is going on then. Two people told me the same thing, that the playsound command I was using couldn't find the file.... I'll have to dig a bit more.
Thanks Darbdenral
rcohen

Quote from HPW on July 8, 2021, 4:43 pmHello,
Where is te app installed? Under later Windows MS has UAC for the programm folders.
So maybe nor enough rights to put files in [PubDir] !
Regards
Hans-Peter
Hello,
Where is te app installed? Under later Windows MS has UAC for the programm folders.
So maybe nor enough rights to put files in [PubDir] !
Regards
Hans-Peter

Quote from rcohen on July 21, 2021, 7:48 pmThanks Hans. I just took the default that NB installer creator used, so I guess this is likely. I assume if I were to change the install directory then this would eliminate this issue? It's been a good minute since I played with software, so excuse my ignorance, but what would be the most expedient way to avoid this issue?
Thanks again.
Thanks Hans. I just took the default that NB installer creator used, so I guess this is likely. I assume if I were to change the install directory then this would eliminate this issue? It's been a good minute since I played with software, so excuse my ignorance, but what would be the most expedient way to avoid this issue?
Thanks again.

Quote from HPW on July 21, 2021, 10:51 pmHello,
For such file saving there can be 2 folders of interest:
[MyDocuments]
[TempDir]
For short time saving it would be [TempDir]. (or a subfolder of it)
There you can do your own cleanup on shutdown.
Regards
Hans-Peter
Hello,
For such file saving there can be 2 folders of interest:
[MyDocuments]
[TempDir]
For short time saving it would be [TempDir]. (or a subfolder of it)
There you can do your own cleanup on shutdown.
Regards
Hans-Peter

Quote from rcohen on July 25, 2021, 5:34 amThanks Hans.
So [TempDir] [MyDocuments] can be written to without new windows security jumping in? Good to know. But for software that is intended to remain in use for extended periods (legit software), where is logical and safe to install to, so that embedded files can be played without issue? Can one just create a folder called, say "[ProgramName]-Install" at the root of C or the folder of the users choice, and expect embedded sounds to play without issue? It ALL plays on MY machine of course, so this is not something I can personally test. That, and I'm not using Win10
Thanks again
Thanks Hans.
So [TempDir] [MyDocuments] can be written to without new windows security jumping in? Good to know. But for software that is intended to remain in use for extended periods (legit software), where is logical and safe to install to, so that embedded files can be played without issue? Can one just create a folder called, say "[ProgramName]-Install" at the root of C or the folder of the users choice, and expect embedded sounds to play without issue? It ALL plays on MY machine of course, so this is not something I can personally test. That, and I'm not using Win10
Thanks again

Quote from HPW on July 25, 2021, 8:06 amHello,
No one can know what MS does in future versions of windows.
But you can let the user install outside the program folder.
Then the user must trust you and your software, because he is no more protected by UAC.
Or you make a data folder as a subfolder to [MyDocuments]. Your program maybe installed in program folder but [Pubdir] is read-only then (as long no admin is the user).
There are rules by MS and the security software suite*s which expect a behaviour from normal programs.
At least you can think about what you need to embed? When external programm or functions need them as external files you can decide to not embed them and you make a media folder under your [PubDir].
Regards
Hans-Peter
Hello,
No one can know what MS does in future versions of windows.
But you can let the user install outside the program folder.
Then the user must trust you and your software, because he is no more protected by UAC.
Or you make a data folder as a subfolder to [MyDocuments]. Your program maybe installed in program folder but [Pubdir] is read-only then (as long no admin is the user).
There are rules by MS and the security software suite*s which expect a behaviour from normal programs.
At least you can think about what you need to embed? When external programm or functions need them as external files you can decide to not embed them and you make a media folder under your [PubDir].
Regards
Hans-Peter
