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

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 Windows 7 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
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

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

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
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

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

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

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, 40 views)
My System SpecsSystem Spec
25 Jul 2011   #7

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
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

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

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
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

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




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 03:52 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33