Page 1 of 3 123>
Topic Options
#28941 - 2002-09-12 10:50 PM Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
I have a really simple script that I am trying to run. Everything runs fine except the copy command when I login. If I run kix32 kathy at a command line the shortcut copies to the desktop.
What am I doing wrong?

;This is a test kixtart script created for Marshall users on Win98
; Created 9/12/2001 - Kathy
if ingroup("TX Mapcon Test")
? "You are a Member of Mapcon Group"
Use O: /delete /PERSISTENT
USE O: "\\Server\Apps\Apps"/PERSISTENT
COPY "//Server\netlogon\shortcuts\mapcontest.lnk" "C:\windows\desktop"
? "You should have a shortcut on your desktop that looks like a toolbox"
ELSE
?"Notify Kathy that your script is not working correctly"
ENDIF
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28942 - 2002-09-12 10:55 PM Re: Copying Shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
first note, pretty old script you got there... from last year... [Big Grin]

anyway, your copy is wrong and not even preferred:
COPY "//Server\netlogon\shortcuts\mapcontest.lnk" "C:\windows\desktop"

should be:
COPY "\\Server\netlogon\shortcuts\mapcontest.lnk" "C:\windows\desktop"

also, the desktop location is not always that.
meaning you should read the value from registry...

and most importantly, you should not traffic only one logonserver, but the one user is logging on:
COPY @ldrive+"\shortcuts\mapcontest.lnk" "C:\windows\desktop"
_________________________
!

download KiXnet

Top
#28943 - 2002-09-13 02:49 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
Hey give me a break here. I am a Netware Certified person that has been thrust into the MS world against my will. Netware wins HANDS DOWN. haha!
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28944 - 2002-09-13 03:00 PM Re: Copying Shortcut
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
have you see the stock prices lately [Smile]

There are a number of utilities (functions) to create shortcuts in the UDF forum.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#28945 - 2002-09-13 03:01 PM Re: Copying Shortcut
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Oh dear... don't go there. We have a lot of SAD (SysAdmin by Decree) people on this board. Deal with it.

Lonkero makes some good points but unlikely that is the solution. If your script works after logon but not during then you have other issues.

I suggest you try debugging the script to see where it fails.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#28946 - 2002-09-13 04:41 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
I was just joking. I was a COBOL programmer in my previous life. I will look on the forum for better examples of simple login scrips. All I need is a drive mapped and a shortcut put on the desktop. Thanks for all your help!
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28947 - 2002-09-13 06:17 PM Re: Copying Shortcut
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If you put a
code:
? ''+@ERROR+' - '+@SERROR

after your copy command, you will get the error message generated for that copy command. If the copy is successful, error will be '0'.

You might also want to make sure to run the login script synchronously, see W2k/XP - Keep the Window visible on login?
_________________________
There are two types of vessels, submarines and targets.

Top
#28948 - 2002-09-13 08:40 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
Why is it?- so easy from a command prompt to copy a shortcut to the desktop and within Kixtart so hard? I get a drive mapped fine. (We have a program that all it needs is a drive mapping and a shorcut.) But copying a shortcut I cannot get to work.

Kixtart v4.11
Users have a Netware 5.1 and a Win2k login script - this is temporary Netware is being phased out.
Users have win98.
Anyone have a script that is copying a shortcut that is working I can look at?
Thanks for help.
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28949 - 2002-09-13 09:01 PM Re: Copying Shortcut
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
It is different to copy a shortcut when you're already logged on and during the logon phase. please read the following FAQs:
Copy a shortcut to the Desktop, Start Menu, etc.
Sequence of events during logon

You should really put some error checks into your code to figure out what exactly is going wrong, for example check that the directories and files actually exist.

If you have a working command lne to copy the shortcut, why don't you try that one from within the login script and see whether it succeeds. I suspect that your command line copy will fail, too.

Are you using profiles under Windows 9x? you need to establish the exact location of the desktop folder before copying, it does not ahve top be at c:\windwos\desktop.
_________________________
There are two types of vessels, submarines and targets.

Top
#28950 - 2002-09-13 09:04 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
JENS:
The FAQs are where? If I type the copy command at a command line prompt, it works. Just not within the kixtart script. I am new to all of this.
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28951 - 2002-09-13 09:05 PM Re: Copying Shortcut
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
they are links, just click on them.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#28952 - 2002-09-13 09:56 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
Ok with the help of some of the links I think I have narrowed the problem down. I think Win98 is loading the desktop before the script has time to put the shortcut on the desktop.

The reason I think this is that if I login as usual, I get no icon on the desktop. If I go to a command line and type kix32 test.kix. The icon appears. I read on a link to change the registry value for winlogon to 1 this is suppose to tell the system to run all the scripts before presenting the win98 desktop but I tried this and it did not work. Anyone else have an idea? I am having so much fun with this - I love this forum.
Kixtart v4.11
Servers Netware 5.1 and Win2K
Users running Netware and Win2k logon script
Users have Win98 workstations
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28953 - 2002-09-13 10:11 PM Re: Copying Shortcut
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Kathy,
You're on the right track... just maybe going in the wrong direction. The issue is likely that the desktop has not yet been set whilst still in the logon. This is a well known issue with Wintendos. In fact, I have an FAQ on it.

Topic: Sequence of events during logon

Pay attention to the bit about RunOnce and then search for that on the board.

Yeah Jens, you said it first... but sometimes it take more than one person to say it. [Wink]

[ 13. September 2002, 22:16: Message edited by: LLigetfa ]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#28954 - 2002-09-13 10:13 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
Another test, I ran the kix32 test.kix /debug and used F* to step each line in the script. It ran fine. Just one more thing to help backup my theory that all the things running when a user logs in is keeping the script from running correctly. Anyone else have this problem and know of a fix? Thanks - have a great weekend it is 94 degrees F here in Texas.
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28955 - 2002-09-13 10:18 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
Next question.
How can I get a win98 PC to wait until the logon scripts finish before loading the desktop?

I tried the setting winlogon set to 1. Did not help.
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28956 - 2002-09-13 10:21 PM Re: Copying Shortcut
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Many before you have tried... RunOnce RunOnce
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#28957 - 2002-09-13 10:23 PM Re: Copying Shortcut
GRF Offline
Fresh Scripter

Registered: 2002-02-15
Posts: 45
Loc: Ohio
I use the following and have never had it not work.

code:
 $Icon98 = "C:\windows\DESKTOP\ESI.PIF"
if exist ($icon98) = 0 copy "q:\esi98.pif" "C:\windows\desktop\ESI.pif"
endif

Hope it helps,
_________________________
GF

Top
#28958 - 2002-09-13 10:29 PM Re: Copying Shortcut
Kathy Offline
Getting the hang of it

Registered: 2002-09-09
Posts: 96
Loc: Marshall, TX
My ignorance is showing. Aren't .pif files old windows files.

What does your code do? I need explanations.
_________________________
Stupid is forever - Ignorance can be fixed.

Top
#28959 - 2002-09-13 11:11 PM Re: Copying Shortcut
GRF Offline
Fresh Scripter

Registered: 2002-02-15
Posts: 45
Loc: Ohio
It's just a pointer to another executable. You should be able to replace the .pif with whatever extension (in your case .lnk) you want.

Good luck,
_________________________
GF

Top
#28960 - 2002-09-13 11:11 PM Re: Copying Shortcut
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
fdisk will fix most of this.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 3 123>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 692 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.071 seconds in which 0.023 seconds were spent on a total of 11 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org