Author Archives: Kai Tzer

How to Run VB.net Code as an Administrator

Whenever you see this error message

“Cannot open [Windows service name] on computer “

error

you need to run the VB.Net code as an “Administrator”. There are 2 solutions available.

Solution 1: Modifying “app.manifest”

  1. Go to project and select “(Project Name) properties…”
    1
  2. Click on “View UAC Settings”
    2
  3. Find the code “<requestedExecutionLevel level=”asInvoker” uiAccess=”false” />”
    3
  4. Replace the code with “<requestedExecutionLevel level=”requireAdministrator” uiAccess=”false” />”
  5. You will be able to run your sample code now.
  6. Later, when the code is compiled to executable (exe), this VB.Net application will also run as “Administrator”.

 

Source:

 

Solution 2: Running Visual Studio as an “Administrator”

Step 1: Find Visual Studio IDE in program files, for my machine it is located at “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE”a

Step 2: Right click on “vbexpress.exe” and select “Properties”b

Step 3: Click on “Compatibility”, then check on “Run this program as an administrator” , then click “OK”
c

Step 4: Run the program and it will run as administrator.

How to Install MOBITEK Q24 GSM Modem Hub’s USB Driver in Linux

This guide applies to the following MOBITEK products:-

  • MOBITEK Q24 GSM Modem
  • MOBITEK Q24 GSM Modem Hub

USB Driver had been pre-installed in the following Linux Distro:-

  • Ubuntu 11.10 and above
  • Any distro based on Ubuntu 11.10 and above such as Linux Mint

For other distro, you may need to compile the driver into Linux kernel which is not covered in this guide.

HOW TO CONFIGURE MOBITEK IN LINUX MINT

  1. Optional — install “Cutecom” from Software Manager.

    Linux_USB-01Click on “install”
    Linux_USB-02
  2.  Go to “User and Groups”.
    Linux_USB-03
  3.  Click on the current user and then click on “Groups”.
    Linux_USB-04
  4.  Assign the following “Groups” or permissions to the user:-
    1.  dialout
    2.  root
    3.  sudo
    4. tty
  5.  Restart Linux.
  6.  Open terminal and enter “lsusb”.
  7. If MOBITEK Q24 GSM Modem Hub is detected by Linux, there should be 2 items listed on screen — “Future Technology Devices International, Ltd FT4232H”.
    Linux_USB-05
  8.  Open CuteCom (or minicom).
  9.  Manually type “/dev/ttyUSB0”
  10. Click on “Open device”.
    Linux_USB-06
  11. For the input method below, change the Input type from “LF line end” (default) to “CR,LF line end”.
    Linux_USB-08
  12.  Enter “AT”, and if “OK” is returned or displayed then this mean that the modem is successfully connected to “/dev/ttyUSB0”.
  13. Click “Close device”.
  14. To check next modem in MOBITEK Q24 GSM Modem Hub, then type:-
    1. /dev/ttyUSB1
    2. /dev/ttyUSB2
    3. /dev/ttyUSB7
      and repeat Step 10 until 13.

How to Port VB6 to VB.Net Code

Problem: I have old VB6 code, what is the easiest way to convert or port to VB.Net?

Solution:-

  1. Copy the CLISMS folder (original code) into our local disk.how_to_port-01 
  2. Run the Visual Basic 2008. Click File>Open Project. It should appear like this. Open the CLISMS original code.how_to_port-02 
  3. Choose the project which is .vbp and click “Open”.how_to_port-03 
  4. Upgrade the coding using the upgrade wizard in VB.Net. It appear like this. Click “Next”.how_to_port-04 
  5. Choose “EXE”, click “Next”.how_to_port-05 
  6. Change to “CLISMS.NET”, click “Next”.how_to_port-06 
  7. Click “Yes”.how_to_port-07 
  8. Wait for the process porting to be completed. The dialog box will automatically closed once it is done.how_to_port-08 
  9. You can see the project has successfully ported.how_to_port-09 

 


 

The following steps are optional.

  1. Double click “My Project”, goto “Application”, change the “CLI” to “CLISMS”. Save ithow_to_port-10 
  2. Click “Build -> Build CLISMS”.
    how_to_port-11 
  3. Go to “G:\mobitek\CLISMS ori code\CLISMS.NET\bin”how_to_port-12 
  4. Copy the “sms.bat” from the ori code.how_to_port-13 
  5. Paste on your upgraded code. My path:G:\mobitek\CLISMS ori code\CLISMS.NET\binhow_to_port-14
  6. Right click the sms batch file and click edit.how_to_port-15
  7. It appear that can be edited one.The notepad appear. change the port number and change the telephone number. Then press ctrl+S.how_to_port-16
  8. Double click the sms batch file. It appear like this. Your cmd will automatically closed once the process of sending SMS is send. Then, it is donehow_to_port-17

Note: The clisms cant worked correctly if it situated on network folder. it must be copied into our local disk.

Reported by,
Iqa


 

Resources

How to Change the COM Port Number

Step by step guide on how to change COM Port number

Step 1: Open device manager, and expand ‘Ports (COM & LPT). I will use MobiGATE SG-B-8-U for this example

COM-01

 

Step 2: Select the COM Port you want to change, right click and click on ‘Properties’

COM-02

Step 3: Click on ‘Port Settings’ tab

COM-03

 

Step 4: Click on ‘Advanced’

COM-04

 

Step 5: Select the COM Port that is not in use. I will select COM Port 26 for this example.

COM-05

 

Step 6: Click on ‘OK’. The COM Port is changed now.

COM-06