Custom script as part of windows loading
Hey there.
I want to implement custom script (batch) , that will perform few checks and routines before loading the windows. may be right before starting wininit or maybe as part of a bootloader on windows 7 and\or xp pro.
Any advice will be highly appreciated.
If you find this post helpful, spend a second to vote up. Smoking~~
This "problem" is close to Windows internals. Try to address someone who is expected to know more that general user. Perhaps mark Russinovich will provide answer to your question.
Alternatiely MSDN forum is better fit for programming issues including yours.
Regards
Milos
Similar Messages
-
Element & Window loading sequence in Script
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'CHECK'
element = '540'
EXCEPTIONS
window = 1
element = 2.
Can any one tell me what is the purpose of element,is it have any unique feature and also what is the order driver pgm will load window in form.
I think first always main window load then remain window as per albaphetical order..
if we want to change ordre then we have to write code in write form in drive pgm as we want that time also first will main window always..
anyway if any doc is supporting this,it will helpful me..
Thanks
KumarHi
The element (in your case 540) is a text element of the window, so in your sapscript in window CHECK you should find a line like this:
/E 540
The text element is a part of a window and it's printed only if it's directly called by fm WRITE_FORM.
So you can insert several text element in a WINDOW and decide what has to be printed.
For example: WINDOW WELCOME
/E ITALIAN
Ciao
/E ENGLISH
Bye Bye
IF LFA1-SPRAS = 'I'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'WELCOME'
element = 'ITALIAN'
EXCEPTIONS
window = 1
element = 2.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'WELCOME'
element = 'ENGLISH'
EXCEPTIONS
window = 1
element = 2.
In this case a sentece is writen in order of the language and is place in the same position of the page because both text elemant belong to the same window.
I'm not sure the sequence used to load the windows, but you could see it running your sapscript in debug mode. Anaway I'm sure it depends on when the program call the windows.
Max -
Custom scripts not working in Illustrator CC (2014)
A couple of custom scripts that are part of my workflow don't work in the new CC; MultiExporter.jsx and Sprite CSS Generator.jsx.
When I try to run either a titled modal window comes up as if the script is running but the actual window is only a couple of pixels tall and can't be re-sized;
They both worked fine in CC. My grasp of javascript is pretty basic but is there code that needs to be changed to update these to work with the current version?
Thanks!
BobIt looks like this might have been a system issue or conflict of some sort; I uninstalled AI CC2013 and AI CC2014 as well clearing out all prefs and artifact files and folders. Then did a fresh install of CC2014 an was able to use all my legacy scripts with no problem.
-
Issue with FDMEE custom script
Hi All,
I have written a custom script in FDMEE which pulls data from Oracle DB and writes it to a file in FDMEE App Inbox folder. This script is working perfectly in FDM where in I see file getting generated in Inbox folder. But, when I try to execute the same script in FDMEE, it is not working even though it is not giving any error.
All I changed in the script is API syntax which is specific to FDMEE. Can any one please let me know what is that I am missing here..I am using this script to test FDMEE connectivity to DB.
Below is the script:
Sub TEST_MAPS()
'Oracle Hyperion FDM Custom Script:
'Purpose:
'Variable Declaration
Dim SQLRes
Dim objfso
Dim strFile
Dim strLoadFile
Const ForReading = 1
Const ForWriting = 2
Const adVarChar = 200
Const MaxCharacters = 255
Const adFldIsNullable = 32
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
'Connect to Oracle database
cnss.open "Provider=ORAOLEDB.ORACLE;Data Source=ds1;User ID=app;Password=xxxx"
SQLRes = "Select * from ENTITY_MAP"
'command for executing the query
cnss. Execute SQLRes
'Creates a .tra file in the below mentioned path
strFile= fdmAPI.API.DataWindow.Connection.PstrDirInbox & "\Entity.tra"
rs.open SQLRes,cnSS
'Copy data from table to text file
'Initialize the object for opening a text file for writing
Set objfso = CreateObject("Scripting.FileSystemObject")
Set objWFile = objfso.OpenTextFile(strFile, ForWriting,True)
'Loop
With rs
'Open the file for writing, overwriting if it exists
Do While Not .EOF
objWFile.Write .GetString(2,,",",vbCrLf)' Write the records to file
Loop
'End If
.Close
End With
End Sub
Below is the log:
2015-02-24 15:41:38,991 INFO [AIF]: FDMEE Process Start, Process ID: 13,949
2015-02-24 15:41:38,991 INFO [AIF]: FDMEE Logging Level: 5
2015-02-24 15:41:38,991 INFO [AIF]: FDMEE Log File: \\app\FDMEEData\HFMCA\\outbox\logs\HFMCA_13949.log
2015-02-24 15:41:38,991 INFO [AIF]: User:502376825
2015-02-24 15:41:38,991 INFO [AIF]: Location:null (Partitionkey:null)
2015-02-24 15:41:38,991 INFO [AIF]: Period Name:null (Period Key:null)
2015-02-24 15:41:38,991 INFO [AIF]: Category Name:null (Category key:null)
2015-02-24 15:41:38,991 INFO [AIF]: Rule Name:TEST_MAPS (Rule ID:10,162)
2015-02-24 15:41:41,003 INFO [AIF]: Jython Version: 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Oracle JRockit(R) (Oracle Corporation)]
2015-02-24 15:41:41,003 INFO [AIF]: Java Platform: java1.6.0_37
2015-02-24 15:41:41,003 INFO [AIF]: Log File Encoding: US-ASCII
2015-02-24 15:41:41,440 DEBUG [AIF]: CommProcess.executeCustomScript - START
2015-02-24 15:41:41,440 DEBUG [AIF]: customScriptName: TEST_MAPS.vbs
2015-02-24 15:41:41,456 DEBUG [AIF]:
INSERT INTO AIF_PROCESS_DETAILS (
PROCESS_ID
,ENTITY_TYPE
,ENTITY_ID
,ENTITY_NAME
,ENTITY_NAME_ORDER
,TARGET_TABLE_NAME
,EXECUTION_START_TIME
,EXECUTION_END_TIME
,RECORDS_PROCESSED
,STATUS
,LAST_UPDATED_BY
,LAST_UPDATE_DATE
) VALUES (
13949
,'PROCESS_CUSTOM_SCRIPT'
,NULL
,'TEST_MAPS.vbs'
,NULL
,NULL
,CURRENT_TIMESTAMP
,NULL
,NULL
,'RUNNING'
,'458790678' ,CURRENT_TIMESTAMP
2015-02-24 15:41:41,487 DEBUG [AIF]: Comm.doScriptInit - START
2015-02-24 15:41:41,768 DEBUG [AIF]: fdmContext: {BATCHSCRIPTDIR=E:\Oracle\Middleware\user_projects\app\FinancialDataQuality, SCRIPTFILE=TEST_MAPS.vbs, INBOXDIR=\\app\FDMEEData\HFMCA\\inbox, TARGETAPPDB=NA, TARGETAPPNAME=HFMCA, APPID=57, RULENAME=TEST_MAPS, OUTBOXDIR=\\app\FDMEEData\HFMCA\\outbox, SCRIPTSDIR=\\app\FDMEEData\HFMCA\\data\scripts, EPMORACLEHOME=E:\Oracle\Middleware\EPMSystem11R1, RULEID=10162, EPMORACLEINSTANCEHOME=E:\Oracle\Middleware\user_projects\app, LOADID=13949}
2015-02-24 15:41:41,768 DEBUG [AIF]: The EpmOracleHome is set to: E:\Oracle\Middleware\EPMSystem11R1
2015-02-24 15:41:41,768 DEBUG [AIF]: The EpmOracleInstance is set to: E:\Oracle\Middleware\user_projects\app
2015-02-24 15:41:41,768 DEBUG [AIF]: The JavaHome is set to: %EPM_ORACLE_HOME%/../jdk160_35
2015-02-24 15:41:41,768 DEBUG [AIF]: The executeEventScript is set to: YES
2015-02-24 15:41:41,768 DEBUG [AIF]: The OleDatabaseProvider is set to: ORAOLEDB.ORACLE
2015-02-24 15:41:41,768 DEBUG [AIF]: The AppRootFolder is set to: \\app\FDMEEData\HFMCA\
2015-02-24 15:41:41,768 DEBUG [AIF]: Comm.doScriptInit - END
2015-02-24 15:41:41,768 DEBUG [AIF]: Comm.executeCustomScript - START
2015-02-24 15:41:41,799 DEBUG [AIF]: Comm.executeVBScript - START
2015-02-24 15:41:41,799 DEBUG [AIF]: The WindowsTempFolder is set to: c:\users\r00257~1\appdata\local\temp
2015-02-24 15:41:41,799 INFO [AIF]: Executing the following script: \\app\FDMEEData\HFMCA\\data\scripts\custom\TEST_MAPS.vbs
2015-02-24 15:41:41,799 DEBUG [AIF]: The command to be executed is:
cscript \\app\FDMEEData\HFMCA\\data\scripts\custom\TEST_MAPS.vbs "13949" "****" "E%3A%5COracle%5CMiddleware%5Cuser_projects%5Capp" "%25EPM_ORACLE_HOME%25%2F..%2Fjdk160_35" "ORAOLEDB.ORACLE"
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
2015-02-24 15:41:41,939 DEBUG [AIF]: Comm.executeVBScript - END
2015-02-24 15:41:41,939 DEBUG [AIF]: Comm.executeCustomScript - END
2015-02-24 15:41:41,939 DEBUG [AIF]:
UPDATE AIF_PROCESS_DETAILS
SET STATUS = 'SUCCESS'
,RECORDS_PROCESSED = CASE
WHEN RECORDS_PROCESSED IS NULL THEN 0
ELSE RECORDS_PROCESSED
END + NULL
,EXECUTION_END_TIME = CURRENT_TIMESTAMP
,LAST_UPDATED_BY = CASE
WHEN ('502376825' IS NULL) THEN LAST_UPDATED_BY
ELSE '502376825'
END
,LAST_UPDATE_DATE = CURRENT_TIMESTAMP
WHERE PROCESS_ID = 13949
AND ENTITY_TYPE = 'PROCESS_CUSTOM_SCRIPT'
AND ENTITY_NAME = 'TEST_MAPS.vbs'
2015-02-24 15:41:41,939 DEBUG [AIF]: CommProcess.executeCustomScript - ENDHi,
If you're using CUE, there is a step called "Dial By Extension Menu", this should solve your problem.
If you're using UCCX (or CUE and don't have this step) you can do the following:
In the Get Digit String branch Timeout, use an If statement that check if the Number entered was "1" then Call Redirect to Technical Departement Number, else Call Redirect to Operator Extension.
It should appear like this:
Extension = Get Digit String
Timeout
if (Extension == "1")
True
Call Redirect to Technical
False
Call Redirect to Operator
Hope This Helps, -
Custom Script to Play Project in Full Screen
Hi,
Adobe tech support sent me here to request a custom script to
make a Captivate 3 project play in a full screen mode without
getting the extra page on which the user is prompted to click on a
link to open in full screen.
Could someone please send me the script with instructions?
Thanks!
- EricHi Eric
In addition to what Rick has posted, I found the below very
helpful in a similar situation. It was submitted by jbradley88, so
all credit goes that way:
Full screen in the browser is only available by opening a new
window (hence the "Full Screen" link) or by embedding a custom
ActiveX control.
I'd rule out the ActiveX option, since it's both technically
challenging (I saw it done once, but don't know how) and would only
work for Internet Explorer anyhow.
That leaves the new window approach. A redirect is not an
option... the "full screen" can only be applied while a window is
first opening and even then only when the window is opened by
Javascript.
The best you could hope for is to open a page that
immediately opens another page in full screen, adding some verbiage
to the first page that says something like "The content has opened
in a new window. It is safe to close this window".
A sample "autolauncher" page is included below as an example.
It does not make use of the window.open() method's "fullscreen"
parameter since in IE6 that does not seem to give the user a way of
closing the new window once it's open. You can easily change this
by setting the parameter to yes in the code below.
Attach Code
<html>
<head>
<title>New Window Launcher</title>
<head>
</head>
<body>
<script type="text/javascript" language="javascript">
var o =
window.open("yourcontent.htm","newContentWin","fullscreen=no,left=0,top=0,width="
+ (window.screen.availWidth - 12) + ",height=" +
(window.screen.availHeight - 36) +
",channelmode=no,directories=no,location=no,menubar=no,resizable=yes,status=yes,titlebar= yes,toolbar=no");
if (o)
window.document.write("The content has opened in a new
window. It is safe to close this window.");
o.focus();
else
window.document.write('Could not open the content in a new
window. Please disable all popup blockers and try again.');
</script>
</body>
</html> -
How to fetch data into my custom script configured in qc02 transaction
Hi All,
I configured the custom SAP-Script in place of standard script name in QC02 tcode.In my requirement when I execute QC22
transaction the custom script will be triggered along with some data based on material number,batch number and plant.I need to fetch QALS-KTEXTMAT , QALS-CHARG, MCH1-HSDAT and MCH1-VFDAT.Please help me how to fetch this data.Any Enahancement need to use or any spot is there Please specify.
Thanks in advance.
Regards,
Satya.
Edited by: satyareddygade on Sep 8, 2011 2:13 PMHi Satya,
Try like this in your Script window text element.
/: PERFORM FETCH_KTEXTMAT IN PROGRAM <Z Subroutine Pool program>
/: USING &QALS-PRUEFLOS&
/: CHANGING &GV_KTEXTMAT&
/: ENDPERFORM
in Z Subroutine Pool program
FORM fetch_ktextmat TABLES intab STRUCTURE itcsy
outtab STRUCTURE itcsy.
DATA:
lv_prueflos TYPE qals-prueflos,
lv_ktextmat TYPE qals-ktextmat.
*---Get Inspection Lot Number
READ TABLE intab WITH KEY 'QALS-PRUEFLOS'.
CHECK sy-subrc = 0.
lv_prueflos = intab-value.
SELECT SINGLE ktextmat FROM qals INTO lv_ktextmat WHERE prueflos EQ lv_prueflos.
outtab-value = lv_ktextmat.
MODIFY outtab FROM outtab TRANSPORTING value WHERE
name = 'GV_KTEXTMAT'.
CLEAR : intab,outtab.
ENDFORM. "FETCH_KTEXTMAT
/: PERFORM FETCH_HSDAT IN PROGRAM <Z Subroutine Pool program>
/: USING &*VBDPL-MATNR&
/: USING &VBDPL-CHARG&
/: CHANGING &GV_HSDAT&
FORM fetch_hsdat TABLES intab STRUCTURE itcsy
outtab STRUCTURE itcsy.
DATA:
lv_matnr TYPE vbdpl-matnr,
lv_charg TYPE vbdpl-charg,
lv_hsdat TYPE mch1-hsdat.
*---Get Material Number
READ TABLE intab WITH KEY '*VBDPL-MATNR'.
CHECK sy-subrc = 0.
lv_matnr = intab-value.
*---Get Batch Number
READ TABLE intab WITH KEY 'VBDPL-CHARG'.
CHECK sy-subrc = 0.
lv_charg = intab-value.
SELECT SINGLE hsdat FROM mch1 INTO lv_hsdat WHERE matnr EQ lv_matnr
AND charg EQ lv_charg.
outtab-value = lv_hsdat.
MODIFY outtab FROM outtab TRANSPORTING value WHERE
name = 'GV_HSDAT'.
CLEAR : intab,outtab.
ENDFORM. "FETCH_HSDAT
Use the following program symbols where you want to print.
&GV_KTEXTMAT& &QALS-CHARG& &GV_HSDAT& and &MCH1-VFDAT&
Regards,
Surya. -
Custom Script Code to create multi-Location files from Master File
Hi,
I currently have a custom script that loads a master file (which contains all Entities data). I would like to do the following;
1. Generate multiple files from the master files, one file per location for all locations.
2. Each location file should contain data only data relevant to that Location defined by Validation Entity definitions.
Does anyone have a sample code to do the above?
Essentially, we want to run this Master Custom Script every hour or so and generate all the Locations' files and have users load them ad-hoc.
Please let me know.
ThanksYour requirement is quite sepcific so you will have to write the script for this yourself (or hire someone to do it for you). What I will say is that via vbscript and the FDM API all the components you require to do this are there and it can be scheduled with FDM's Task Manager.
-
Any easy to way to use custom scripts?
Is there any plug-in or whatever that gives me a separate window where i can just click to use custom script? Any other easy ways are fine.
You should be able to use the Actions palette for this. You can record the selection of a Script as an Insert Menu Item step in an Action. But this has been broken almost since the scripting functionality was added, in that the steps which invoke the scripts disappear from your stored Actions after Illustrator is quit and relaunched.
It would be a hugely useful thing if Adobe ever bothered to fix this. You could automate things that are a combination of operations that can be performed by Actions but not by scripts, and vice-versa. But people have been after Adobe to fix this for something like seven versions now.
You can organize the Scirpts menu into folders. And you can organize the Actions palette into Sets. It's just idiotic that Illustrator provides no mechanism for easy access to that organization, as does InDesign. Typical half-baked feature implementation.
But it's a moot point now, anyway. I really no longer care whether Adobe gets around to fixing the many, many things that Illustrator has so long needed, because I'm not going to pay monthly rent for Illustrator, even if they do. ;-)
JET -
[Services and Systems]Custom script .bat for testing Avaibility for Service
Hi,
I am trying to create a Service in grid control.
For the step - Create Generic Service: Service Test, I use custom script test type.
I've already done this kind of service with a custom script stored on Unix system (script sh -> OK). However, this time, I can only use a script stored on Windows server.
I tested with a *.bat* file but I got this error :
Error encountered while executing test.:Beacon-Test
Here my configuration :
Grid Control 10.2.0.5
Windows Server 2005
My script .bat :
echo 1
What type of file do I have to use under Windows so that the test of service works?
Thanks
Related links :
http://www.oracle.com/technology/obe/obe10gEMR2/Quick_Start/system_services/system_services.htm
http://download.oracle.com/docs/cd/B16240_01/doc/user.102/b28678/services.htm#CHDCAIJC
OliverHi,
here the results of my searchs :
1 - All .BAT files must begin with : @ECHO OFF
2 - All scripts have to send only numbers
Oliver -
I am trying to open a page in IE-tab using javascript like this, <script type="text/javascript"> window.location.href = "chrome://coralietab/content/container.html?url=0,myurl" ;</script>.Error occured : [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::myurl :: load :: line 234" data: no] I have IE-Tab plug-in installed..when I open the same link manually in mozilla,it works fine and page gets opened in Ie-tab.
The only way this might be possible is by using the HostContainer object
to access the HTML page and do it from there. -
Hi Experts,
We have a requirement to uncheck the Send Notification check box by custom script in supplier's contact account mangement tab while page loading while creating new contact for the supplier. I have attached screen shot for reference.
I have searched several API Java classe for get and set methods for this Send notification field but no luck.
If anyone have an idea about get and set methods for this field please share.
Help would be appreciated and points awarded!
Thanks,
Lava.Hi Lava,
Inorder to uncheck the Send Notification checkbox while loading the page you have to write the script targeting the class Contact(600) and target as Loaded.
Include below lines in your custom script (contact onload Script)
doc.getFieldMetadata("SEND_NOTIFICATION").set(doc,FALSE);
You can create it in On create Script also.
Hope it helps.
Thanks,
Raj. -
How do you configure a VM image to run a custom script ONCE on startup?
Hello,
I am creating a Windows image that will be deployed to the VM depot:
https://vmdepot.msopentech.com/List/Index
When the image is run for the first time, I'd like to run a custom script. However, I only want this script to run the first time the VM is run (and never again).
How would I do this?
Thanks!
MattHi,
Please see SetupComplete.cmd at
http://technet.microsoft.com/en-us/library/dd744268(v=ws.10).aspx
Anders Bengtsson | Microsoft PFE | blog at http://www.contoso.se -
Dynamic Stamp Java Script Problem (8.0 Windows)
I have created a dynamic stamp for my engineering firm, but I am having one problem. The stamp is a date stamp with other information and I need the date to look like this:
JUL 10 2008
However, I can only get the first letter ('J') to be capitalized. Is there a way to alter the custom scripting to enable me to get all three letters of the month capitalized?
Thank you in advance for any responses...Thank you for the post, but...
how do you get the "mmm" part to all be capital letters? As it stands, my date stamp looks like this:
Jul 10 2008 -
Custom script lookup..
This is all I can find about creating a lookup I need to use in a script......
Use As Lookup
You use the Use as Lookup column to select a dimension for a custom lookup table. When Use
as Lookup is selected, the Enabled field cannot be used. The custom lookup dimension is used
only for custom scripting.
What I did,
In MetaData>Dimension I checked "Use as lookup" for the dimension I want to use...
Where do I load the lookup values? To the mapping table for that dim? I have 6000 locations and I need to have one table to maintain...
I need to load to one table for all lookup values is my understanding...is that the case?
Thanks,
JzHello,
You will need to use the PSI in the PowerShell script. This is all possible. Example below for updating existing lookup table from PowerShell:
http://gallery.technet.microsoft.com/scriptcenter/Update-Server-Lookup-table-bb1ae14f
That will give you an idea on calling the PSI methods and working with data sets in PowerShell.
To create custom fields use this method:
http://msdn.microsoft.com/en-us/library/gg176849.aspx
Other custom fields methods here:
http://msdn.microsoft.com/en-us/library/websvccustomfields.customfields_di_pj14mref_methods.aspx
Lookup table methods:
http://msdn.microsoft.com/en-us/library/websvclookuptable.lookuptable_di_pj14mref.aspx
Paul
Paul Mather | Twitter |
http://pwmather.wordpress.com | CPS -
Customized scripts within the Deployment Template environment
Hello,
In the endeca documentation I see that "The sample scripts provided with the Deployment Template control the Endeca operational tasks through the EAC. You can use these scripts, or create custom scripts based on them. The scripts typically run such processes as routine baseline and partial updates. You can also add specific scripts that run before the Dgraph is stopped or after it is started."
I would like to call a .bat before the DGraph is stopped or after it is started, but I can't find where.
I think it's in the AppConfig.xml file, right? Could you give me an example?
Thanks,
Stephane1st Declare your action. Here is a sample that manually calls the set data ready flag...
<shell id="SetDataReadyFlag" host-id="ITL_Local" >
<command>${ENDECA_PROJECT_DIR}\control\set_baseline_data_ready_flag.bat</command>
</shell>
then in your custom tasks (or even the tasks that are part of the deploy template), you can call it....
<script id="BaselineBuildDataFiles">
<bean-shell-script>
<![CDATA[
// Get data
// Verify Data
// Set endeca data ready flag
SetDataReadyFlag.run();
]]>
</bean-shell-script>
</script>
The only thing I don't think you can do is get a response from the external call that you make. In that case I usually have my .bat, .exe, etc Write out a result file and then I read and parse the results from that.
Hope this helps
Maybe you are looking for
-
Moving an iTunes library from one computer to another that isn't consolidated
My iTunes library is made up of music from a variety of sources. This is due to the files being stored on a server and organised in folders in a particular way already. I want to transfer my iTunes library to a brand new computer, but am aware it may
-
Listener.ora syntax error in NV string
Hi. I'm attempting to establish a connection with an Access db using ODBC. I've edited my listener.ora file to read the following: # listener.ora Network Configuration File: C:\oracle\product\10.1.0\Db_1\network\admin\listener.ora # Generated by Orac
-
Sound with cd rom but nothing else
my problem is my sound works only with my cd rom and nothing else running windows me windows 98 se and windows xp works fine but nothing with windows me i have loaded all the drivers and updated them in the device manager it says with a ? mark
-
Help! I have been using Garageband since version 1 came out, and I have finally gotten to the point where I can't stand the sound of my songs when they are exported to Itunes. Is there a way to keep the initial integrity of my songs when converting t
-
Hi, I have mainted the Cost Center Hierarchy in SAP, I see Hierarchies & Master Data transfared from SAP to BW I see that The Hierarchy is defined very well My problem is some values transferred to BW but falls under 'unassigned' Whay should I check