SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Addict
    Join Date
    Nov 2000
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Short Cut To Profiles

    Hi, not sure if this is the right forum but here goes.

    I would like to have a link so that I can send it to people I work with, so when they click it, it will open their profile folder.

    I guess what it needs to do it recognise the username and open the respected folder. I tried the following <file://C:\WINNT\Profiles\%username%> but outlook thought it was a program and asked me to open or save it.

    If I remove %username% the link will open the profiles folder ok.

    There are about 100 people that work here and I was hoping to be able to send one email to all users so they could all click the same link but be taken to their own folder. We are logged on to a Domain Controller but the user can edit their profiles on the local machine and then this will update the server when they log out of the system so the link would only ever need to be to the local machine.

    Does anyone have any idea's?

    Thanks in advance
    Tez

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

    <form name="open" action="C:\Documents and Settings\">
      <input type="
    submit" value="open">
      <!-- or -->
      <iframe src="
    C:\WINNT\Profiles\username" width="500" height="300"></iframe>
    </form> 
    but this is not exactly what you need.

    heres a wsh example

    PHP Code:
    <package>
       <
    job id="vbs">
          <
    script language="VBScript">
             
    Set WshNetwork WScript.CreateObject("WScript.Network")
             
    WScript.Echo "Domain = " WshNetwork.UserDomain
             WScript
    .Echo "Computer Name = " WshNetwork.ComputerName
             WScript
    .Echo "User Name = " WshNetwork.UserName
          </script>
       </job>

       <job id="js">
          <script language="JScript">
             var WshNetwork = WScript.CreateObject("WScript.Network");
             WScript.Echo("Domain = " + WshNetwork.UserDomain);
             WScript.Echo("Computer Name = " + WshNetwork.ComputerName);
             WScript.Echo("User Name = " + WshNetwork.UserName);
             }
          </script>
       </job>
    </package> 
    I couldn't get this to work but ask Flawless_koder as he knows all about this stuff

  3. #3
    SitePoint Addict
    Join Date
    Nov 2000
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help, I have contacted Flawless_koder to see if he can help also.

    I have never used wsh before, would extra software need to be installed to run wsh or is it a client script like javascript? The systems that it will be ran on is Windows NT 4 clients and as far as I know the servers will be NT 4 also.

    Tez

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this site should clear this up for you

  5. #5
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm.. you want the username?

    var Ws= new ActiveXObject("WScript.Network")
    alert(Ws.UserUserName);

    That should do it (in a JScript)
    (dependant on users' active X settings)

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  6. #6
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

    <form name="opener">
      <
    input type="button" value="open" onclick="window.location.href = locatedAT;">
    </
    form>

          <
    script>
        var 
    Ws= new ActiveXObject("WScript.Network");
        
        
    locatedAT 'C:\\Documents and Settings\\' Ws.ComputerName '\\';
        
    locatedAT=locatedAT.toLowerCase();
        
          
    </script> 
    How would you do this without invoking the active x handler?

  7. #7
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm - doing that is hacking, to be honest.
    It is possible, but if i tell you how to do that..
    well then you can do whatever you want to the
    operating system that's not a good thing!

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  8. #8
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

    <form name="opener">
      <
    input type="button" value="open" onclick="window.location.href = locatedAT;">
    </
    form>

          <
    script>
        var 
    Ws= new ActiveXObject("WScript.Network");
        
        
    locatedAT 'C:\\Documents and Settings\\' Ws.ComputerName '\\';
        
    locatedAT=locatedAT.toLowerCase();
        
          
    </script> 
    How would you do this without invoking the active x handler?

  9. #9
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

    <form name="opener">
      <
    input type="button" value="open" onclick="window.location.href = locatedAT;">
    </
    form>

          <
    script>
        var 
    Ws= new ActiveXObject("WScript.Network");
        
        
    locatedAT 'C:/Documents and Settings/' Ws.ComputerName '/';
        
    locatedAT=locatedAT.toLowerCase();
        
          
    </script> 
    How would you do this without invoking the active x handler?

  10. #10
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry Andrew - are you asking how to create
    an WSH object without using Active X?

    I don't think it's possible!?
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  11. #11
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm - doing that is hacking, to be honest.
    It is possible, but if i tell you how to do that..
    well then you can do whatever you want to the
    operating system that's not a good thing!
    ---------------------------------------------------
    Sorry Andrew - are you asking how to create
    an WSH object without using Active X?

    I don't think it's possible!?
    Well, I don't want to hack but allowing active x objects all the time can be tedious, so is it possible or not?

    ps sry for the extra post's sitepoints messing up on escaping chars


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •