I was trying to deploy my project with IExpress. I have the following scenario. I want to extract some files to a location preferably c:\program files\. Then after it copies all the files i want it to run a .cmd file (which is a script). the script is also added in the project itself and it would refer to a file which is copied by IExpre...
I have a deployment script (.bat), part of which requires calling other programs and sending a password on the command line. I log the output of the deployment script to a file. The problem is that the password gets logged as well. I need a way of sanitizing this log file.
One way to do this is to not echo the line which contains the p...
Hi folks,
I've got a web application that uses Microsoft Sql Management Objects (SMO) dll's. I'm wondering how I go about redistributing the libraries for a remote machine.
As I understand it, these come with SQL server or Sql express - which isn't on the remote (shared) webserver. Asking the host to install them, is probably out of t...
I want to extract a full path from the PATH environment variable with native cmd tools. Consider the following PATH content:
C:\Program Files\Windows Resource Kits\Tools\;C:\Perl\site\bin;C:\Perl\bin;C:\WI
NDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Microsoft SQ
L Server\90\Tools\binn\;C:\WINDOWS\system32\...
I came across this piece of batch code. It should find the path to every single .exe file if you enter it.
@Set Which=%~$PATH:1
@if "%Which%"=="" ( echo %1 not found in path ) else ( echo %Which% )
For instance, if you save this code in the file which.bat and then go to its directory in DOS, you can write
which notepad.exe
The resu...
While attempting to write a simple bash script to help
with my deployment process, I ran in to a confusing error:
#!/bin/bash
WEEKDAY=$(date +'%u')
echo $WEEKDAY
DAYS_TO_WEDNESDAY=$((3-$WEEKDAY))
echo $DAYS_TO_WEDNESDAY
Results in:
1
")syntax error: invalid arithmetic operator (error token is "
The strangest part of it is that I c...
I'm using this code to make my Java program open a (visible) CMD window:
try {
String line;
Process p = Runtime.getRuntime().exec("cmd /C start \"Render\" \"" + myPath + "\\punchRender.cmd\"");
BufferedReader input =
new BufferedReader(new InputStreamReader(p.getInputStream()));
...
So I am trying to write an .sh file that will be executable, this is how I'm currently writing it:
Writer output = null;
try {
output = new BufferedWriter(new FileWriter(file2));
output.write(shellScriptContent);
output.close();
} catch (IOException ex) {
Logger.getLogger(PunchGUI.class.getName()).log(Level.SEVERE, null, ex);
}...
HI i want to implement this C code in batch file
int i;
scanf("%d", &i);
for(int j = 0;j<i;j++)
{
scanf("%d",&j);
printf("%d",j);
}
I would run the c program using > redirection in DOS so that the printed output comes to me in a file. I want to do the same thing in my batch file where i could write something like
echo %variable...
when i am going through my project in IE only its showing errors
A runtime error has occurred Do you wish to debug?
Line 768
Error:Expected')'
Is this is regarding any script error
...
I'm experimenting with a DOS batch file to perform a simple operation which requires the user to enter a non-negative integer. I'm using simple batch-file techniques to get user input:
@ECHO OFF
SET /P UserInput=Please Enter a Number:
The user can enter any text they want here, so I would like to add some routine to make sure what the...
I need something like a stacktrace in bash, is that possible?
A script is misbehaving. I need to know who calls that script, and who calls the calling script, and so on, only by modifying the misbehaving script.
What do you say?
...
Hi Guys,
after attending a mind numbing three days workshop on MLG, what i noticed is that 90% of the time is wasted on just configuring the setup for each components for MLG, namely the sharepoint, isa, exhchange, active directory etc.
as a developer and a big fan of automation, i see all this tedious task as brain cell destroying acti...
I posted the following question to the Ubuntu forum and no success yet. I realize this is less of a programming issue and more of an Evolution/Ubuntu issue, but given that I want to automate the solution it seems not inappropriate to post it here...
Here is the problem. I changed my Google account password recently and now Evolution (U...
Is the use of server side javascript prevalent? Why would one use it as opposed the any other server side scripting? Is there a specific use case(s) that makes it better than other server side languages?
Also, confused on how to get started experimenting with it, I'm on freeBSD, what would I need installed in order to run server side ja...
The title is rather more simplified than the functionality I am trying to express in a script.
I have a one-level deep directory tree (much bigger than example) which contain various content, although only two particular files are of interest to me. A file called 'current' and another called 'revisions'
- foo
|
|-> current
- ba...
Hi,
i have an application that create a log file of the following format:
2009-03-27 15:30:50 Start
2009-03-27 15:30:51 Starting Component 1 Installation
2009-03-27 15:30:52 blah
2009-03-27 15:30:53 blah
2009-03-27 15:30:54 blah
2009-03-27 15:30:55 ~~~ Finished Component 1 Installation ~~~
2009-03-27 15:30:56 Starting Component 2 Insta...
I have started to customize my .dbxrc file to save some time while debugging. What is yours favourite entry in .dbxrc file ? here is mine:
export PS1='[ (dbx) Working Hard @ $(date +%H:%M:%S) ]'
alias si="stop in"
alias attr=attribute
alias bfth=stop
alias blth=stop
alias c=cont
alias cv=condition
alias d=delete
alias e=edit
alias h=h...
I have a python script that'll be checking a queue and performing an action on each item:
# checkqueue.py
while True:
check_queue()
do_something()
How do I write a bash script that will check if it's running, and if not, start it. Roughly the following pseudo code (or maybe it should do something like ps | grep?):
# keepalivescr...
Does anyone know how to force windows XP to rebuild the list of installed fonts without needing a reboot. They seem to have been installed correctly since everything works as expected after a reboot but I would like to avoid that reboot.
...