Announcement

Collapse
No announcement yet.

Anyone good at scripting?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone good at scripting?

    Hey everyone, I could use a hand if possible. In my store, head office have decided arbitrarily that all the display computers should have the guest account enabled, have IE start when the guest account logs in, and the home-page set to the company website.

    I tried writing a simple batch file to automate at least part of the process (I'm not much for command-line though, only basic stuff) and I hit a wall trying to copy a shortcut of IE from the programs folder into the startup folder (literally only one folder down. Apparently the copy command doesn't work on *.lnk files?)

    So, my first thought was to ask if there's a command I can use to create a shortcut to IE inside the startup folder. Then I thought, considering how techie some of the people on this site are, maybe I'd be super-cheeky ^^

    So instead, my question is this: is it possible to create a *.bat file to do the following automatically for me:

    1) enable the guest account
    2) set IE to autorun at login ON the guest account
    3) change the homepage of IE to [companywebsite]

    All our display machines are on Windows 7 Starter or Professional, if that helps or changes anything.

    Any help (even just a command for creating a shortcut) would be greatly appreciated
    ONI HEUIR NI FEDIR

  • #2
    I've never tried it, but perhaps this page at kioskea.net will help.

    ^-.-^
    Faith is about what you do. It's about aspiring to be better and nobler and kinder than you are. It's about making sacrifices for the good of others. - Dresden

    Comment


    • #3
      I have a question for you, how were you planning on deploying this script? If I am looking at this problem correctly, you need to run this script as an administrator and then log in as guest before any of this information can be set. Because until the guest account logs in, the folder structure for the user account doesn't exist.

      As for creating the shortcut, I think a better bet would be to copy an already existing shortcut to the startup folder. Either from C:\Users\<currentuser>\AppData\Roaming\Microsoft\W indows\Start Menu, or create your own to deploy with the script. As long as the pathing is consistent across your systems, that should work.

      Comment


      • #4
        Thanks guys, I was hoping there would be some way to run it all from the admin account, but if the file structure isn't there before the initial guest login, I can see why that wouldn't work.

        As for copying an existing shortcut, that's what I was originally trying. However, the COPY command doesn't seem to work with .lnk (shortcut) files. Just returns the error path cannot be found (tested this by creating a .txt file in documents and creating a shortcut in the same folder. Then ran the copy command on both the .txt and .lnk files. The .txt copies fine, the .lnk returned the error).
        ONI HEUIR NI FEDIR

        Comment


        • #5
          Quoth fish3k1 View Post
          As for copying an existing shortcut, that's what I was originally trying. However, the COPY command doesn't seem to work with .lnk (shortcut) files. Just returns the error path cannot be found (tested this by creating a .txt file in documents and creating a shortcut in the same folder. Then ran the copy command on both the .txt and .lnk files. The .txt copies fine, the .lnk returned the error).
          It's possible that the .lnk file you were trying to copy was in a protected area and your command prompt wasn't elevated and had no access. Just a guess though, I've never really tried to copy shortcuts with a script before. And even then, I tend to use VBScript.

          Comment

          Working...
          X