473,657 Members | 2,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pass variable with double quote for execution in command prompt

1 New Member
strCmdLine = " " + " -o restore -url " + sSitePath + "/sites/" + sToplevelSiteNa me + " -filename " + sFileName+ " -overwrite ";

process1 = System.Diagnost ics.Process.Sta rt(Application. StartupPath + @"\" + "STSADM.EXE ", strCmdLine);
process1.WaitFo rExit();

process1.Close( );



I want double qoute around sfilename Please tell me how to pass variable containing ' " " (double qoute)
Jul 5 '06 #1
1 4055
bdaniel7
4 New Member
strCmdLine = " " + " -o restore -url " + sSitePath + "/sites/" + sToplevelSiteNa me + " -filename " + sFileName+ " -overwrite ";

process1 = System.Diagnost ics.Process.Sta rt(Application. StartupPath + @"\" + "STSADM.EXE ", strCmdLine);
process1.WaitFo rExit();

process1.Close( );



I want double qoute around sfilename Please tell me how to pass variable containing ' " " (double qoute)
escape the double quote: "\"study .NET first\"" will translate into: "study .NET first" ;)
Jul 5 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2892
by: satish | last post by:
Hello all, I have a shared object executable viz. *cable* which I execute as follows : $ ansyscust71 -custom cable -p ANSYSRF **ansyscust71 is a shell script and is a part of a software called ANSYS** Now, I have generated a python module using a *fortran-python interface
5
7553
by: Mike Ratliff | last post by:
I need to call internet explorer from another program and pass along a variable to the aspx page that I am opening. example iexplorer.exe "search.aspx?variable1="12345" please give me an example of the proper command line syntax and the code to set the variable in the aspx program. thanks
28
5074
by: n00m | last post by:
When I double-click on "some.py" file console window appears just for a moment and right after that it's closed. If this script is started from inside of IDLE (F5 key) then it executes as it should be (e.g. executing all its print statements). Any ideas? OS: Windows; Python 2.3.4. Thanks.
1
2435
by: megh55555 | last post by:
Hi , how can we pass arguments to a function located in xyz.py file using the DOS command Prompt. I know its very easy to pass using the python command line but m finding it impossible to do this same thing on the DOS prompt. to pass the args ..BUT how should we pass arguments using DOS prompt] -Megh
15
1776
by: Aman JIANG | last post by:
1. when a double value is very large, I can not use iostream(e.g. cout) to print it (but printf works well) in g++, why ? 2. when a double value is very large, the printed results were different between iostream(e.g. cout) and printf in vc08, why ? thanks.
0
3102
by: jags_32 | last post by:
Hello We use MFG-PRO as our ERP system which in turn uses Progress databases. In the old version of SQL 2000, using DTS packages, we used to set the code page via command prompts and execute DTS packages within that command prompt to fetch data from our double byte ERP databases. In SSIS, we are able to connect and fecth data from NON Double Byte databases, however, when we set the code page first and execute via a command prompt the...
12
3008
by: Bryan Parkoff | last post by:
I write my large project in C++ source code. My C++ source code contains approximate four thousand small functions. Most of them are inline. I define variables and functions in the global scope. The global variables and global functions are hidden to prevent from accessing by the programmers. All global functions share global variables. Only very few global functions are allowed to be reusability for the programmers to use. Few...
1
1923
by: Zygor1 | last post by:
Without going into details; I have the need to pass a string containing double backslashes \\ from the DOS command line and convert these to single backslashes in the code. The problem is if I do this from within perl code directly it is no problem but when I attempt to pass a string from the command line, it seems to lose something in the translation and when I try to do the replace it does not work. So the question is HOW to pass the...
12
11073
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.