Change Page:
< 12 | Showing page 2 of 2, messages 21 to 39 of 39
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)
|
|
|
|
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)
|
|
|
|
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)
quote: Originally posted by canon what for a code is it?
welcome at VISUALBASICSCRIPT.com
|
|
|
|
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)
|
|
|
|
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)
I think he's referring to [url="http://www.computerperformance.co.uk/ezine/ezine24.htm"]this[/url] site HTH
|
|
|
|
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)
ah, apologies. i'll check it out. thanks. bushmen
|
|
|
|
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)
I guess he is satisfied, no complains so far
|
|
|
|
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)
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
|
|
|
|
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)
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).
|
|
|
|
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)
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.
|
|
|
|
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)
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
|
|
|
|
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)
yes, this is exactly what I want to do. what about the function? don't i need a function with this script?
|
|
|
|
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)
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.
|
|
|
|
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)
thanks for all your time but how come the script you wrote me for the group logon needed a function?
|
|
|
|
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)
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.
|
|
|
|
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)
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.
|
|
|
|
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)
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.
|
|
|
|
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)
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
|
|
|
|
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)
|
|
|
|