:thumbsup:
JBAK_CP
Posts
-
net use command - WinXP Embedded [modified] -
net use command - WinXP Embedded [modified]I'm trying to use the 'net use' command to map a drive from a Windows XP Embedded system(built using Target Designer), but when I try to execute the 'net use' command, it is un-recognized. The command works great on my desktop WinXP machine, just not on the embedded system. I'm not sure if we are missing a package that needs to be on the XP Embedded system? Any help is greatly appreciated! Thanks! Here is how i'm using the net use command:
net use X: \\150.168.80.4\Shared_Test
Here is what I'm trying to accomplish: Map to a drive from a WinXP Embedded machine only if the file server (Windows XP) is available. The batch file listed below is the one being run on the WinXP Embedded system.
:VERIFY
echo.
echo ----------VERIFYING FILESERVER AVAILABILITY----------
ping 150.168.80.4 -n 2
if errorlevel 1 goto RETRY
if errorlevel 0 goto MAPDRIVE
goto END:RETRY
echo.
echo ----------FILESERVER UNAVAILABLE.......RETRYING!----------
goto VERIFY:MAPDRIVE
echo.
echo ----------FILESERVER AVAILABLE.....TRYING TO MAP TO FILESERVER----------
net use X: \\150.168.80.4\Shared_Test
ping 127.0.0.1 -n 5 >NUL
IF NOT EXIST X:\ goto MAPDRIVE
IF EXIST X:\ goto END:END
echo.
echo ----------FILESERVER MAPPING SUCCESSFUL....GOODBYE!----------
echo.modified on Wednesday, January 20, 2010 11:09 AM
-
PropertyPage - OnQueryCancelI am trying to handle the 'Cancel' button in my property pages (wizard) and I've implemented the 'OnQueryCancel' function to catch the cancel message successfully, but unfortunately it seems that the 'OnQueryCancel' function is being called twice if the user clicked the cancel button. Any ideas on how I could address this issue? Thanks!
virtual BOOL OnQueryCancel();
BOOL CWiz_Page1::OnQueryCancel()
{
int ret;
ret = MessageBox("Are you sure?", NULL, MB_YESNO);if(ret == IDYES) return true; else return false;
}
-
inet_addr function and leading zerosThanks! :thumbsup:
-
inet_addr function and leading zerosHi, I'm trying to use the 'inet_addr' function to convert a char IP address, but I think since the IP Address i'm passing in to the 'inet_addr' function has leading zero's (192.169.055.075), the 'inet_addr' function is interpreting this differently. Any suggestion on how to remove the leading zeros? Thanks char IPAddr[20]; //192.169.055.075 ulAddr = inet_addr(IPAddr);
-
how to reset content of ListcontrolDeleteAllItems() will remove everything from the list control.
-
could you help me? I need a example about how to using CSocket with mfcThere are a few examples here: http://cs.baylor.edu/~donahoo/practical/CSockets/mfc/[^]
-
How to calculate the time between LBUTTONDOWN and LBUTTONUP?Here is a generic example on how to get elapsed time: CTime startTime; CTime endTime; CTimeSpan elapsedTime; On LBUTTONDOWN: startTime = CTime::GetCurrentTime(); On LBUTTONUP: endTime = CTime::GetCurrentTime(); elapsedTime = endTime - startTime; int timeout = elapsedTime.GetSeconds();
-
how to detect the installed language pack in an application through MFC .Look into this registry entry: HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language\ You are going to have to traverse through the entries and find the language code you are looking for. There should be code out on the web on how to traverse through registry entries to find a particular key. Here you will find a list of Windows language codes: http://www.science.co.il/Language/Locale-Codes.asp[^]
-
GetEnvironmentvariablesHere is another way to do it...
//Get the env variable
CString directory = "";
directory = getenv ( "ProgramFiles");//Create a new folder underneath the program files directory
CString newDirectory(directory + "\\EnvFolder" );
BOOL createDirEnv = CreateDirectory(newDirectory, NULL); -
VS 2005 Setup & Deployment - Condition QuestionHi, I have a VS2005 Setup & Deployment project and I want to use a Windows installer condition to check to see if a folder already exists (sub-folder in the Application Folder hierarchy). I used the condition 'NOT Installed' in the properties for my sub-folder in the File System tab, but it looks like it's installing the sub-folder every time. Is 'NOT Installed' the right property to check to see if a folder already exists, or is that only used to check if the application is installed or not? Thanks
-
VS2005 - Setup & Deployment - Condition questionHi, I have a VS2005 Setup & Deployment project and I want to use a Windows installer condition to check to see if a folder already exists (sub-folder in the Application Folder hierarchy). I used the condition 'NOT Installed' in the properties for my sub-folder in the File System tab, but it looks like it's installing the sub-folder every time. Is 'NOT Installed' the right property to check to see if a folder already exists, or is that only used to check if the application is installed or not? Thanks
-
Enumerating through local drivesthank you!
-
Enumerating through local drivesHi, I am looking for some information on how to enumerate through the list of available drives on the local machine to be displayed to the user. I remember coming across something similar on CP sometime back, but I am unable to locate it now. If someone could point me in the right direction on where to find some sample code or demo progs., it would be greatly apperciated. I am going to be doing this in VC++ (2003), MFC, on Windows. Thanks
-
Popup Menu - Check Menu ItemHmm..unfortunately making the CMenu variable member of the class didn't seem to work either. I tried adding an ON_UPDATE_COMMAND_UI function for my menu item to try it in there, with no success!
void CTestDialog::OnUpdateOpenLogfile(CCmdUI *pCmdUI)
{//pCmdUI->SetCheck(1); pCmdUI->SetCheck(0);
}
-
Popup Menu - Check Menu ItemHi, I have a dialog box with a pop-up menu and one of the menu entry in there has the 'Checked' property set to true (as default). Now during the execution of my program, I would like to un-check the check mark next to this menu item, but I can't seem to be able to accomplish this, the check-mark seems to be there always. Debugging through the code, it seems to execute the correct statements, but the GUI does not seem to get updated. Any help would be greatly apperciated. VS2005, C++ (MFC) Code:
CMenu menuTst;
VERIFY(menuTst.LoadMenu(IDR_MENU_HELP));
CMenu* pPopupTest = menuTst.GetSubMenu(0);UINT state = pPopupTest->GetMenuState(ID\_OPEN\_LOGFILE, MF\_BYCOMMAND); ASSERT(state != 0xFFFFFFFF); if (state & MF\_CHECKED) pPopupTest->CheckMenuItem(ID\_OPEN\_LOGFILE, MF\_UNCHECKED | MF\_BYCOMMAND); else pPopupTest->CheckMenuItem(ID\_OPEN\_LOGFILE, MF\_CHECKED | MF\_BYCOMMAND);
-
.NET Framework Class Libraryhttp://media.wiley.com/product_data/excerpt/98/07645482/0764548298.pdf[^] led mike: If you look under "Namespaces", it talks about .NET Framework containing hundres of classes, that is what I was refering to
-
.NET Framework Class LibraryHi, Got a quick question. Could someone shed some light on approximately how many .NET Framework class libraries there are? I understand that there are hundreds of class libraries out there, but I was wondering if the experts out here could give me a better number, if known. Thanks!
-
CListCtrl Prevent Column ResizingHi, I have a list control box (report view) in my dialog with two columns with fixed width, but I cannot seem to figure out how to prevent the user for resizing them. I've tried to handle the 'HDN_ITEMCHANGING' message for the list control but no luck. Any help would be greatly apperciated. Using VS 6.0/MFC Thanks!
-
General C# Question - GUI'sHi, I would like to know what are some of the benefits of using C# vs C++ (MFC) specifically regarding GUI's. I've heard that it offers the ease of creating gui's that visual basic has offered developers for years, but I would like to know what specifically is more "easier" in C#? I've developed GUI's using MFC for many years, and at a first glance at C# GUI toolbox it looked pretty similar to what i've been used to and didn't find anything that is much different. Any help and pointers from the experts out here would be greatly appericated. Thanks