Need Help- Quick Batch File / Location


  1. Posts : 6
    Win7 Enterprise 64 bit
       #1

    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 Computer


  2. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #2

    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 Computer


  3. Posts : 6
    Win7 Enterprise 64 bit
    Thread Starter
       #3

    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 Computer


  4. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #4

    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 Computer


  5. Posts : 6
    Win7 Enterprise 64 bit
    Thread Starter
       #5

    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 Computer


  6. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #6

    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

    Need Help- Quick Batch File / Location Attached Files
      My Computer


  7. Posts : 6
    Win7 Enterprise 64 bit
    Thread Starter
       #7

    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 Computer


  8. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #8

    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 Computer


  9. Posts : 6
    Win7 Enterprise 64 bit
    Thread Starter
       #9

    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 Computer


  10. Posts : 72,051
    64-bit Windows 11 Pro for Workstations
       #10

    Ah, ok. In that case Dwarf's method would be best in this case. :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About 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 07:03.
Find Us