topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 3:28 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: windows volume control setting  (Read 14877 times)

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
windows volume control setting
« on: July 08, 2008, 06:43 AM »
I am trying to set the wave volume for all users who log in to a computer.  By default it is set to zero so there are certain programs that don't have any sound.  The computers are XP Pro SP3 that log into a Windows server in a grade school setting.  It seems after they log in and it is set, then it stays but I am trying to save the computer teacher a lot of time by setting it in advanced.

This particular computer uses the SoundMax Digital Audio software.  I have also tried setting it in control panel but the results are the same.  I have looked in to gpedit but cannot find any setting there either.

any ideas?

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #1 on: July 08, 2008, 07:21 AM »
Apparently some/one of the software we use changes the default setting to zero.  I just logged into another computer  that has no software installed on it and the wave setting is as high as it will go. 

I am going to set up my default user and copy it to the other computer and see what happens.  I will post back the result.

Would there be a registry setting that would accomplish the same thing???

Dave

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: windows volume control setting
« Reply #2 on: July 08, 2008, 08:19 AM »
actually this is a fantastic idea for a coding snack, a tool that runs on windows startup and forces the volume and wav volume settings to a specific value.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #3 on: July 08, 2008, 08:28 PM »
if you want a certain level of volume to be set on start, try NirCmd. the following code will create a shortcut in the startup folder which will set the system volume to the max.

nircmd.exe cmdshortcutkey "~%folder.desktop%" "Max Volume" setsysvolume 65535

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: windows volume control setting
« Reply #4 on: July 08, 2008, 08:29 PM »
nice.

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #5 on: July 08, 2008, 08:38 PM »
actually i need a certain "wave volume" set for each user that logs in to the computer for the first time.  But I will check this one out.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #6 on: July 08, 2008, 08:41 PM »
i missed the "wave volume", so it's not system volume. ;D btw, is it ok if the wave volume is the same as system volume?

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #7 on: July 08, 2008, 08:47 PM »
that would be fine.  They will have head phones on most of the time anyway.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #8 on: July 08, 2008, 09:07 PM »
ok, watch this space. looks good. give it a try & let me know..

SetWav
• set system's WAV level on startup.
• output change in percentage (0-100).
• EXE only due to creation of link in the startup folder.

ws-SetWave.png

ws-SetWave1.png
« Last Edit: July 08, 2008, 10:56 PM by lanux128 »

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #9 on: July 08, 2008, 09:35 PM »
AHK is your friend...

the following 2 lines set the master and WAV volumes to 50%

soundset, 50
soundsetwavevolume, 50

you can change pretty much all the sound controls this way.  Code could be compiled and added to the startup directory

The AHK helpfile also includes a soundcard analysis script which may be of use/interest...

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #10 on: July 08, 2008, 09:57 PM »
Thanks Lanux for your "setwav" box, but can/could it be added to the startup folder?

Target, a coder I am not.  I have looked at the authotkey website several times but do not understand much of what they talk about.  So compiling code is out of the question for me.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #11 on: July 08, 2008, 10:27 PM »
Thanks Lanux for your "setwav" box, but can/could it be added to the startup folder?

actually, i meant to say that i'm working on it. ;) this is how it'll work: upon startup, the script will retrieve and set the WAVE volume from an INI file. if it doesn't find the INI file then it'll ask for the input then save the value for the following boot-ups. what do you think?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #12 on: July 09, 2008, 12:26 AM »
btw, here is the source for those interested..

; Set wave volume upon startup
; Source: hxxp://www.donationcoder.com/forum/index.php?topic=13989.0
; Note: compile the script to get the startup link working
#SingleInstance, force
#NoEnv
SendMode, Input

appname=SetWav
ini_file=%appname%.ini
Gosub, Get_INI
If WavLevel <> 0
  {
  FileCreateShortcut, %A_WorkingDir%\%appname%.exe, %A_StartupCommon%\%appname%.lnk, %A_WorkingDir%
  GoSub SetWave
  }
