BAT file shortcut with parameters
Under an earlier version of windows, I created a shortcut to a bat file and requested settings appear when I double click on the shortcut. How can I do this in windows 7? The CMD line on the program from the shortcut properties tab was c:\exceldoc\changemo.bat? for the example of 2 months I would be key SEPT OCT when it requested parameters. If I have this key term bar C:\exceldoc\changemo.bat OCT NOV, it works. I need the shortcut to request the settings when double click thank you for the help
SET /P variable = [PromptString]
For an example, see
http://www.computing.NET/answers/DOS/making-a-bat-file-to-get-input/12821.html
Tags: Windows
Similar Questions
-
Run SQL through batch file, with parameters
Hi all
I run SQL through Batch files before, but I am a little confused with the execution of the sql with parameters. For example, if I have a named sql file:
I can run this problem normally, but including the substitution variables, as in the batch (.bat) file called Execute_insert.cmd is a bit annoying... I played a little with it and cannot operate.insert.sql Insert into TableA select * from TableB where service_dt >= '&&x_start_dt' and service_dt <= '&&x_end_dt';
Any help would be appreciated.
Thank you
EdChange your insert.sql to something more like:
Insert into TableA select * from TableB where service_dt >= TO_DATE('&1', 'format mask') and service_dt <= TO_DATE('&2', 'format mask');
Then, would you call it:
sqlplus user/password @insert.sql 01-oct-2012 31-oct-2012
John
-
With the help of Remote Shell of Linux to run on Windows Server 2008R2 .bat files
I use rsh to my Linux server to run Windows applications on a Windows 2003 server using .bat files remotely. For example, from Linux:
rsh win2008s.enterpisedomain.com D:\\appdev\\atm_ally\\bgr_atm_ally_standard_pip.bat ${PINSTANCE} {IVSWEBBROWSERUSER} ${PPASS} ${DINSTANCE} ${DUSER} ${DPASS}
I want to be able to rsh to a Windows server 2008R2. I installed SUA and the SDK and utilities. I also installed the patch from this link:
https://support.Microsoft.com/en-us/KB/2360829/en-us
When I try to run the same command on Win2008R2, I get the following:
RSH: D:appdevatm_allybgr_atm_ally_standard_pip.bat: not found
I also tried to change the content of the file bat in the Unix syntax, following the signs to help SUA. The following text runs if I use rlogin and run interactively, but fails to run using remote shell (rsh):
#! / bin/ksh
export PATH=/dev/fs/C/instantclient_12_1:/dev/fs/C/Windows/SUA/bin:/dev/fs/C/Windows/System32:/dev/fs/C/Windows:/dev/fs/C/Windows/System32/wbem:/dev/fs/C/Windows/System32/WindowsPowerShell/v1.0:/dev/fs/C/Program Files/FME2011:/dev/fs/C/Windows/SUA/common:/dev/fs/C/Windows/SUA/usr/lib
export PATH_WINDOWS=/dev/fs/C/Windows/System32/.com,.exe,.ksh,.bat,.cmd,:/dev/fs/C/Windows/SUA/common/.com,.exe,.ksh,.bat,.cmd
' / dev/fs/program/C Files/FME2011/fme.exe ' E:\\appdev\\standard\\standard_pip.fme--BndTab BOUNDARY2015. BND_01_DMA - BndInst DWSTG - BndU atm_ally - edwat56c1 - BndIDCol GEO_ID - BndDType PBED ' VARCHAR2 (25) ' PntTab - V_ATM_JAN15_GEOCODE - PntInst DWSTG - PntU ATM_ALLY - edwat56c1 - PntID ID - PntIDType PntP ' VARCHAR2 (8) ' - PntLat N_LAT - PntLng N_LON - PntLatType "NUMBER (10.6)"-PntLngType "NUMBER (11.6) ' DestTab - ATM_JAN15_DMA - DestInst DWSTG - ATM_ALLY - edwat56c1 - NearDist DestP DestU 0 - Logfile 'test2.log '.using rsh:
rsh win2008s.enterpisedomain.com /dev/fs/E/appdev/atm_ally/test_pip_win.ksh
remote shell fails with the error:
' / dev/fs/C/Program Files/FME2011/fme.exe "no such device
Anyone have any ideas?
Your query is better here
https://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer
-
How can I automate copying files from 1 pc to a laptop computer with commands in a bat file?
I have a host pc and a laptop connected through a home network, which allows mw the ability to copy files through pionter 1 to another. How can I automate this with commands in a .bat file.
Yes. These things are possible with scripts or old batch files. Also, take a look at RichCopy.
http://TechNet.Microsoft.com/en-us/magazine/2009.04.UtilitySpotlight.aspx
Tom Ferguson
-
How do I open Mozila firefox with another user using any script or Bat file
Hello...! There I want to create a bat by which I can open Firefox with a different username.
I typed below the code and it works well in command prompt, but his does not work as a bat file.
runas/user: domain\username "C:\Program Files\Mozila Firefox\Firefox.exe".
or
runas / user: ABC\XYZ "C:\Program Files\Mozila Firefox\Firefox.exe".
Can someone help me out here. Can someone give me a code by which I can open firefox with a different user name by using the bat file.
Hello
Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please ask your question in the Forums Pro TechNet Windows XP IT.
-
original title: "kiieyex.exe" added to the files.
Someone had this shortcut path added to the files? All files on my hard drive has become a shortcut, with kiieyex.exe added after the backslash in the car. When you click on it, I get this message: problem with shortcut shortcut, the called has been changed or moved and work more properly. You really want to remove this shortcut? I'm not enough common sense to understand what happened, or what I need to do to access my files... Help!
Hello
Follow these steps:
Step 1: download and run the tool of diagnosis from the link below.
Difficulty of broken desktop shortcuts and common system maintenance tasks
http://support.Microsoft.com/mats/system_maintenance_for_windows/
Step 2: run a scan for viruses on your computer.You can scan the computer using an anti-virus program. You can also analyze your computer online.
Click here: http://www.microsoft.com/security/scanner/en-us/default.aspx
-
Calling batch file. SQL file with parameters
Hi all:
I may / may not have correct code, because I can't find a Google result for answering the question and cannot test this solution until it goes live, so I want to make sure I have it correct.
I have a batch (file1.bat) file that implements some variables. Inside this file, I call a .sql like this procedure:
sqlplus username/password@environment @c:\sql\export.sql cID %%d sID % % exportFilename %
How do I use these settings within the export.sql so they are passed to the oracle procedure?
I am currently using the following code:
BEGIN
sinterface. Export (1, 2 & 3);
EXCEPTION
WHILE OTHERS
THEN NULL;
END;
This code will work? I know that if I call another code file1.bat .bat file, I can get the settings such as:
SET of cID = %1
SET sID = %2
SET exportFileName = %3
OR
SET CompID = compID %
SET SiteID = siteID %
SET exportFileName = % exportFilename %
But I have no idea if / how this translates an oracle .sql file to call a stored procedure. I got a result of Google to show using the & 1 & 2 & 3 to set the parameters of this batch file, but as I can't test it, I have no idea if it would work.
Anyone would be able to confirm the correct method?
Thank you
AndyAndy,
Welcome to the Oracle Forums. Please take a few minutes to review the following:
This forum is for general issues Oracle Forms. Please post your question in the forum SQL and PL/SQL . If you have a general question of forms, by all means, ask it here! ;-)
That said, you asked...
How do I use these settings within the export.sql so they are passed to the oracle procedure?
I am currently using the following code:
BEGIN
sinterface.export(&1, &2, &3);
EXCEPTION
WHEN OTHERS
THEN NULL;
END;
Since you simply call a Script SQL of your batch file file is not really necessary to use an anonymous block to call your stored procedure. In addition, as you use the OTHER generic exception - you never know if there was a mistake. Really, you shouldn't use SO that OTHERS value NULL. This isn't a very good programming practice. As for your variables, I would recommend that you set the substitution variables in your script and set your settings to access these variables. For example:
DEFINE c_id = &1 (CHAR)
DEFINE s_id = &2 (CHAR)
DEFINE f_name = &3 (CHAR)
Execute sinterface.export(c_id, s_id, f_name);
I would not include an exception handler at this level that any exception must propagate to the calling program.
Craig...
problems with the bat files.
Why am I unable to run bat files in my pc. When I double click on them just opens and closes and I don't understand what is the real problem?
Why am I unable to run bat files in my pc. When I double click on them just opens and closes and I don't understand what is the real problem?
If it opens and closes, it probably * is * running the file beats. Only you don't see the results because it is all happening too fast.
To view the results, change the way you run. Rather than run the bat file, run the CMD command. Then run the file bat in the CMD window that opens.
Hello!
This is my first powerCLI-scripting.
I want to start a powerCLI-Script Windows - batch. And I have to make the script a parameter ('1' or '0').
My test.bat file:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe - PSConsoleFile "C:\Programme\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" - command '& {C:\bat\USV\vmware\test.ps1} '.
Test.ps1 I want to manage settings of commited "0" and "1". But I don't know how.
Where can I configure the settings I want to commit?
Is this correct?
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe - PSConsoleFile "C:\Programme\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" - command '& {C:\bat\USV\vmware\test.ps1 parameter} '.
THX
Hansis
Passing parameters to the .ps1 file, as you did in the 2nd line.
In the .ps1 file, you can access the parameters in the table $args, i.e. $args [0], $args [1]...
Or you can have a Param statement at the beginning of your script and work with named parameters.
Param($argument1,$argument2)
Here's what's happening.
I have an add on package I wanted to pack with a main program. The problem is that the add-on is not an .exe file so I had to make a .bat file to open it, which, unfortunately, is not recognized as a user entry point. So I converted the file .bat to .exe file so that I could create a user to this file entry point.
It is a situation similar to opening a word document and it will automatically open Microsoft word. Only in my case I create a batch file for this word document and then convert it into a .exe file so I could create a user for this document entry point.
So in my case after it's all packed to the top and I run the user entry point, I get an error could not open file. Is that what I would call a linked file? I'm packing up under copy writing/isolation mode and not in merged mode.
Any ideas?
Hi Christopher2222,
In most cases, you won't need to run the application during the capture process. In some scenarios it will probably a solution to set some values "first round" for an application.
In this case, you try to start a batch (bat) file. All Thinstall/ThinApp scenarios with a bat file to add this to your package.ini
Source=%SystemSystem%\cmd.exe
Shortcut = YourPackageContainer.dat
CommandLine=%SystemSystem%\cmd.exe/k C:\PathToYourBatchFile\start.bat OptionalParameter1 OptionalParameter2
The UNC path is not recommended.
Best regards
Christian Janssen
CIS - Group.nl - VMware and Thinstall partner
Run the script FDM Essbase, no .bat files
I want to run a script directly from FDM Essbase without needing to use a .bat file.I went to hollow post where calls MaxL scripts are discussed, but I have not found anywhere, there is a solution for sending a script to essbase.
I have problems connecting to essbase using already existing and subsequently adapter configurations send an essbase script to the server. This is done for example in the Load event - where the essbase data are disabled. I would need assistance on how to implement this kind of soluition in the event script for example BefImport.
Hi Nicklas,
A couple of things to note.
You must pass a 1 as the first parameter to use a file as a calculation script. Note that a calculation .csc script example files that are in your database and it's called AggMonth.csc you would spend in:
Set objHWRerurn = API. IntBlockMgr.IntegrationMgr.PobjIntegrate.varCon.DataManipulation.fCalculate(1,"AggMonth")
If you use 2 as the parameter to the fCaculate function, which means that the calculation script is a string, you can search for 'Essbase calculation chain' in the adapter to see how it works.
If you really want to use a .maxl script and not an Essbase calc script you do not use the fCaculate function and will shout to essmsh.exe with parameters that does not use FDM adapter functions.
PS You can also configure features of validation in FDM and assign scripts to those and then tell FDM you use 'file '. For the planning/essbase, it makes more sense to have just a script probably the method you follow.
Kind regards
John A. Booth
http://www.metavero.com
Published by: Jbooth on March 18, 2011 09:25
Automator - how I got a file zip "with replacement"?
Automator - how I got a file zip "with replacement"?
I have an action that selects a folder - then creates archive in a chosen folder
Currently - it uses the name of the source folder, and then brings new archives every time as:
My folder.zip
my zip 1 file
My 2 zip. folder
I wish there was only a single zip and the new version would ALWAYS OVERWRITE the old.
Q: How can I get what's going on?
or how to do that with applescript?
Hello
In an Automator workflow, you can use this script in "run AppleScript" action.
----
on track {, parameters} - script for Automator
-create an archive in the parent folder, it uses the name of the folder, it overwrites one archive existing and returns the path of the archive
return fileZipper (item 1 of the entry) - entry is a list and it contains the path of the folder
end of race
on fileZipper (thisItem)
tPath thisItem text value
If tPath ends by ":" and then
the value text delimiters oTid point
the value point text delimiters {"": "}
tPath the text value 1 through the text element - tPath 2
the point text delimiters oTid value
end if
zip (tPath & ".zip") the value as a text file
shell script "/ usr/bin/Ditto - c k - rsrc - keepParent" & (quoted in the form of tPath POSIX path) & "" & quoted form of POSIX zipFile path ".
return the zip as an alias file
end fileZipper
-----
This script create a new archive or overwrite an archive existing with the same name as the folder.
The destination is the parent of the selected folder.
If you want to move this archive to a specific folder, add "move Finder items" action after the action "Run the AppleScript.
Windows Update doesn't have a download, the rename.bat file created without success
I tried to do the Windows updates, and it would not download. I tried everything, including the creation of a rename.bat file. From what I read, I had to double-click on the rename.bat to attach the download of Windows. I was not able to do. Can anyone help? I don't understand how completely. I tried double clicking and just, it flashes and goes away and then the update will not download. Help, please?
http://www.Microsoft.com/downloads/en/default.aspx
Put the number in the search at the above link > download it manually.
If this does not solve it:
Windows Update Forum:
It comes with Vista, upgrade install and activate Forum.
You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:
http://social.answers.Microsoft.com/forums/en-us/vistawu/threads
When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.
In this way, you will receive the best help.
See you soon
Mick Murphy - Microsoft partner
Original title: I can't find the fix_svchost.bat file update.
I'm in you process of having my computer running faster. The svchost.exe process takes 100% of cpu memory and computer dthe freezes. A friend of mine told me a method to solve the problem, but I can't find the fix_svchost.bat update. I went to microsoft update center and don't find any results at all, and I don't know another place to look for. I think that the update does not even exist.
I could send you a fix_svchost.bat file, but I don't think it's the starting point.
What you need to do is run a few respectable scans for malware first, and then see if any of you are your svchost.exe process is still badly behave.
Behind each of the svchost.exe process that see you in the Manager of tasks can be one or more process of XP you have to be running, but malware is KNOWN to imitate or hide behind a svchost.exe process, so you won't be able to see in Manager tasks. You have to outsmart it.
First yo should make a reasonable effort to eliminate malware, and then start troubleshooting - not the other way around.
Provide information on your system, the better you can:
What is your system brand and model?
What is your Version of XP and the Service Pack?
Describe your current antivirus and software anti malware situation: McAfee, Symantec, Norton, Spybot, AVG, Avira!, MSE, Panda, Trend Micro, CA, Defender, ZoneAlarm, PC Tools, Comodo, etc..
No matter what you use for malware protection, follow these steps:
These comprehensive analyses can take some time, but you really need to run. SAS will probably be just a bunch of Internet tracking cookies, but you can remove them. Once you have done at least a full analysis, you can do quick scans in the future to save time and save the analyses complete for when you have more time or are really suspicious of an infection of the system.
They can be uninstalled later if you wish.
In 1985, there were 11 known computer viruses. Today, there are over 70,000 and new threats are detected every day. Always update your virus definitions before running a scan.
How to remove a shortcut with the command line?
How to remove a shortcut with the command line?
How to make a backup of the local users and groups with command line?
You delete a shortcut, just as you would remove any other file. A shortcut will end with the extension ".lnk". So assuming you are trying to remove the shortcut named "Shortcut.lnk" which appears to the user 'Bob's Office, you use the button Delete (del) or 'clear' command by specifying the full path to the file. (Remember to put filename in quotes if there is a space anywhere in the path or name) as in:
del "C:\documents and settings\Bob\Desktop\Shortcut.lnk".
What kind of a backup 'users and groups' you want to do? If there is a backup of the users and groups as written in the registry, a good registry as C:\WINDOWS\ERUNT backup program that will make the command line. If you are trying to backup all users and their data as well, then you are better off with a backup program.
HTH,
JW
Maybe you are looking for
-
I restarted the computer, Firefox starts but won't load any pages except in safe mode. It does not meet 'three horizontal bars' icon at the top left. I can do the Edit file... menu appears and the drop-down menus appear, but it wil not load pages.In
-
Kaspersky think Lenovo wifi driver infected
Today, without warning, Kaspersky int. Security 2010 (latest updates) in a file of wifi Intel has detected an infection. 01/04/2011-15:31:33 detected: Backdoor.Win32.IRCNite.cjk HSSWD. EXE C:\Program Files\INTEL\WIFI\BIN\S24EVMON. EXE He cleaned the
-
I have problems with communication with the DMP (4400 g) in a particular subnet (.xx) while I'm in (.yy). Can someone provide a link to a list of the ports used for communication between the DMP and the (5.2.2) DMM? I know that 8080 and 8443 but no m
-
Windows network diagnostics detects connectivity with windows version 1.0 package! IAM helpless! My games freeze and I have to keep refreshing page and its helppppppp frustrating!
-
Long story short say, I just refresh my PC because it is having problem at the start of the system. After having updated the system and install a few programmes and I realized the BOOT parameters (Task Manager > startup) indicates "there is no startu