Avatar billede anjep Nybegynder
19. september 2001 - 12:55 Der er 7 kommentarer og
2 løsninger

Login script

Er der nogen der kan fortælle mig hvordan man starter et program via login scriptet, jeg skal bruge koden.

/Anjep
Avatar billede NanoQ Nybegynder
19. september 2001 - 12:58 #1
Du sætter såmen bare et # foran programmet.

Altså f.eks. #c:\\windows\\program.exe

NanoQ
Avatar billede wise Seniormester
19. september 2001 - 12:59 #2
Denne står i mit login script, og virker under windows95+98+2000, men ikke i dos
@\\\\iu_novell\\sys\\public\\NalExpLd.exe
@\\\\server\\volume\\path......\\
Avatar billede wise Seniormester
19. september 2001 - 13:03 #3
Hmmm, jeg har faktisk både @ / # i mit loginscript, kan ikke huske forskellen men mener at ved
@ åbner programmet uafhændigt af scriptet
og ved
# venter scriptet til programmet er udført....
Avatar billede NanoQ Nybegynder
19. september 2001 - 13:04 #4
#\\\\server\\volume\\path\\program.exe even

Lidt mere info:

# (Execute External Program)
Use this command (the # symbol) to execute a program that is external to the login script.




Command Format
# [path] filename [parameter]


Replace path with a drive letter, or, if you have specified NOSWAP on the command line or in the login script, you may replace path with a full directory path beginning with the NetWare volume name.

Replace filename with an executable file (files that end in .EXE, .COM, or .BAT, for example). Do not include the extension.

Replace parameter with any parameters that must accompany the executable file.




Using #
If you want the LOGIN utility to execute a program that is external to the login script, enter the # command (symbol) followed by the name of the file you want to execute.

This command fails when

The given directory is invalid

Proper security rights are lacking

The executable file cannot be found

Insufficient workstation memory is available to load the file
NOTE:  LOGIN swaps to extended or expanded memory or to disk unless NOSWAP is specified on the command line or in the login script.

NOSWAP prevents LOGIN from being swapped out of conventional memory. Then, if the station does not have enough memory to handle both LOGIN and the # command, the # command fails but the rest of the login script executes normally.

For more information, see SWAP.







Examples
When you want to define a default print queue and printer, you can make the login script execute the NetWare CAPTURE utility. This allows you to send print jobs to a network print queue (named QUEUE_FOR_LASERJET in this example).

If you have a search drive mapped to SYS:PUBLIC where the NetWare utilities are stored, you could enter the following command in the login script:

#CAPTURE Q=QUEUE_FOR_LASERJET NB TI=10 NFF


You do not need to enter a path in this case because CAPTURE is located in a search drive.

If you do not have a search drive mapped to a directory, include the path to that directory in the command. For example, to run a batch file named BATCH.BAT in the ACCOUNTS directory, use the following command:

#Z:\\ACCOUNTS\\BATCH

Avatar billede NanoQ Nybegynder
19. september 2001 - 13:05 #5
Du kan som Wise skriver også bruge @

Lidt info:
@
Use the @ command to execute a program that is external to the login script and then continue with the script (similar to the Startup group). Enter the @ command followed by the name of the file that you want to execute.

IMPORTANT:  Use the @ command instead of the # command to run an external program from a login script if that external program will remain open for any length of time. Otherwise, the login script will remain open until that external program is closed. (Login scripts cannot be edited when they are held open.)


This command fails when

The given directory is invalid
Proper security rights are lacking
The executable file cannot be found
Insufficient workstation memory is available to load the file



Command Format
@ [path] filename [parameter]


Replace path with a drive letter.

Replace filename with an executable file (files that end in .EXE, .COM, or .BAT, for example). Do not include the extension.

Replace parameter with any parameters that must accompany the executable file.



Examples
If you want to start the GroupWise® program from within the login script, you must have a search drive mapped to where the GroupWise application is stored. Enter the following command in the login script:

@GRPWISE5


You do not need to enter a path in this case, because the executable program file for GroupWise 5 (GRPWISE5.EXE) is located in a search drive.

If you do not have a search drive mapped to the directory where the program is located, include the path to that directory in the command. For example, if the program to run GroupWise 5 is located in the APPS directory on drive G, use the following command:

@SYS:\\APPS\\GRPWISE5



NanoQ
Avatar billede wise Seniormester
19. september 2001 - 13:10 #6
Jammen så fik vi afklaret det, takker...
(Jeg var da heldigvis ikke helt skævt på den :-))
Avatar billede NanoQ Nybegynder
19. september 2001 - 13:17 #7
;)
Avatar billede anjep Nybegynder
19. september 2001 - 13:35 #8
Jeg vil straks teste det, vender tilbage med nogle point hvis det virker.

Tak for den hurtige hjælp!

/Anjep
Avatar billede anjep Nybegynder
19. september 2001 - 18:33 #9
Så er der lidt point til jer :-)

Wise = 20, for det hurtige svar
Nanoq = 40, for alle forklaringerne

Jeg håber i er enige med mig!

/Anjep
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester