Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Need Help- Quick Batch File / Location

25 Jul 2011   #1
jjewel33

Win7 Enterprise 64 bit
 
 
Need Help- Quick Batch File / Location

Hello we are running Windows 7 Enterprise x32
When you click on the Start Button Win7 has the Projector mode toggle.

They want it to Automatically Clone with no choice needed by our "lazy" users.

Now the word is Duplicate on the toggle bar so I am not sure which word to use. NOR am I sure where to place this file for it to run at start up for all users.

@ECHO OFF
c:\\Windows\System32\DisplaySwitch.exe /duplicate
cls


My System SpecsSystem Spec
.
25 Jul 2011   #2
Brink

64-bit Windows 10 Pro
 
 

Hello Jewel, and welcome to Seven Forums.

You could create a shortcut using the tutorial below with the target location below to have it switch to "Duplicate" when used.

C:\Windows\System32\DisplaySwitch.exe /clone

Display Switch Shortcut - Create

Once the shortcut is created, you could save it where you like (ex: in a C:\Users\Public folder), then use the tutorial below to create a task to run this shortcut from this location at startup for all users.

Task - Create to Run a Program at Startup and Log On

Hope this helps,
Shawn
My System SpecsSystem Spec
25 Jul 2011   #3
jjewel33

Win7 Enterprise 64 bit
 
 

That is a very cool shortcut.
Unfortunately where I work the "users" (faculty) have all their computers set up so they do not have to touch any extra buttons. I cannot have a shortcut they need to click on. It must be a Batch File, needs to run at start up for all users and needs to set this to clone by default so when they turn on the projector it is already projecting on the screen with no interaction needed. (These same "users" also want the speakers to default to "on"--as though we can control someone turning off the speakers with the on/off button????)
My System SpecsSystem Spec
.

25 Jul 2011   #4
Brink

64-bit Windows 10 Pro
 
 

That's fine.

Once the shortcut is created, you would save the shortcut to where you like to keep it saved at (ex: in a C:\Users\Public folder), then use the tutorial below to create a task to run this shortcut from this location at startup for all users.

Task - Create to Run a Program at Startup and Log On

LOL, I can't help with the speakers either. They'll just have to be turned on.
My System SpecsSystem Spec
25 Jul 2011   #5
jjewel33

Win7 Enterprise 64 bit
 
 

Nope, that is not going to work either!! These machines will be logged on to by multiple users with various rights and permissions.

------------------------------------------------------------

I was already told I need to use this: C:\Windows\System32\DisplaySwitch.exe /clone


but I am writing my batch file wrong...........


And it needs to go here:

I put the batch in the all users startup. C:\ProgramData\Microsoft\Windows\StartMenu\Programs\Startup
My System SpecsSystem Spec
25 Jul 2011   #6
Dwarf

Windows 8.1 Pro RTM x64
 
 

You don't actually need to create a batch file for this. You can simply make an entry in the registry.

Open the registry editor with administrative privileges and browse to the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Right-click in the right-hand panel and select New String Value. It doesn't matter what you call this string, so just press Enter. Now, right-click on this entry and click Modify... and in the dialogue box type the following:

C:\Windows\System32\DisplaySwitch.exe /clone

Now press Enter and close the registry editor. When you next restart your computer, this command will be executed regardless of who has logged in (including yourself, as Administrator).

Alternatively, I have prepared a downloadable registry file which will achieve the same thing. You can only merge this file into the registry from within an administrative account.

download


Attached Files
File Type: reg Clone Display.reg (358 Bytes, 44 views)
My System SpecsSystem Spec
25 Jul 2011   #7
jjewel33

Win7 Enterprise 64 bit
 
 

Ahhh Dwarf, I do like your suggestion. I think I will put that up to the group. I did get the batch file to work finally! But I really like just changing the registry setting. Seems cleaner and easier.

Do you know if that registry setting will hold after sysprep and cloning?

I do like Brink's Shortcut also, but that just won't solve this for the users would still have to click. Thank you for your input Brink! And I love your tutorials. Very nice.
My System SpecsSystem Spec
25 Jul 2011   #8
Brink

64-bit Windows 10 Pro
 
 

Dwarf's method is a good direct way of adding it to the registry.

The shortcut I mentioned was not to be used to be clicked on by the users, but only to used by the task to run the shortcut automatically at startup without the user having to click on anything.

Either method should work for you though.
My System SpecsSystem Spec
25 Jul 2011   #9
jjewel33

Win7 Enterprise 64 bit
 
 

I did try to run the task but it came up with an error that users must have run batch locally rights or something to that degree. Operations is really locking user accounts down to the point I am sure sure what rights they will have left.
My System SpecsSystem Spec
25 Jul 2011   #10
Brink

64-bit Windows 10 Pro
 
 

Ah, ok. In that case Dwarf's method would be best in this case.
My System SpecsSystem Spec
Reply

 Need Help- Quick Batch File / Location




Thread Tools




Similar help and support threads
Thread Forum
Can I mass apply RAA using a batch file or other quick trick?
I was wondering if there was a way to easily apply RAA to multiple (read 50+) .exe files on a system. We put systems out that require multiple exe files to have this setup and it takes time to go through and click each one. Could it be done by doing a registry batch file? Or AutoIT or other...
Software
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
Backup and Restore
Batch File that grabs file names from folder to insert into batch file
Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can... :confused: First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg. Here's the code that I'm using: ffmpeg -i...
General Discussion
How to create a batch file that will move files based on the file type
How to create a batch file that will move files based on the file type? My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...
General Discussion
Quick batch file question
Hi, I have just created a batch file to backup a few things on my machine, the thing is the batch file has a menu in it and i was wondering if i was to set the batch file to run under task scheduler say once a week is there a way i can get it to excute through the menu of the batch file? if not...
General Discussion
Remove location from quick search
How can i prevent my quick search in windows 7 (WindowsKey and start typing) from searching certain folders / directories? I have a few files in a folder, i dont want anyone to find.... but the keywords (text within the files) are seen! For example my MSN chat logs! .. i can find them...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:30.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App