what is wrong with my push script??

Change Page: < 12 | Showing page 2 of 2, messages 21 to 39 of 39
Author Message
canon

  • Total Posts : 31
  • Scores: 0
  • Reward points : 0
  • Joined: 2/23/2005
  • Location: Belgium
  • Status: offline
Re: what is wrong with my push script?? Saturday, February 26, 2005 8:19 AM (permalink)
0
what for a code is it?
 
#21
    token

    • Total Posts : 1917
    • Scores: 0
    • Reward points : 0
    • Joined: 1/14/2005
    • Location:
    • Status: offline
    Re: what is wrong with my push script?? Saturday, February 26, 2005 10:04 AM (permalink)
    0
    Pardon me ?
     
    #22
      Snipah

      • Total Posts : 1339
      • Scores: 8
      • Reward points : 0
      • Joined: 11/1/2004
      • Location: Scotland
      • Status: offline
      Re: what is wrong with my push script?? Saturday, February 26, 2005 12:03 PM (permalink)
      0
      quote:
      Originally posted by canon

      what for a code is it?




      welcome at VISUALBASICSCRIPT.com
       
      #23
        Bushmen

        • Total Posts : 122
        • Scores: 0
        • Reward points : 0
        • Joined: 2/4/2005
        • Location:
        • Status: offline
        Re: what is wrong with my push script?? Sunday, February 27, 2005 10:49 PM (permalink)
        0
        hey, scripting guy is microsoft

        here is the link

        http://www.microsoft.com/technet/scriptcenter/resources/qanda/hsgarch.mspx

        Bushmen
         
        #24
          Zifter

          • Total Posts : 315
          • Scores: 0
          • Reward points : 0
          • Joined: 1/5/2005
          • Location: Belgium
          • Status: offline
          Re: what is wrong with my push script?? Sunday, February 27, 2005 11:07 PM (permalink)
          0
          I think he's referring to [url="http://www.computerperformance.co.uk/ezine/ezine24.htm"]this[/url] site

          HTH
           
          #25
            Bushmen

            • Total Posts : 122
            • Scores: 0
            • Reward points : 0
            • Joined: 2/4/2005
            • Location:
            • Status: offline
            Re: what is wrong with my push script?? Sunday, February 27, 2005 11:38 PM (permalink)
            0
            ah, apologies. i'll check it out.

            thanks.

            bushmen
             
            #26
              token

              • Total Posts : 1917
              • Scores: 0
              • Reward points : 0
              • Joined: 1/14/2005
              • Location:
              • Status: offline
              Re: what is wrong with my push script?? Monday, February 28, 2005 11:44 AM (permalink)
              0
              I guess he is satisfied, no complains so far
               
              #27
                kracksmith

                • Total Posts : 198
                • Scores: 0
                • Reward points : 0
                • Joined: 2/24/2005
                • Location:
                • Status: offline
                Re: what is wrong with my push script?? Monday, February 28, 2005 1:01 PM (permalink)
                0
                Thanks again Token. It worked like a charm!!!

                One little question. What if i wanted to add a user and a group?

                Is this the right verbage?

                DIM UserName
                UserName = UCASE(objNetwork.UserName)
                If UserName = "John" Then
                WScript.Echo "This push worked for John!!!"
                fso.CopyFile "\\blasms\I_folder\test\database3.txt", "C:\designDB\"
                end if
                 
                #28
                  token

                  • Total Posts : 1917
                  • Scores: 0
                  • Reward points : 0
                  • Joined: 1/14/2005
                  • Location:
                  • Status: offline
                  Re: what is wrong with my push script?? Monday, February 28, 2005 2:17 PM (permalink)
                  0
                  If you want to copy a file based on the userID, in your case, "john", then your script is correct except you would have:

                  If UserName = "JOHN" Then

                  instead of

                  If UserName = "John" Then

                  because the UserName variable will hold a string that contains ONLY upper case letters (because you convert then into upper case using hte UCASE function).

                   
                  #29
                    kracksmith

                    • Total Posts : 198
                    • Scores: 0
                    • Reward points : 0
                    • Joined: 2/24/2005
                    • Location:
                    • Status: offline
                    Re: what is wrong with my push script?? Monday, March 07, 2005 3:55 AM (permalink)
                    0
                    token can you write me a script just like the one you did but user name only instead of group?

                    I've been trying all week and can't get it right.

                    I dunno, i can't get the concept of programming.


                     
                    #30
                      token

                      • Total Posts : 1917
                      • Scores: 0
                      • Reward points : 0
                      • Joined: 1/14/2005
                      • Location:
                      • Status: offline
                      Re: what is wrong with my push script?? Monday, March 07, 2005 6:31 AM (permalink)
                      0
                      Do you want to copy a file if the userID matches one of the pre-defined userIDs ? If so, you may use the follow code; otherwise, you will have to explain more about what you want to do.

                      ================================================================================================
                      Option Explicit
                      Dim network, fso
                      Set network = CreateObject("WScript.Network")
                      Set fso = CreateObject("Scripting.FileSystemObject")

                      If UCase(network.Username) = "JOHNQ" Then
                      WScript.Echo "The pushes for userID JOHNQ works!!!"
                      fso.CopyFile "\\blasms\I_folder\test\database1.txt", "C:\designDB\"
                      end if

                       
                      #31
                        kracksmith

                        • Total Posts : 198
                        • Scores: 0
                        • Reward points : 0
                        • Joined: 2/24/2005
                        • Location:
                        • Status: offline
                        Re: what is wrong with my push script?? Monday, March 07, 2005 7:27 AM (permalink)
                        0
                        yes, this is exactly what I want to do.

                        what about the function? don't i need a function with this script?


                         
                        #32
                          token

                          • Total Posts : 1917
                          • Scores: 0
                          • Reward points : 0
                          • Joined: 1/14/2005
                          • Location:
                          • Status: offline
                          Re: what is wrong with my push script?? Monday, March 07, 2005 7:30 AM (permalink)
                          0
                          You don't need any kind of function because the string you want to match, in this case, "JOHNQ", is a literal string and can be used directly when doing a string comparison using the IF statement.

                           
                          #33
                            kracksmith

                            • Total Posts : 198
                            • Scores: 0
                            • Reward points : 0
                            • Joined: 2/24/2005
                            • Location:
                            • Status: offline
                            Re: what is wrong with my push script?? Monday, March 07, 2005 8:06 AM (permalink)
                            0
                            thanks for all your time

                            but how come the script you wrote me for the group logon needed a function?

                             
                            #34
                              token

                              • Total Posts : 1917
                              • Scores: 0
                              • Reward points : 0
                              • Joined: 1/14/2005
                              • Location:
                              • Status: offline
                              Re: what is wrong with my push script?? Monday, March 07, 2005 8:12 AM (permalink)
                              0
                              Because if given a specific userID, you still need to *determine* the groups to which the user belongs, so you use the function for that (you do NOT HAVE to use a function, but it's just easier to write your script that way)

                              But if you are given a specific userID, you don't need anything else to determine the userID itself because you have already got it.

                               
                              #35
                                kracksmith

                                • Total Posts : 198
                                • Scores: 0
                                • Reward points : 0
                                • Joined: 2/24/2005
                                • Location:
                                • Status: offline
                                Re: what is wrong with my push script?? Monday, March 07, 2005 8:22 AM (permalink)
                                0
                                Right! that is right. why didn't I think of it beats me.

                                thanks again for your time and efforts with my problem.


                                p.s. I need an exact .bat file script you wrote me for the .vbs group logon script. My XP and 2000 users are set. But my Win9x users need to do the exact same thing. Management don't want to install AD Client on the Win9x machines since we are suppose to get rid of it soon. After this it should be case close finally.

                                 
                                #36
                                  token

                                  • Total Posts : 1917
                                  • Scores: 0
                                  • Reward points : 0
                                  • Joined: 1/14/2005
                                  • Location:
                                  • Status: offline
                                  Re: what is wrong with my push script?? Monday, March 07, 2005 8:37 AM (permalink)
                                  0
                                  heh, you are supposed to get rid of it now :)

                                  I'm sorry but I don't know how to do the same thing with batch programming.

                                  I think you can tell your "Management" that win9x users will NOT BE ABLE TO have the files copied (or whatever you intend to do with the VBS script) because they fail to meet the requirement of running the scripts in the first place.

                                   
                                  #37
                                    kracksmith

                                    • Total Posts : 198
                                    • Scores: 0
                                    • Reward points : 0
                                    • Joined: 2/24/2005
                                    • Location:
                                    • Status: offline
                                    Re: what is wrong with my push script?? Monday, March 07, 2005 8:42 AM (permalink)
                                    0
                                    haha yea you know what, you are right. we are suppose to get rid of it. I was just trying to get some brownie points from some of the upper management users.

                                    but Thanks


                                     
                                    #38
                                      token

                                      • Total Posts : 1917
                                      • Scores: 0
                                      • Reward points : 0
                                      • Joined: 1/14/2005
                                      • Location:
                                      • Status: offline
                                      Re: what is wrong with my push script?? Monday, March 07, 2005 11:22 AM (permalink)
                                      0
                                      heh.. No problem :)

                                       
                                      #39

                                        Online Bookmarks Sharing: Share/Bookmark
                                        Change Page: < 12 | Showing page 2 of 2, messages 21 to 39 of 39

                                        Jump to:

                                        Current active users

                                        There are 0 members and 1 guests.

                                        Icon Legend and Permission

                                        • New Messages
                                        • No New Messages
                                        • Hot Topic w/ New Messages
                                        • Hot Topic w/o New Messages
                                        • Locked w/ New Messages
                                        • Locked w/o New Messages
                                        • Read Message
                                        • Post New Thread
                                        • Reply to message
                                        • Post New Poll
                                        • Submit Vote
                                        • Post reward post
                                        • Delete my own posts
                                        • Delete my own threads
                                        • Rate post

                                        2000-2012 ASPPlayground.NET Forum Version 3.9