Location:
State:
Carrier
Country
Status

Can Someone Help me Write a Script


I use an old kvm switch without active ddc so I am always having to open screen resolution settings and click detect.
I would like to make a script file and then a shortcut to the file to do this for me but I have never written a script and can't figure out how to do it. Also, do I need to have a program in order for the script file to work. Can one of you tell me how I might accomplish this. Thanks

DonationCoder.com has a sub-forum dedicated to just these small requests called Coding Snacks. You may submit your request here:
Post New Requests Here - DonationCoder.com

Please read the rules before posting. But the type of thing you are talking about should be quite easy. Also you may wish to read about DonationCoder here:
DonationCoder.com

Donations are encouraged but voluntary. If you have any questions about signing up or using the site contact Mouser.

I use an old kvm switch without active ddc so I am always having to open screen resolution settings and click detect.
I would like to make a script file and then a shortcut to the file to do this for me but I have never written a script and can't figure out how to do it. Also, do I need to have a program in order for the script file to work. Can one of you tell me how I might accomplish this. Thanks
If you don't know how to program then it would probably be to complicated to do that for your first script.

Check you have Windows Powershell installed, it should be listed on the Start menu, and I'll see if I can knock something up for you.

Yes, I have powershell. I REALLY appreciate your time and effort.

As I can't replicate the same issue you've got this may need tweaking for your system, so report back.

Rather than open the Control Panel Display properties and clicking detect, this uses the Windows API to detect display devices.

There's a powershell script with the code and a batch file to run the script without having to change your system execution policies. You can place these files wherever you want but you will have to edit the .bat file and put in a new location. As it is, I've set it to run from C:Program FilesDetect. So create this folder and put the two files in it. You can then create a shortcut to the .bat file on your Desktop.

Detect.zip

Nus, this did not work for me but DonationCoder told me that a simple shortcut with the following as target
will "detect display" Hope someone else finds this and it is beneficial. Thank you so much for your time and effort., I don't know what I would do without all the help I receive from gurus such as yourself. I am really amazing how many people across the web give of themselves to assist strangers. Good will is alive and well in the computing world.

%SystemRoot%system32WindowsPowerShellv1.0powershell.exe -noprofile -executionpolicy bypass -Command "Get-CimInstance -Namespace rootwmi -ClassName WmiMonitorBasicDisplayParams | Out-Null"

edit 7/23/15 I forgot to add that this shortcut must be "run as administrator"

What does it do for you? I ran it just for kicks and it took 5 seconds or so then exited but I could not detect anything happening, probably because my resolution was already correct.

Nus, this did not work for me but DonationCoder told me that a simple shortcut with the following as target
will "detect display" Hope someone else finds this and it is beneficial. Thank you so much for your time and effort., I don't know what I would do without all the help I receive from gurus such as yourself. I am really amazing how many people across the web give of themselves to assist strangers. Good will is alive and well in the computing world.

%SystemRoot%system32WindowsPowerShellv1.0powershell.exe -noprofile -executionpolicy bypass -Command "Get-CimInstance -Namespace rootwmi -ClassName WmiMonitorBasicDisplayParams | Out-Null"
No, worries, that looks like a simpler method, heh.

I've got a script to set resolution, colour depth and refresh rate, so say if you need that.

Can Someone Help me Write a Script