20090605
Fink Troubles - Cannot perform symlink test http://nmanzi.com/?p=24
http://nmanzi.com/?p=24
[..8<..]
My problem, however, was that Fink wasn’t installing. At the install volume selection screen, I wasn’t able to select my root volume. It’s reasoning was: “You cannot install Fink on this volume. Cannot perform symlink test on this volume because of a permissions problem. Try performing the “Repair Disk Permissions” function in Disk Utility”.
[..8<..]
Entering the Fink Installer Package (right-click, Show Package Contents - in Finder), I could see three scripts in the Resources folder, one of which was VolumeCheck, which basically tells the Installer if you have permissions to the Volume in question. Editing this script, I made sure it did nothing but return an exit-code of ‘0′ back to the installer.
[..8<..]
#1. Stephen van Egmond
The test is whether / is writeable, and fails. Running as a regular user / is not writeable. I did this: bash-3.2# sudo chmod 777 /
[..8<..]
<b>#6. Joe Block 11.05.2008</b>
<b>
Your best bet is probably to do
<tt>sudo installer -target / -pkg /path/to/fink.pkg</tt>
That way you don’t need to monkey with the permissions on / or skip any other VolumeCheck checks.
</b>
20090604
http://tldp.org/LDP/abs/html/dosbatch.html
Appendix L. Converting DOS Batch Files to Shell Scripts
Quite a number of programmers learned scripting on a PC running DOS. Even the crippled DOS batch file language allowed writing some fairly powerful scripts and applications, though they often required extensive kludges and workarounds. Occasionally, the need still arises to convert an old DOS batch file to a UNIX shell script. This is generally not difficult, as DOS batch file operators are only a limited subset of the equivalent shell scripting ones.
Table L-1. Batch file keywords / variables / operators, and their shell equivalents
Batch File Operator | Shell Script Equivalent | Meaning |
---|---|---|
% | $ | command-line parameter prefix |
/ | - | command option flag |
\ | / | directory path separator |
== | = | (equal-to) string comparison test |
!==! | != | (not equal-to) string comparison test |
| | | | pipe |
@ | set +v | do not echo current command |
* | * | filename "wild card" |
> | > | file redirection (overwrite) |
>> | >> | file redirection (append) |
< | < | redirect stdin |
%VAR% | $VAR | environmental variable |
REM | # | comment |
NOT | ! | negate following test |
NUL | /dev/null | "black hole" for burying command output |
ECHO | echo | echo (many more option in Bash) |
ECHO. | echo | echo blank line |
ECHO OFF | set +v | do not echo command(s) following |
FOR %%VAR IN (LIST) DO | for var in [list]; do | "for" loop |
:LABEL | none (unnecessary) | label |
GOTO | none (use a function) | jump to another location in the script |
PAUSE | sleep | pause or wait an interval |
CHOICE | case or select | menu choice |
IF | if | if-test |
IF EXIST FILENAME | if [ -e filename ] | test if file exists |
IF !%N==! | if [ -z "$N" ] | if replaceable parameter "N" not present |
CALL | source or . (dot operator) | "include" another script |
COMMAND /C | source or . (dot operator) | "include" another script (same as CALL) |
SET | export | set an environmental variable |
SHIFT | shift | left shift command-line argument list |
SGN | -lt or -gt | sign (of integer) |
ERRORLEVEL | $? | exit status |
CON | stdin | "console" (stdin) |
PRN | /dev/lp0 | (generic) printer device |
LPT1 | /dev/lp0 | first printer device |
COM1 | /dev/ttyS0 | first serial port |
Batch files usually contain DOS commands. These must be translated into their UNIX equivalents in order to convert a batch file into a shell script.
Table L-2. DOS commands and their UNIX equivalents
DOS Command | UNIX Equivalent | Effect |
---|---|---|
ASSIGN | ln | link file or directory |
ATTRIB | chmod | change file permissions |
CD | cd | change directory |
CHDIR | cd | change directory |
CLS | clear | clear screen |
COMP | diff, comm, cmp | file compare |
COPY | cp | file copy |
Ctl-C | Ctl-C | break (signal) |
Ctl-Z | Ctl-D | EOF (end-of-file) |
DEL | rm | delete file(s) |
DELTREE | rm -rf | delete directory recursively |
DIR | ls -l | directory listing |
ERASE | rm | delete file(s) |
EXIT | exit | exit current process |
FC | comm, cmp | file compare |
FIND | grep | find strings in files |
MD | mkdir | make directory |
MKDIR | mkdir | make directory |
MORE | more | text file paging filter |
MOVE | mv | move |
PATH | $PATH | path to executables |
REN | mv | rename (move) |
RENAME | mv | rename (move) |
RD | rmdir | remove directory |
RMDIR | rmdir | remove directory |
SORT | sort | sort file |
TIME | date | display system time |
TYPE | cat | output file to stdout |
XCOPY | cp | (extended) file copy |
Virtually all UNIX and shell operators and commands have many more options and enhancements than their DOS and batch file counterparts. Many DOS batch files rely on auxiliary utilities, such as ask.com, a crippled counterpart to read. DOS supports only a very limited and incompatible subset of filename wild-card expansion, recognizing just the * and ? characters. |
Converting a DOS batch file into a shell script is generally straightforward, and the result ofttimes reads better than the original.
Example L-1. VIEWDATA.BAT: DOS Batch File
REM VIEWDATA |
The script conversion is somewhat of an improvement. [1]
Example L-2. viewdata.sh: Shell Script Conversion of VIEWDATA.BAT
#!/bin/bash |
Ted Davis' Shell Scripts on the PC site has a set of comprehensive tutorials on the old-fashioned art of batch file programming. Certain of his ingenious techniques could conceivably have relevance for shell scripts.
Notes
[1] | Various readers have suggested modifications of the above batch file to prettify it and make it more compact and efficient. In the opinion of the ABS Guide author, this is wasted effort. A Bash script can access a DOS filesystem, or even an NTFS partition (with the help of ntfs-3g) to do batch or scripted operations. |
http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx
Introducing IE=EmulateIE7
Bill Gates’ recent Tech Ed keynote and Tony Chor’s follow-up blog announced that IE8 Beta 2 will be available in August in many languages. We are encouraging sites to get ready for Beta 2 prior to release as it will present a big jump in IE8 browsing traffic.
What does “getting ready for IE8” mean for web sites? IE8 displays content in IE8 Standards mode – its most standards-compliant layout mode – by default. In previous blog posts, we’ve discussed how this aligns with our commitment to Web standards interoperability. However, browsing with this default setting may cause content written for previous versions of IE to display differently than intended. This creates a “get ready” call to action for site owners to ensure their content will continue to display seamlessly in IE8.
The preferred response to this call to action is to update the site to ensure that IE8 is provided with standards content fitting the DOCTYPE. However, we know it is very important to give site owners the chance to update site content on their schedule without affecting user experience. As such, we provide a meta-tag that tells IE8 to display an entire site or a specific page like it did in IE7.
In IE8 Beta 1, that option is the “IE=7” X-UA-Compatible tag, which instructs IE8 to display content in IE7 Standards mode. However, the scenario this doesn’t address is when IE=7 is applied as an HTTP header to a site that contains Quirks mode pages. The IE=7 HTTP header will force all pages – both Quirks and Standards – to display in IE7 Standards mode. Developers using this header while updating their sites would then have to add the “IE=5” tag to each page they want to keep in Quirks mode. This logic is fine for many websites. However, if a site has lots of Quirks mode pages, or for the case where pages with frames host a mix of Strict and Quirks mode content – as brought to light by IE8 Beta 1 user feedback – the compatibility opt-out adds a bit more work than we intended.
In response to the great IE8 Beta 1 feedback we’ve received so far, we are introducing the “IE=EmulateIE7” tag to address this problem. EmulateIE7 tells IE8 to display standards DOCTYPEs in IE7 Standards mode, and Quirks DOCTYPEs in Quirks mode. We believe this will be the preferred IE7 compatibility mode for most cases. Support for IE=EmulateIE7 is available now as part of the IE June Security Update for IE8 Beta 1. Installing this update will enable you to verify you’ve applied the EmulateIE7 tag to your site correctly.
In summary, IE7 compatibility support looks as follows:
Content Value | Details |
IE=7 | Display in IE7 Standards mode; Already supported in the IE8 Beta 1 release |
IE=EmulateIE7 | Display standards DOCTYPEs in IE7 Standards mode; Display quirks DOCTYPEs in Quirks mode; Available through the IE June Security Update for IE8 Beta 1 |
There are two ways to implement this tag:
- On a per-site basis, add a custom HTTP header
X-UA-Compatible: IE=EmulateIE7
- On a per-page basis, add a special HTML tag to each document, right after the tag
Implementing the HTTP header is beneficial if a site owner wants most of their site to render as it did in IE7 or if there are no plans to update site content. Inclusion of this header honors any Quirks mode pages that belong to the site.
Using the meta-tag on a per-page basis is beneficial when the publisher wants to opt-in specific pages to render as they did in IE7.
NOTE: The X-UA-Compatible tag and header override any existing DOCTYPE. Also, the mode specified by the page takes precedent over the HTTP header. For example, you could add the EmulateIE7 HTTP header to a site, and set specific pages to display in IE8 mode (by using the meta-tag with content=”IE8”).
Using the IE=EmulateIE7 compatibility tag is a simple way for users to continue their current experience when browsing your site until you can update with more standards-compliant content. Although adding this tag will prevent most display issues, you may also need to update your site to properly detect IE8. To learn more about IE8 document compatibility and browser detection, check out the IE Compatibility Center.
Jefferson Fletcher
Product Manager
Internet Explorer
P.S.: Here are some links to reference for adding custom HTTP headers on various versions of IIS and Apache servers: IIS7.0, IIS6.0, Apache 2.2, Apache 2.0, Apache 1.3
Published Tuesday, June 10, 2008 2:15 PM by ieblog Filed under: Tips and Tricks, Developers, Compatibility--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
http://www.robvanderwoude.com/userinput.php
Sometimes we need some user interaction in our batch files.
We may need to know to which directory a file is to be copied, for example.
Or which drive needs to be formated.
There are many ways to achieve this user interaction.
The most basic form of user interaction, of course, is the PAUSE command, which halts the batch file until the user presses "any key" (apart from Ctrl, Alt, Shift, CapsLock, NumLock or ScrollLock).
Maybe not really sophisticated, but it works and is always available, in all DOS, Windows and OS/2 versions.
MS-DOS
In the MS-DOS 3 days, a simple Yes/No question could be answered by changing to a temporary directory where two temporary batch files were located, Y.BAT and N.BAT.
Guess what happend if a user typed a completely different answer . . .
Since MS-DOS 6 we have CHOICE.COM (CHOICE.EXE in later versions), a much more versatile and reliable way to solve one character answers like Yes/No.
Unfortunately, the CHOICE command was discontinued in Windows NT 4 and later.
You may want to try my Poor Man's Choice instead, or use DEBUG to create REPLY.COM, as published in Microsoft Knowledge Base article Q77457: Accepting Keyboard Input in Batch Files.
There is another way to receive user input: COPY CON
The command:
COPY CON filename
copies the user input on the command line to the file filename.
To stop entering user input, the user has to type Ctrl+Z (or F6), followed by the Enter key.
Many PC users and batch file authors (including myself), find this approach "less intuitive", to say the least. One would expect that pressing the enter key is enough, and once you find out it isn't, the previous line of input cannot be removed anymore.
The following trick uses ANSI to perform some key translation: the Enter key is translated to the F6 key followed by the Enter key. Thus only one line of input can be entered, and pressing the Enter key sends the input to the temporary file USERINP.TMP.
ECHO Enter some input, and press Enter when ready . . .
ECHO ←[13;0;64;13p
COPY CON USRINPUT.TMP
ECHO ←[13;13p
CLS
ECHO You typed:
TYPE USRINPUT.TMP
Note: The ← character is the Esc character, or ASCII character 27 (or 1B Hexadecimal).
It is a representation of the Esc key.
This Esc character is not to be confused with escape characters!
The previous example is only a bare minimum. The following example not only asks for user input, but stores it in an environment variable USRINPUT as well:
@ECHO OFF
REM * Ask for USeR INPUT and store it in variable USRINPUT
REM * Written by Rob van der Woude
SET USRINPUT=
REM * Turn on ANSI key translation (translate Enter
REM * key to F6+Enter sequence) and ask for input:
ECHO ←[13;0;64;13pEnter one word only . . .
REM * Copy entered text to temporary file:
COPY CON %TEMP%.\~USRINP.TMP
REM * Turn off ANSI key translation and clear irrelevant screen output:
ECHO ←[13;13p←[3A←[K←[1B←[K←[1B←[K←[2A
REM * Add empty line to temporary file. The empty line
REM * will be used to stop DATE asking for new date.
ECHO.>> %TEMP%.\~USRINP.TMP
ECHO.>> %TEMP%.\~USRINP.TMP
REM * Create a temporary batch file that will store the
REM * entered text into the environment variable USRINPUT:
TYPE %TEMP%.\~USRINP.TMP | DATE | FIND "):" > %TEMP%.\~USRINP.BAT
REM * Create more temporary batch files. Add
REM * more command line parameters if necessary,
REM * as in: ECHO SET USRINPUT=%%3 %%4 %%5 %%6 %%7 %%8 %%9>CURRENT.BAT
ECHO SET USRINPUT=%%3>CURRENT.BAT
REM * VOER.BAT and TYP.BAT are replacements for CURRENT.BAT for Dutch
REM * DOS versions; add your own language versions if necessary:
ECHO SET USRINPUT=%%6>VOER.BAT
ECHO SET USRINPUT=%%4>TYP.BAT
REM * This temporary batch file now sets the variable USRINPUT:
CALL %TEMP%.\~USRINP.BAT
REM * Display the result:
ECHO You typed: ←[1m%USRINPUT%←[0m
ECHO.
PAUSE
REM * Finally, clean up the mess of temporary files:
FOR %%A IN (%TEMP%.\~USRINP.BAT %TEMP%.\~USRINP.TMP VOER.BAT TYP.BAT CURRENT.BAT) DO DEL %%A
Click to view source Click to download the ZIPped sources
The previous batch file should work in every DOS version, assuming ANSI.SYS (or one of its replacements, like ANSI.COM) is loaded.
With a few minor adjustments (replace .BAT with .CMD everywhere) it can be used in OS/2 as well. Use READLINE instead, however, in OS/2's DOS sessions.
The following batch file checks if ANSI.SYS is loaded. If so, it will tell the user to press the Enter key only. If not, it will tell the user to press F6 first, followed by the Enter key.
However, to check if ANSI.SYS is loaded, this batch file needs MS-DOS 6 or later.
@ECHO OFF
REM * Asks for USeR INPut and store it in variable USRINPUT
REM * Uses ANSI if available, but works without ANSI too
REM * Assumes MS-DOS 6 or later
REM * Written by Rob van der Woude
REM * http://www.robvanderwoude.com
SET USRINPUT=
REM * Check if ANSI sequences can be used (needs at
REM * least MS-DOS 6 to get an errorlevel from FIND):
SET ANSI=1
MEM /C | FIND "ANSI" > NUL
IF ERRORLEVEL 1 SET ANSI=0
REM * Turn on ANSI key translation (translate Enter
REM * key to F6 + Enter sequence) if possible:
IF "%ANSI%"=="1" ECHO ←[13;0;64;13p
REM * Ask for input:
IF "%ANSI%"=="0" ECHO Enter one word only, and press F6 followed by Enter . . .
IF "%ANSI%"=="1" ECHO Enter one word only, and press Enter . . .
REM * Copy entered text to temporary file:
COPY CON %TEMP%.\~USRINP.TMP
REM * Turn off ANSI key translation and clear irrelevant screen output:
IF "%ANSI%"=="0" CLS
IF "%ANSI%"=="1" ECHO ←[13;13p←[3A←[K←[1B←[K←[1B←[K←[2A
REM * Add empty line to temporary file. The empty line
REM * will be used to stop DATE asking for new date.
ECHO.>> %TEMP%.\~USRINP.TMP
ECHO.>> %TEMP%.\~USRINP.TMP
REM * Create a temporary batch file that will store the
REM * entered text into the environment variable USRINPUT:
TYPE %TEMP%.\~USRINP.TMP | DATE | FIND "):" > %TEMP%.\~USRINP.BAT
REM * Create more temporary batch files. Add
REM * more command line parameters if necessary,
REM * as in: ECHO SET USRINPUT=%%3 %%4 %%5 %%6 %%7 %%8 %%9>CURRENT.BAT
ECHO SET USRINPUT=%%3>CURRENT.BAT
REM * VOER.BAT and TYP.BAT are replacements for CURRENT.BAT for Dutch
REM * DOS versions; add your own language versions if necessary:
ECHO SET USRINPUT=%%6>VOER.BAT
ECHO SET USRINPUT=%%4>TYP.BAT
REM * This temporary batch file now sets the variable USRINPUT:
CALL %TEMP%.\~USRINP.BAT
REM * Display the result:
IF "%ANSI%"=="0" ECHO You typed: %USRINPUT%
IF "%ANSI%"=="1" ECHO You typed: ←[1m%USRINPUT%←[0m
ECHO.
PAUSE
REM * Finally, clean up the mess of temporary files:
FOR %%A IN (%TEMP%.\~USRINP.BAT %TEMP%.\~USRINP.TMP VOER.BAT TYP.BAT CURRENT.BAT) DO DEL %%A
SET ANSI=
Click to view source Click to download the ZIPped sources
In NT we don't need temporary files and we can skip a few lines by using TYPE CON and FOR /F:
@ECHO OFF
:: UserInNT.bat
:: How to use the TYPE CON command to receive user input
:: Written by Rob van der Woude
:: http://www.robvanderwoude.com
ECHO.
ECHO Demonstration of receiving user input through the TYPE CON command.
ECHO Type in any string and close by pressing Enter, F6 (or Ctrl+Z), Enter.
ECHO Only the last non-empty line will be remembered, leading spaces are ignored.
ECHO.
:: Only one single command line is needed to receive user input
FOR /F "tokens=*" %%A IN ('TYPE CON') DO SET INPUT=%%A
:: Use quotes if you want to display redirection characters as well
ECHO You typed: "%INPUT%"
It is still just as un-intuitive as the first COPY CON example, though.
Click to view source Click to download the ZIPped sources
Latest news: Replace TYPE CON by MORE in the above NT batch file and you can save yourself pressing Enter once -- you'll need to press F6, Enter only instead of Enter, F6, Enter, though the latter will still work.
[Tip posted by "Frank" on alt.msdos.batch.nt]
Tom Lavedas' New and Improved Data Input Routine! shows a way to use a graphical box to ask for user input in Windows 95
Duke Communications International, Inc.'s tip # 0323: How can I get a batch file to prompt me for parameters? shows a way to get a graphical box asking for user input in Windows NT
Walter Zackery posted two interesting solutions to obtain user input in NT, on the alt.msdos.batch.nt news group.
One solution uses the FORMAT command, which will fail since it tries to format a diskette in drive A: at 160KB.
If you have a 5¼" drive as your A: drive don't use this one.
The second solution uses the LABEL command.
It will actually change drive C:'s volume label and then restore it again to its old value.
The volume label in NT is restricted to 32 characters, and so is the input string when using this LABEL trick for user input.
Besides that the batch file limits the string to 2 words (1 space) only.
I adapted the original postings so that the batch files no longer need to use temporary files. You can view the original postings at my Solutions found at alt.msdos.batch page.
Click to view source Using FORMAT
Click to view source Using LABEL
Click to download the ZIPped sources
Clay Calvert posted another interesting solution to obtain Yes or No input in most DOS versions by using DEL's /P switch (prompt for confirmation).
Another great solution by Eric Phelps uses a temporary HTA file to obscure a password while it is being typed.
Windows 2000/XP
In Windows 2000, user input can be obtained quite easily by using SET /P
SET /P variable=[promptString]
This command will display an optional promptString where the user can type in a string and press Enter. The typed string will then be stored in the specified environment variable variable.
KiXtart
A non-batch solution for Windows 95/98/NT/2000 users is the GETS function in KiXtart:
@ECHO OFF
:: UsrInKix.bat, Version 1.00 for Win32
:: Batch file using Kix to retrieve user input
:: Written by Rob van der Woude
:: http://www.robvanderwoude.com
:: Create a temporary Kix script that will
:: in turn create a temporary batch file:
> %TEMP%.\UserIn.kix ECHO REDIRECTOUTPUT( "NUL" )
>>%TEMP%.\UserIn.kix ECHO GETS $UserIn
>>%TEMP%.\UserIn.kix ECHO IF OPEN( 1, "@SCRIPTDIR\UserIn.bat", 5 ) = 0
>>%TEMP%.\UserIn.kix ECHO WRITELINE( 1, "SET UserIn=" + $UserIn )
>>%TEMP%.\UserIn.kix ECHO ELSE
>>%TEMP%.\UserIn.kix ECHO ? "Error opening temporary file, errorcode = " + @ERROR
>>%TEMP%.\UserIn.kix ECHO ENDIF
:: Prompt for user input:
ECHO Type anything you like and press Enter when finished:
:: retrieve user input using the Kix script, and
:: then store the result in a temporary batch file:
KIX32.EXE %TEMP%.\UserIn.kix
:: Call the temporary batch file to store
:: the result in an environment variable:
CALL %TEMP%.\UserIn.bat
:: Clean up the temporary files:
IF EXIST %TEMP%.\UserIn.* DEL %TEMP%.\UserIn.*
:: Finaly, display the result:
ECHO You typed: %UserIn%
Click to view source Click to download the ZIPped sources
VBScript
More advanced dialog boxes, output and input, including (masked) password prompts, can be created using VBScript and Internet Explorer, but I would not recommend creating them on the fly.
Sample change password dialog created using VBScript and Internet Explorer
See the VBScript Scripting Techniques section for some of these advanced user message windows.
OS/2
OS/2 users may want to take a look at UserInPM, a utility written in VX-Rexx, displaying a small PM window asking for user input.
It creates a temporary batch file to set an environment variable to the typed input.
An example batch file, with the resulting PM window:
SET USRINPUT=
USRINPUT.EXE Type whatever you like:
CALL USRINPUT.CMD
ECHO User input: %USRINPUT%
USRINPUT dialogue window
You will need the VX-Rexx runtime library VROBJ.DLL to run UserInPM.
http://www.robvanderwoude.com/pmadmin.php#PMChoice
This page is dedicated to administrators tools and tips based on "native" and freeware utilities only.
Knowing these tools may prove extremely valuable when you're faced with problems "in the middle of nowhere", without your own set of utilities nearby.
NT
* Do you need a tool to remotely execute commands on any PC?
You could of course use RCMD from the Microsoft Windows NT Server Resource Kit. Or, if "third party tools" are allowed, PSEXEC is an excellent RCMD replacement, available at SysInternals.com for free.
Or you can use the AT command to schedule the command 2 minutes from now:
NET TIME \\remotePC /SET
AT \\remotePC 10:02 "your command goes here"
If you prefer not to change your system time, download either PMSoon.bat or AtFuture.bat.
PMSoon.bat will only work if the time difference between the two systems is 1 minute or less. It will display a warning message if the difference is greater.
AtFuture.bat (a coproduction with Rob Fuller), intended for local use only, does not have this limitation.
* Do you need to prevent login scripts from running on servers?
Use NTRole (update: this utility is no longer available for download) to determine if the current "workstation" is actually a server or not.
Some company policies do not allow third party tools, however.
Of course, I wouldn't have mentioned NTRole here if I didn't have a "poor man's version" available: NTRole.bat.
Download the ZIPped version.
* Did you ever try to redirect or pipe CACLS' output in NT 4?
If you ever installed an NT Service Pack, what you probably saw were the permissions without the user IDs or groups that those permissions belonged to.
Instead of using XCACLS from the Microsoft Windows NT Server Resource Kit, extract CACLS from your original NT 4 CD-ROM and use that version whenever you need to redirect its output.
XCACLS' /Y switch can be emulated by piping a Y to CACLS' standard input:
ECHO Y| CACLS .....
Warning: Do not use the old CACLS version to set or change permissions if you have any NT 4 Service Pack applied.
A safe way to prevent yourself from accidentally using the old version is to rename the old CACLS.EXE to OLDCACLS.EXE.
* Disappointed because the CHOICE command wasn't implemented in NT? I know I was.
You could buy yourself a copy of the Microsoft Windows NT Server or Workstation Resource Kit.
Or you could download both PMChoice.bat and PMChoice.kix. The only missing part of this combination is that PMCHOICE does not accept redirected input, only keyboard input.
* SHORTCUT.EXE from the Microsoft Windows NT Server or Workstation Resource Kit is a great tool to set or read a shortcut's properties.
Many times, however, it is used just to read the path of a program file. In that case you may want to download Shortcut.bat, a batch file that uses internal commands only to read both the UNC and the fully qualified path from one or more shortcut files.
If you do need to create shortcuts, learn how to create shortcuts using INF files from this posting by Walter Zackery to the alt.msdos.batch.nt news group, and from this article by Daniel U. Thibault.
* If you ever need to create a fixed time delay in a batch file, but you do not have a copy of SLEEP.EXE from the NT Resource Kit available, just download PMSleep.bat (for Windows NT/2000) or PMSlpW9x.bat (for Windows 95/98).
These batch files use PING's -W switch to create a delay.
The following example will create a 1 minute delay in Windows NT and 2000:
CALL PMSLEEP.BAT 60
Due to limitations in the MS-DOS 7 batch language, we need to add 1 to the number of seconds specified in Windows 95 and 98:
CALL PMSLPW9X.BAT 61
This Windows 9x example will wait for 60 seconds, not 61.
You may also choose to download the latest KiXtart version from www.kixtart.org and use its SLEEP function within your batch file.
The following example will create a 1 minute delay:
ECHO $RC = SLEEP 60 > "%TEMP%.\SLEEP.KIX"
KIX32.EXE "%TEMP%.\SLEEP.KIX"
DEL "%TEMP%.\SLEEP.KIX"
This KiXtart script will work in all 32-bit Windows versions, as long as KiXtart is installed.
http://academic.evergreen.edu/projects/biophysics/technotes/program/ansi_esc.htm#notes
Programming
NotesEntering the {ESC} Character
Enabling ANSI.SYS Before using escape seqences, ANSI.SYS must be named as a device driver in the CONFIG system file.
Using ANSI.SYS Escape Sequences Because ANSI.SYS commands control the console device, they must be typed at the keyboard or sent to the display.
File Syntax and Parameters ANSI.SYS ExamplesBatch File SCREEN.BAT demonstrates some Display Attribute and Cursor commands.
Command Prompt Type the line below in a COMMAND.COM window to change the DOS command prompt.
Other ResourcesPage author: Dawn Rorvik (rorvikd@evergreen.edu) Last modified: 07/17/2003 |
20090603
http://sial.org/howto/rsync/ loop[back
Hey There,<br><br>The problem may be because<br><br>
<div class="smallfont" style="font-size: 11px; margin-bottom: 2px; ">Quote:</div><table cellpadding="3" cellspacing="0" border="0" width="100%"><tbody><tr><td class="bbcodeblock" style="background-color: rgb(207, 217, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: inset; border-right-style: inset; border-bottom-style: inset; border-left-style: inset; border-color: initial; ">/home/ubuntu/dos/cd.squashfs</td></tr></tbody></table>from the /etc/fstab gets translated into <br><br><div class="smallfont" style="font-size: 11px; margin-bottom: 2px; ">Quote:</div><table cellpadding="3" cellspacing="0" border="0" width="100%"><tbody><tr><td class="bbcodeblock" style="background-color: rgb(207, 217, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: inset; border-right-style: inset; border-bottom-style: inset; border-left-style: inset; border-color: initial; ">/dev/loop0</td></tr></tbody></table>once it's mounted.<br><br>Have you tried using this line in /etc/fstab instead?:<br><br><div class="smallfont" style="font-size: 11px; margin-bottom: 2px; ">Quote:</div><table cellpadding="3" cellspacing="0" border="0" width="100%"><tbody><tr><td class="bbcodeblock" style="background-color: rgb(207, 217, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: inset; border-right-style: inset; border-bottom-style: inset; border-left-style: inset; border-color: initial; ">/dev/loop0 /home/ubuntu/dos/cd squashfs user,loop,ro 0 0</td></tr></tbody></table>It may or may not work, but it's worth a shot <img src="http://http.cdnlayer.com/lq/images/questions/images/smilies/smile.gif" border="0" alt="" title="Smilie" class="inlineimg" style="vertical-align: middle; "><br><br>Best wishes,<br>
macfuse
<a name="Compiling_Other_FUSE_File_Systems_Written_for_Linux">When running the configure script for a file system, you <strong>need</strong> to have <tt>-D__FreeBSD__=10</tt> in <tt>CFLAGS</tt>. This is critical!
Often, using the <tt>macfuse_buildtool.sh</tt> script to configure the software for compilation will work. As in the case of <tt>sshfs</tt> above, go to the top-level compilation source directory (the one that contains a <tt>configure</tt> script) of the software in question and run <tt>macfuse_buildtool.sh</tt>.
</a>
ipod notes maximum size
bash trick start as root when user != root
4 if [[ "$(whoami)" != 'root' || "$(id -u)" != 0 ]]; then
5 echo -e "Please give your user passwd, prog needs to run as root" ARH
6 /usr/bin/sudo $0 7 else