Else
  {
  ;other tasks here..
  }
Return

SetWave:
  SoundSetWaveVolume, %WavLevel%
  TrayTip,%appname%,Current wave volume: %WavLevel%,,1
  Sleep, 5000
  GoSub GuiEscape ;exit
Return

Get_INI:
IfNotExist, %ini_file%
{
  GoSub, ShowGUI
}
Else
{
  IniRead,WavLevel,%ini_file%,Settings,WavLevel,100
  If WavLevel>100
    WavLevel=100
}
Return

ShowGUI:
Gui, +ToolWindow
Gui, Add, GroupBox, x6 y6 w140 h54, Enter WAV level: (0-100)`%
Gui, Add, Edit, x16 y30 w80 h20 vNewWavVol Limit3 Number,
Gui, Add, Button, x100 y30 h20 Default, OK
Gui, Show, , %appname%
Return

GuiClose:
ButtonOK:
  Gui, Submit
  comments=
  comments=`;%A_Space%Ini settings for SetWav script.
  comments=%comments%`n`;%A_Space%
  comments=%comments%`n`;%A_Space%This file contains the configurable settings.
  comments=%comments%`n`;%A_Space%--------------------------------------
  comments=%comments%`n`;%A_Space%You may edit this file but not while the script is running.
  comments=%comments%`n`;
  FileAppend,%comments%,%ini_file%
  If NewWavVol>100
    NewWavVol=100
  IniWrite,%NewWavVol%,%ini_file%,Settings,WavLevel
  FileAppend,`n,%ini_file% 
Return

GuiEscape:
ExitApp

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #13 on: July 09, 2008, 12:34 AM »
not to trump lanux here, his app sounds more a little more capable???

the attached zip file includes the setsound script and the aforementioned sound card analysis script both compiled and ready to go

Setsound_50.exe does what it says, sets the master and wave volumes at 50% then closes (50% was a nominal figure - if you want something else let us know).  Copy it to your startup folder and that should be it...

EDIT: updated the setsound script to toggle the mute status off (if it's already on...)
« Last Edit: July 10, 2008, 06:16 PM by Target »

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #14 on: July 09, 2008, 05:45 AM »
thank you  Lanux and Target for your apps!  I will give them a try.

Dave

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #15 on: July 19, 2008, 05:50 AM »
I did give these a try.  For some reason, probably user error, I couldn't get the setting to save.  So I tried Target's and it worked since that setting was already hard coded.

I went back and reread lanux's post and then placed a setting in the ini file and all is well.  I did like the idea that his automatically saved to the startup folder.

Other than that they are both capable programs..

thanks again and I will be awarding credits to both.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #16 on: July 19, 2008, 10:05 PM »
I did give these a try.  For some reason, probably user error, I couldn't get the setting to save.  So I tried Target's and it worked since that setting was already hard coded.

I went back and reread lanux's post and then placed a setting in the ini file and all is well.  I did like the idea that his automatically saved to the startup folder.

@techidave: thanks for the credit. but i'm curious about the error that you mentioned. does the program saves the value to the INI file or you manually had to edit?

techidave

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,044
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #17 on: July 20, 2008, 07:51 AM »
When I checked the ini file, there was no setting there. So I manually put 50 in, saved and then when I logged back in, the wav settng was at 50% when before that it was at 0.  Like I said, it was user error on my part.  When the box first came up asking for a value, I was thinking it already had a value in it so I left it blank. By the time I realized it didn't, then I couldn't get the box to come back up. It was on re-reading your post that I discovered it used an ini file for settings.

oh well...its another day here in Kansas with the high temps to be 101!  I hope the a/c don't fail. 

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: windows volume control setting
« Reply #18 on: July 21, 2008, 06:25 PM »
many thanks for the credits (really not necessary  :-[)

did you get the amended version (toggles mute status off)?

and I wondered if a lesser volume setting would be better (as 50% is potentially quite loud...)