Windows scripts
I have around 35 databases on windows box. I want to document information about each and every database like version, whether database is up or not, 64 or 32 bit oracle , by logging into each and every server.
Is it possible to write script in windows so that the script logs into each server and pulls the information about the database???
If so where can i get the scripts????
Hi,
GAWK/MAWK utilities can help you in this task. Example here :
Re: making a script that generates an output file dynamic
A 32 or 64-bits database, check V$SESSION.SADDR, if RAW(8), then 8*8=64 bits, if RAW(4) then 4*8=32-bits.
Nicolas.
Similar Messages
-
How to automate Sub variables in Essbase using windows scripting
I am trying to update the automation of sub variables.
The idea is that the user will set the StartMonth in the file and than based on the value the 3 sub variable for months will get updated.
Below is the script and the Maxl
Windows Script
Set StartMonth = 01
IF %StartMonth% == 01 SET TempMth1=Aug
IF %StartMonth% == 01 SET TempMth2=Sep
IF %StartMonth% == 01 SET TempMth3=Oct
D:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startMaxl.bat "D:\SetVar.mxl" "RF_Mth1" "%TempMth1%"
D:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startMaxl.bat "D:\SetVar.mxl" "RF_Mth2" "%TempMth2%"
D:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startMaxl.bat "D:\SetVar.mxl" "RF_Mth3" "%TempMth3%"
Maxl Script
login admin password on localhost;
spool 'D:\Variables.log';
alter application appname set variable $1 $2;
spool off;
logout;
exit;
However this isn't updating the varaibles.
Can anyone tell me as to what I'm doing wrong.
Thanks in advanceI checked it.The variables are set fine but when I try to set variables in Maxl using
alter application appname "RF_Mth1" "%TempMth1%"
it doesn't like the "TempMth1%" member...gives a syntax error.
I tried removing the double quotes,put in single quotes but that didn't work either. -
Windows scripts broken? Someone please help me
Prior to upgrading to v9.2.0.61 windows scripts worked great in itunes. Since the upgrade, I consistently get the following error - regardless of what script I run. Can anyone shed some light on this, please?
Script: c:\users\clayton\desktop\NewAppendToComment.js (doesn't matter what folder it's in)
Line: 8
Char: 1
Error: Could not locate automation class named "iTunes.Application".
Code: 80020009
Source: WScript.CreateObjectSounds like you might need to reinstall. Scripting is working fine for me with iTunes 9.2.
tt2 -
Windows script to start and stop jobserver only, with BOXI31
hi,
my question is easy but i have found nothing : on BOXI31
how to start and stop jobserver (adaptive...) automaticaly with windows script ?
in tasklist command, jobserver have no services name...
thank'sIn XI R2 you can stop & start job servers by their types, but in XI 3.1 I don't think you can do that, b'cos it doesnt list by server type just shows jobserver for crystal, webi & deski.
Thanks,
Hari -
Need a windows script to check all unix db boxes are pinging ?
Hi ,
I need a windows script to check all unix remote db boxes are pinging ?
I need to show the output in an html file.
Can anyone suggest ideas ?I have a script that "kind of" works. The only problem I've seen is that it gets confused when filenames contain characters that are fine in Macland but not good in Unixland. Forward slashes are a good example of this.
In this case I have a folder in my home named "copytest" Inside copytest are two folders:
Source (containing the images to be added)
Dest (My existing library of images)
It also assumes that the folder of images to be added contains no sub-folders. Hope this helps.
tell application "Finder"
set theSource to folder "source" of folder "copytest" of home
set imagesToBeCopied to name of every file of theSource
end tell
repeat with theFile in imagesToBeCopied
try
if (do shell script "find -r ~/copytest/dest -name " & quoted form of (theFile as string)) is not equal to "" then
--The file exists. Don't copy it
else
--the file doesn't already exist. Copy it.
end if
on error
return "Failed while trying to check for existence of a file"
end try
end repeat -
Accessing Windows Script Component (.wsc) methods from CVI
Hi,
I am trying to gain access to an already existing script that from Labwindows. It is a .wsc, Windows Script Component, file. It's in my System32 folder and I have registered it. The only way I could find to get the functions into labwindows was by generating a .tlb file from it using a windows utility. I then used the ActiveX control wizard in CVI to import the type library. The functions all seem to show up in the instruemnet panel. However, when I try get an automation reference I get an error (: error code= -2147467262). There is no dialog box or anything that comes up with this error code, I do error checking in my code and print them to my log, thats where I'm pulling the error code from. The problem is similar to what is described by the third post in this thread:
http://forums.ni.com/t5/LabWindows-CVI/How-to-integrate-windows-scripting-components-written-in-jscr...
Here is a reference to some info on WSC's:
http://msdn.microsoft.com/en-us/library/dd79w6c8(v=VS.85).aspx
Here is the call I am trying to make that fails:
error = JDDiag_NewAutomation (NULL, 1, LOCALE_NEUTRAL, 0, &JDDiag);
and the protype that the controller wizard generates from the .tlb:
/*-------------------- Prototype ---------------------*/
HRESULT JDDiag_NewObj (const char *Server,
int Support_Multithreading, LCID Locale,
int Reserved,
CAObjHandle *Object_Handle);
Also, here is the code in JScript that would accomplish what I am trying to do in CVI:
JDDiag = new ActiveXObject( "JDDiagnostic.WSC" );
JDDiag.Init( objController );
If anyone has any ideas/knows what I am doing wrong, or if this is even possible please let me know. Also, the WSC is written in JScript, but I don't feel like that should matter because according to the Microsoft documentation they can be written in any scripting language and the COM should take care of things.
Thanks,
Josh MeyerUsing Windows 7 Home Premium
I have read this thread carefully and followed the recommendations, and I still get the MsgBox error:
The module "scrobj.dll" was loaded but the call to DllInstall failed with error code 0x80004005
For more information about this problem, search online using the error code as a search term.
I even took these additional steps in the command prompt:
>cd C:\Windows\System32
>regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
>cd C:\Windows\SysWOW64
>regsvr32 /i:C:\Users\dn\dn.wsc scrobj.dll
I executed the identical command after changing to each of the directories. Each time I received the same error
Yes - that is what happens when you "necro" half century old threads.
The object I obsolete and unsupported. The error - 0x80004005 indicates that you are not an admin. It may also indicate that you are using an unsupported module.
¯\_(ツ)_/¯ -
IQ525A - Two Windows Script Host Error messages, plus folders won't close
How do I get folders to close, when right clicking will not close them? I am running Trend Micro security and also have two Windows Script Host error messages appearing. I need to click OK to proceed each time I use IQ525A/
assume IQ is running in safe mode, as start menu and bar is white.Any suggestions
Thanks
KitcatCrash report:
https://crash-stats.mozilla.com/report/index/ab4ee242-57f1-4a84-baef-ca2202150308
Signature shutdownhang
Start your '''Computer''' in safe mode with networking. Then start Firefox. Try '''Safe''' web sites.
'''[http://encyclopedia2.thefreedictionary.com/Linux+Safe+Mode Starting The Computer In Safe Mode;<br>Free Online Encyclopedia]'''
Wait a few minutes (don't go anywhere), then close it.
Is the problem still there? -
Hi,
I wanted to run window script or a query to fire the excution plan based on table column1--yes\No. if it is yes then it should start or triggered the execution plan automatically or it should not
thankshi,
expecting....reply -
Windows Script Host startup error - Windows 8
Hello all,
I got new Windows 8 Lenovo laptop recently, and I wanted to install all my games from my previous computer to my new one. So I did, but ended up with some errors (Which have nothing to due with Windows or Lenovo, but rather the games themselves), and
as a result, I had to re-install java (I mention java just to ensure I cover all the possibilities, I doubt it has anything to due with java). After some un-installations and scans/clean-ups, I got my computer back to normal except for one notable error: every
time I boot my laptop, I get an error message that is titled "Windows Script Host" and has the message "Can not find file "C:\ProgramData\Lenovo-1423.vbs"". When I safe boot I do not get this message, but when I go to troubleshoot
it in clean boot, I always get the error message, regardless of what services/startup items I have disabled. My virus softwares (Webroot and McAfee) detect no threats when I scan my drives.
I'm sure I'm overlooking something simple. And, knowing me, I probably posted this in the wrong category, so apologies in advanced. Can someone please offer me help?Hi there. I had a similar problem and was able to resolve it. Every time I started
up my PC, I would get an annoying message titled
"windows script host" saying it couldn't find a file relating to a 3rd party application. You can check whether it is a 3rd party app causing this by starting
your PC in safe mode and see if it still gives you the message titled "windows script host". If it doesn't, then it is a 3rd party app causing it and the problem is relatively easy to resolve.
I was able to resolve this as follows:
1. Start in safe mode
(If the message titled "windows script host" doesn't appear, proceed and follow
the remaining steps. If it does still appear then don't proceed and I'm not sure how you should resolve the issue in that case)
2. Run registry editor
3. Search for Lenovo-1423.vbs
4. When found, delete it.
5. Restart PC in normal mode. Problem solved!
Below are detailed instructions below for performing the steps above:
First startup your PC in safemode.
A sure way to enable safe mode (for Windows 7 and Windows 8) is as follows. Run "msconfig", when msconfig is open, go to the boot tab and tick the checkbox that says "safe boot", apply changes then restart PC. It will start in safemode.
Note: to find "msconfig" just hit the windows key and type "msconfig" (without quotes). Then click on it to run it.
Now once in safe mode, run "regedit". To find regedit, press windows key, type "regedit" without quotes, then click on it to run it. The Registry Editor will open.
When it is open, press ctrl+F to open the find window. Type "Lenovo-1423.vbs" then click on "find next" or just hit "Enter" key. It will begin searching the registry. When the search is complete it should come up with a list, one of them should be highlighted
and will have the path,
C:\ProgramData\Lenovo-1423.vbs
Simply right click on it and click on delete. When you delete it, the problem should be resolved, now just run your PC normally again. I.e. not in "safe mode".
To do this, run "msconfig" again by pressing windows key, typing "msconfig" then clicking on it. Go to the boot tab, uncheck the box saying "safe boot". Apply changes then restart your PC. It will start in regular mode and no more annoying message at start
up.
If the problem persists, you can start in safe mode again and run regedit to search for Lenovo-1423.vbs again in case it appears elsewhere in your registry. I doubt it would though.
Good luck to anybody who had a similar problem -
Windows script needed for the following tags
hi ,
I am currently automating a web task using windows script.
For the below source script , i need wsh script
<td title="Export Report" class="ui-pg-button ui-corner-all" style="cursor: pointer;" jQuery1404898744838="556">
<div class="ui-pg-div">
<span class="ui-icon ui-icon-newwin"/>
Text - Export
From the above script,
I need to click the "export"
Please anyone guide me to form a WSH script for clicking the "Export"
So far my code is
Set IE = CreateObject("InternetExplorer.Application")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
IE.navigate "url"
IE.Visible = True
Wscript.sleep 10000
IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_ddl_datefilter4").focus()
WScript.sleep 10000
IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_ddl_datefilter").SelectedIndex=4
WScript.Sleep 10000
IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_txt_fromdate").value = "30 Jun 2014"
WScript.Sleep 10000
IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_txt_todate").value = "04 Jul 2014"
WScript.Sleep 10000
IE.Document.getElementbyID("a_genslasummary").click()
WScript.sleep 10000
Thanks in Advance
NaveenThere is nothing to click on export. It is just text. YOu also cannot click on anything that does not have an event associated. Many events ae hidden in JS code.
None of the objects in your HTML have IDs so they will not be easy to find.
¯\_(ツ)_/¯ -
Basic_demo install.vbs fails with windows script error 800A0005
installing from 92030 win2k client to SunOS 2.6 92030 db.
The install.vbs windows script fails with:
Script: c:\down\xml\oracle\basic_demo\basicDemo\Install\Install.vbs
Line: 876
Char: 7
Error: Invalid procedure call or argument
Code: 800A0005
Source: Microsoft VBScript runtime error
prior to running I upgraded my IE to 6.0 and the Microsoft Script to 5.6 I have win 2k SP3
Any ideas, line 876 is:
oShellLink.IconLocation = iconPath
Thanks,
GaryHi
If I remember correctly I had the same problem a few weeks ago.
I can't remember what I actually fixed, probably something to do with a missing directory.
Anyway, the three procedures below(I would have attached them, but, can't find the link?) with extra
Wscript.echo "***
lines should show you what is wrong.
Sub makeGeneralShortCuts(localConfig, fileManager, demoConfiguration)
nodeListXpath = "General/shortCuts"
nodeCount = demoConfiguration.getElement(nodeListXpath).childNodes.length - 1
for i = 0 to nodeCount
xpath = nodeListXpath & "/shortCut[" & i & "]"
shortCutName = demoConfiguration.getChildTextNode(xpath,"Name")
target = localConfig.replaceMacros(demoConfiguration.getChildTextNode(xpath,"path"))
directory = localConfig.replaceMacros(demoConfiguration.getChildTextNode(xpath,"directory"))
icon = localConfig.replaceMacros(demoConfiguration.getChildTextNode(xpath,"icon"))
arguments = localConfig.replaceMacros(demoConfiguration.getChildTextNode(xpath,"Arguments"))
Wscript.echo "*** icon 1 " & icon & ",shortCutName " & shortCutName & ",target " & target & ", icon " & icon
fileManager.makeDefaultShortCut localConfig, shortCutName, target, icon, directory, arguments
Next
End Sub
Sub makeDefaultShortcut(localConfig, shortcutName, targetPath, iconPath, targetDirectory, arguments)
shortCutFolderPath = localConfig.getShortCutFolderPath()
Wscript.echo "*** iconPath 3 " + iconPath
makeShortCut localConfig, shortCutFolderPath, shortcutName, targetPath, iconPath, targetDirectory, arguments
End Sub
Sub makeWsFtpShortCuts(localConfig, fileManager, demoConfiguration)
Set iniFile = fileManager.CreateTextFile(localConfig.getWsFtpIniFilePath())
nodeListXpath = "FTP/shortCuts"
nodeCount = demoConfiguration.getElement(nodeListXpath).childNodes.length - 1
for i = 0 to nodeCount
xpath = nodeListXpath & "/shortCut[" & i & "]"
shortCutName = demoConfiguration.getChildTextNode(xpath,"Name")
target = localConfig.getFtpPath()
entryName = demoConfiguration.getChildTextNode(xpath,"iniFileEntry")
localDirectory = localConfig.getDemoFolderPath() & FILE_SEPERATOR & localConfig.replaceMacros(demoConfiguration.getChildTextNode(xpath,"localPath"))
remoteDirectory = localConfig.replaceMacros(demoConfiguration.getChildTextNode(xpath,"remotePath"))
arguments = " -i " & localConfig.getWsFtpIniFilePath() & " -p " & entryName
Wscript.echo "*** target 2 " + target
FileManager.makeDefaultShortCut localConfig, shortCutName, target, _
target, localConfig.getDemoFolderPath(), arguments
addIniFileEntry localConfig, iniFile, entryName, localDirectory, remoteDirectory
Next
iniFile.close
End Sub
Warwick -
Is Windows Script right for me?
TL;DR I'm trying to automate a program running every two weeks and performing a function then shutting off.
I have zero programming experience but I'd like to automate a mundane task that I often forget to do. I'd like ArcGIS to open automatically and run a function that's already created. Is this possible and where should I begin? Do I need
to get some background knowledge prior to learning windows script?Yes, you could use powershell (or several other script languages). Start here:
http://resources.arcgis.com/en/help/main/10.2/index.html#//0154000005p3000000 -
This has little to do with ApEx but something to do with web development.
Is it possible to run windows script (WSH) from IE (or another browser). Google didn't t give me quick answer.
GeorgeHello,
As far as I understand, the direction is reversed. You can use WSH script to load/display HTML pages. You can check if the following can help you:
http://support.microsoft.com/kb/188135
http://wsh2.freeweb.hu/ch09c.html
If you explain what you are trying to do, using APEX, perhaps will be able to help you find more “conventional” ways of doing it.
Regards,
Arie. -
Windows Scripting to copy files
Hi there,
New to Windows scripting.
I have tried to create a simple script to copy file but failed. Most probably the syntax is wrong. Pls help. thanks.
I give you my code below:
@ECHO OFF
SETLOCAL
REM SET INDIR="\\sge-fs01\enablers_development\ptc\OUTGOING"
SET SLIFTCMD="C:\Program Files\PrivyLink\SLIFT-Ez Classic\1.4\SLIFTC.exe"
SET PFX="C:\PrivyLink\KeyPeer\111111.pfx"
SET PFXPWD="pass12345"
SET CER="C:\PrivyLink\KeyPeer\sgesftpuser.cer"
SET PATTERN="*.IN"
SET DSTDIR="C:\SFTP\OUTBOUND"
SET BKDIR="C:\SFTP\BACKUP"
SET SENDDIR="C:\SFTP\SENDTO"
SET INDIR="C:\SFTP\PTC\OUTGOING"
REM ####### MAIN CALL #########
CALL:MainScript
GOTO :EOF
REM ####### Check Files in PTC OUTGOING #########
:MainScript
SETLOCAL
@ECHO OFF
PUSHD %INDIR%
IF EXIST "C:\SFTP\PTC\OUTGOING\*.IN"
COPY "C:\SFTP\PTC\OUTGOING\*.IN" %DSTDIR%
ELSE
echo "There are no files today - %date:~-4,4%%date:~-7,2%%date:~-10,2%" >> C:\SFTP\PTC.log
pushd %~dp0
start "" cmd /c cscript SMTP.vbs
POPD
ENDLOCAL
GOTO :EOF
REM #### END ########I tried myself and it works now.
EXISTS can use wildcard (no problem with that). Just that my brackets were not in right position.
They should be like this:
IF EXIST "C:\SFTP\PTC\OUTGOING\*.IN" (
COPY %INDIR%"\*.IN" %DSTDIR%
REM COPY "C:\SFTP\PTC\OUTGOING\*.IN" %DSTDIR%
REM CALL :ENCRYPT
) ELSE (
echo "There are no files today - %date:~-4,4%%date:~-7,2%%date:~-10,2%" >> C:\SFTP\PTC.log
pushd %~dp0
start "" cmd /c cscript SMTP.vbs -
[SOLVED] help needed with active window script
I am trying to receive the current window from a script. it works fine, but when no window is open i get an error.
i am using this command:
xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME | cut -d '=' -f 2 | cut -b 1-2 --complement | rev | cut -c 2- | rev
error message is "Invalid Window id format: 0x0"
I tried working around this by using this script:
#!/bin/bash
title_window () {
xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME | cut -d '=' -f 2 | cut -b 1-2 --complement | rev | cut -c 2- | rev
title_root () {
title_window | grep 0x0
if [[ -z title_root ]]
then
title_window
else
echo "Desktop"
fi
But now it shows "Desktop" for every window.
Last edited by Rasi (2013-01-22 11:59:46)solved.
solution:
#!/bin/bash
title_window () {
xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) _NET_WM_NAME | cut -d '=' -f 2 | cut -b 1-2 --complement | rev | cut -c 2- | rev 2>&1
title_root () {
title_window |& grep -q 0x0
if title_root;
then
echo "Desktop"
else
title_window
fi -
Close window script not working in safari?
So I have a behavior from a DW extension that controls the
window to self_
close... and works fine in all browsers but Safari. Anyone
have a clue why
that might be? Here's the script:
<input type=button
onClick="tmt_winControl('self','close()')" value=" Close
" >We would have to see your code to determine what is wrong.
Can you post a
link to the page in question? Your only giving us half of the
equation.
fyi.. Massimos Control Window does work in Safari to close
windows, so
there's something else wrong. Could be that you do not have
the supporting
function in the page.
Regards,
Trent Pastrana
www.fourlevel.com
"_adrian" <[email protected]> wrote in message
news:gl36qe$ikc$[email protected]..
> So I have a behavior from a DW extension that controls
the window to self_
> close... and works fine in all browsers but Safari.
Anyone have a clue
> why that might be? Here's the script:
>
> <input type=button
onClick="tmt_winControl('self','close()')" value="
> Close " >
>
Maybe you are looking for
-
Hyperlinks don't work in Compiled Help File
Had old version of RoboHelp (4?), then company installed Word 2003 which caused errors. Purchased version X5. Brought in my old version of Help and compiled using the new version of Robohelp. The links and some of the BMP's do not seem to be recogniz
-
TextInput control misbehaves when using the East-Asian fonts
I am a little curious about this issue and I would like to get some help from our community. The issue is about fonts when using East Asian languages.I have all East-Asian language installed on my computer (WIN SERV 2003)and I let my flex application
-
Dvd drive not working in windows
Hi just a question when I boot Windows Xp to my mac the DVD drive cant read files when i enter the cds but if i boot it in apple it can read the files tried to reformat it work for a while but then after few more use it cant read the files when im in
-
ITunes prepaid card loaded w/o selecting while on Apple Tech support
I just purchased 2 iPod Shuffles for my children and 2 $15.00 prepaid iTune cards. After loading the software, we easily got to the song selection site and were ready to select songs but were consistently interrupted by requests to set up an Apple ac
-
Hi there,I want to use JSP to communicate with MySQL Server,where can I get it and how do I go about the configuration.. thank you, Javas!